1 # $NetBSD: Makefile.inc,v 1.3 2009/07/20 15:40:05 christos Exp $
3 .if !defined(BIND9_MAKEFILE_INC)
6 USE_FORT?= yes # network client/server
12 .if ${MKCRYPTO} == "no"
16 NAMED_USE_PTHREADS?=yes
18 NAMED_USE_OPENSSL?=yes
20 IDIST= ${NETBSDSRCDIR}/external/bsd/bind/dist
21 BIND_SRCDIR= ${NETBSDSRCDIR}/external/bsd/bind
22 BIND_HTMLDIR= /usr/share/doc/html/bind9
24 .include "${IDIST}/version"
26 VERSION=${MAJORVER}.${MINORVER}.${PATCHVER}${RELEASETYPE}${RELEASEVER}
30 CPPFLAGS+=-I${BIND_SRCDIR}/include \
32 -I${IDIST}/lib/dns/include -I${IDIST}/lib/dns/unix/include \
33 -I${IDIST}/lib/isc/include -I${IDIST}/lib/isc/unix/include \
34 -I${IDIST}/lib/bind9/include \
35 -I${IDIST}/lib/isccfg/include \
36 -I${IDIST}/lib/isccc/include \
37 -I${IDIST}/lib/lwres/include -I${IDIST}/lib/lwres/unix/include \
38 -I${IDIST}/lib/dns/sec/dst/include \
39 -DNS_LOCALSTATEDIR=\"${LOCALSTATEDIR}\" \
40 -DNS_SYSCONFDIR=\"${SYSCONFDIR}\" \
41 -DSESSION_KEYFILE=\"${LOCALSTATEDIR}/run/named/session.key\" \
42 -DVERSION=\"${VERSION}\" -DBIND9
44 .if (${USE_INET6} != "no")
45 CPPFLAGS+= -DWANT_IPV6
48 .if defined(HAVE_GCC) && ${HAVE_GCC} == 4
49 COPTS+= -Wno-pointer-sign
52 .if !defined(LIB) || empty(LIB)
53 # NOTE: the order of these libraries is important...
54 LDADD+= -lbind9 -ldns -llwres -lisccfg -lisccc -lisc
55 DPADD+= ${LIBBIND9} ${LIBDNS} ${LIBLWRES}
56 DPADD+= ${LIBISCCFG} ${LIBISCCC} ${LIBISC}
58 CPPFLAGS+= -DLIBINTERFACE=${LIBINTERFACE} \
59 -DLIBREVISION=${LIBREVISION} -DLIBAGE=${LIBAGE}
61 #CPPFLAGS+= -DUSE_MEMIMPREGISTER -DUSE_APPIMPREGISTER -DUSE_SOCKETIMPREGISTER \
62 # -DUSE_TIMERIMPREGISTER
64 .if ${NAMED_USE_PTHREADS} == "yes"
66 # CPPFLAGS+= -DISC_PLATFORM_USE_NATIVE_RWLOCKS
67 .if !defined (LIB) || empty(LIB)
71 LIBDPLIBS+= pthread ${NETBSDSRCDIR}/lib/libpthread
75 .if ${NAMED_USE_OPENSSL} == "yes"
77 .if !defined (LIB) || empty(LIB)
81 LIBDPLIBS+= crypto ${NETBSDSRCDIR}/crypto/external/bsd/openssl/lib/libcrypto
85 .if ${NAMED_USE_PTHREADS} == "yes"
86 CPPFLAGS+=-DISC_PLATFORM_USETHREADS -I${IDIST}/lib/isc/pthreads/include
88 CPPFLAGS+=-I${IDIST}/lib/isc/nothreads/include
91 .if exists(${.CURDIR}/../../Makefile.inc)
92 .include "${.CURDIR}/../../Makefile.inc"