1 # $NetBSD: Makefile.inc,v 1.15 2015/09/27 21:01:27 mlelstv Exp $
3 WARNS?= 1 # XXX -Wshadow -Wcast-qual -Wsign-compare
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")
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
34 CPPFLAGS+= -I${BIND}/lib/${dir}/pthreads/include
35 .else # defined(__MINIX)
36 CPPFLAGS+= -I${BIND}/lib/${dir}/nothreads/include
37 .endif # defined(__MINIX)
39 CPPFLAGS+= -DLOCALSTATEDIR='"/var"'
40 LDADD+= ${COBJDIR}/libdhcp.a
41 LDADD+= ${OMOBJDIR}/libomapi.a ${DSTOBJDIR}/libdst.a
42 .if defined(PROG) && ${PROG} == "dhclient"
45 LDADD+= -lirs -lisccfg -ldns -lisc
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}
56 # MINIX3 note: partial dynamic linking results in an unusable binary somehow
57 .if defined(PROG) && ${PROG} == "dhclient" && !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)
68 .if defined(PROG) && ${PROG} == "dhclient" && !defined(__MINIX)
71 DPADD+= ${COBJDIR}/libdhcp.a
72 DPADD+= ${OMOBJDIR}/libomapi.a ${DSTOBJDIR}/libdst.a
73 DPADD+= ${LIBDNS} ${LIBISC}
76 .endif # !defined(__MINIX)