Sync usage with man page.
[netbsd-mini2440.git] / external / bsd / bind / Makefile.inc
blob54b130c374a072c5520e876cf2a3c72c42fda5ac
1 #       $NetBSD: Makefile.inc,v 1.3 2009/07/20 15:40:05 christos Exp $
3 .if !defined(BIND9_MAKEFILE_INC)
4 BIND9_MAKEFILE_INC=yes
6 USE_FORT?= yes  # network client/server
8 WARNS?= 1
10 .include <bsd.own.mk>
12 .if ${MKCRYPTO} == "no"
13 NAMED_USE_OPENSSL?=no
14 .endif
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}
27 SYSCONFDIR=/etc
28 LOCALSTATEDIR=/var
30 CPPFLAGS+=-I${BIND_SRCDIR}/include \
31         -I${IDIST} \
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
46 .endif
48 .if defined(HAVE_GCC) && ${HAVE_GCC} == 4
49 COPTS+= -Wno-pointer-sign
50 .endif
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}
57 .else
58 CPPFLAGS+= -DLIBINTERFACE=${LIBINTERFACE} \
59            -DLIBREVISION=${LIBREVISION} -DLIBAGE=${LIBAGE}
60 .endif
61 #CPPFLAGS+= -DUSE_MEMIMPREGISTER -DUSE_APPIMPREGISTER -DUSE_SOCKETIMPREGISTER \
62 #    -DUSE_TIMERIMPREGISTER
64 .if ${NAMED_USE_PTHREADS} == "yes"
65 # XXX: Not ready yet
66 # CPPFLAGS+=    -DISC_PLATFORM_USE_NATIVE_RWLOCKS
67 .if !defined (LIB) || empty(LIB)
68 LDADD+= -lpthread
69 DPADD+= ${LIBPTHREAD}
70 .else
71 LIBDPLIBS+=      pthread  ${NETBSDSRCDIR}/lib/libpthread
72 .endif
73 .endif
75 .if ${NAMED_USE_OPENSSL} == "yes"
76 CPPFLAGS+=-DOPENSSL
77 .if !defined (LIB) || empty(LIB)
78 LDADD+= -lcrypto
79 DPADD+= ${LIBCRYPTO}
80 .else
81 LIBDPLIBS+=     crypto  ${NETBSDSRCDIR}/crypto/external/bsd/openssl/lib/libcrypto
82 .endif
83 .endif
85 .if ${NAMED_USE_PTHREADS} == "yes"
86 CPPFLAGS+=-DISC_PLATFORM_USETHREADS -I${IDIST}/lib/isc/pthreads/include
87 .else
88 CPPFLAGS+=-I${IDIST}/lib/isc/nothreads/include
89 .endif
91 .if exists(${.CURDIR}/../../Makefile.inc)
92 .include "${.CURDIR}/../../Makefile.inc"
93 .endif
94 .endif