Remove building with NOCRYPTO option
[minix.git] / external / bsd / dhcp / Makefile.inc
blobf7743a7e7ddb705a23aa6bc73c8abc3f6cf94577
1 # $NetBSD: Makefile.inc,v 1.15 2015/09/27 21:01:27 mlelstv Exp $
3 WARNS?= 1       # XXX -Wshadow -Wcast-qual -Wsign-compare
5 .include <bsd.own.mk>
7 USE_FORT?= yes  # network client/server
8 CWARNFLAGS.clang+=      -Wno-tautological-compare \
9                         -Wno-conversion -Wno-constant-logical-operand \
10                         -Wno-format-security -Wno-error=unused-const-variable
12 DIST:=  ${.PARSEDIR}/dist
13 BIND:=  ${.PARSEDIR}/../bind/dist
14 .PATH:  ${DIST}/${DHCPSRCDIR}
16 COBJDIR!=cd ${.PARSEDIR}/lib/common && ${PRINTOBJDIR}
17 OMOBJDIR!=cd ${.PARSEDIR}/lib/omapip && ${PRINTOBJDIR}
18 DSTOBJDIR!=cd ${.PARSEDIR}/lib/dst && ${PRINTOBJDIR}
20 .if (${USE_INET6} != "no")
21 CPPFLAGS+=      -DDHCPv6
22 .endif
23 .if !defined(__MINIX)
24 CPPFLAGS+= -DISC_PLATFORM_USETHREADS -DHAVE_CONFIG_H
25 .else # defined(__MINIX)
26 CPPFLAGS+= -DHAVE_CONFIG_H
27 .endif # defined(__MINIX)
28 CPPFLAGS+= -I${DIST} -I${DIST}/includes -I${DIST}/../include
29 CPPFLAGS+= -I${BIND} -I${BIND}/includes -I${BIND}/../include
30 .for dir in isc dns irs
31 CPPFLAGS+= -I${BIND}/lib/${dir}/include
32 CPPFLAGS+= -I${BIND}/lib/${dir}/unix/include
33 .if !defined(__MINIX)
34 CPPFLAGS+= -I${BIND}/lib/${dir}/pthreads/include
35 .else # defined(__MINIX)
36 CPPFLAGS+= -I${BIND}/lib/${dir}/nothreads/include
37 .endif # defined(__MINIX)
38 .endfor
39 CPPFLAGS+= -DLOCALSTATEDIR='"/var"'
40 LDADD+= ${COBJDIR}/libdhcp.a
41 LDADD+= ${OMOBJDIR}/libomapi.a ${DSTOBJDIR}/libdst.a
42 .if defined(PROG) && ${PROG} == "dhclient"
43 LDADD+=-Wl,-Bstatic
44 .endif
45 LDADD+= -lirs -lisccfg -ldns -lisc
46 .if !defined(__MINIX)
47 LDADD+=-lpthread
48 .endif # !defined(__MINIX)
49 .if (${MKCRYPTO} != "no")
50 .if (${MKKERBEROS} != "no")
51 LDADD+= -lgssapi -lkrb5 -lhx509 -lheimntlm -lheimbase \
52         -lcom_err  -lroken -lasn1 -lwind
53 DPADD+= ${LIBGSSAPI} ${LIBKRB5} ${LIBHX509} ${LIBHEIMNTLM} ${LIBHEIMBASE} \
54         ${LIBCOM_ERR} ${LIBROKEN} ${LIBASN1} ${LIBWIND}
55 .endif
56 # MINIX3 note: partial dynamic linking results in an unusable binary somehow
57 .if defined(PROG) && ${PROG} == "dhclient" && !defined(__MINIX)
58 LDADD+=-Wl,-Bdynamic
59 .endif
60 .if !defined(__MINIX)
61 LDADD+= -lcrypto -lipsec -lcrypt
62 DPADD+= ${LIBCRYPTO} ${LIBIPSEC} ${LIBCRYPT}
63 .else # defined(__MINIX)
64 LDADD+= -lcrypto -lcrypt
65 DPADD+= ${LIBCRYPTO} ${LIBCRYPT}
66 .endif # defined(__MINIX)
67 .endif
68 .if defined(PROG) && ${PROG} == "dhclient" && !defined(__MINIX)
69 LDADD+=-Wl,-Bdynamic
70 .endif
71 DPADD+= ${COBJDIR}/libdhcp.a
72 DPADD+= ${OMOBJDIR}/libomapi.a ${DSTOBJDIR}/libdst.a
73 DPADD+= ${LIBDNS} ${LIBISC}
74 .if !defined(__MINIX)
75 DPADD+= ${LIBPTHREAD}
76 .endif # !defined(__MINIX)