2009-07-20 19:40:05 +04:00
|
|
|
# $NetBSD: Makefile.inc,v 1.3 2009/07/20 15:40:05 christos Exp $
|
2009-04-12 07:46:04 +04:00
|
|
|
|
|
|
|
.if !defined(BIND9_MAKEFILE_INC)
|
|
|
|
BIND9_MAKEFILE_INC=yes
|
|
|
|
|
|
|
|
USE_FORT?= yes # network client/server
|
|
|
|
|
|
|
|
WARNS?= 1
|
|
|
|
|
|
|
|
.include <bsd.own.mk>
|
|
|
|
|
|
|
|
.if ${MKCRYPTO} == "no"
|
|
|
|
NAMED_USE_OPENSSL?=no
|
|
|
|
.endif
|
|
|
|
|
|
|
|
NAMED_USE_PTHREADS?=yes
|
|
|
|
|
|
|
|
NAMED_USE_OPENSSL?=yes
|
|
|
|
|
|
|
|
IDIST= ${NETBSDSRCDIR}/external/bsd/bind/dist
|
|
|
|
BIND_SRCDIR= ${NETBSDSRCDIR}/external/bsd/bind
|
|
|
|
BIND_HTMLDIR= /usr/share/doc/html/bind9
|
|
|
|
|
|
|
|
.include "${IDIST}/version"
|
|
|
|
|
|
|
|
VERSION=${MAJORVER}.${MINORVER}.${PATCHVER}${RELEASETYPE}${RELEASEVER}
|
|
|
|
SYSCONFDIR=/etc
|
|
|
|
LOCALSTATEDIR=/var
|
|
|
|
|
|
|
|
CPPFLAGS+=-I${BIND_SRCDIR}/include \
|
|
|
|
-I${IDIST} \
|
|
|
|
-I${IDIST}/lib/dns/include -I${IDIST}/lib/dns/unix/include \
|
|
|
|
-I${IDIST}/lib/isc/include -I${IDIST}/lib/isc/unix/include \
|
|
|
|
-I${IDIST}/lib/bind9/include \
|
|
|
|
-I${IDIST}/lib/isccfg/include \
|
|
|
|
-I${IDIST}/lib/isccc/include \
|
|
|
|
-I${IDIST}/lib/lwres/include -I${IDIST}/lib/lwres/unix/include \
|
|
|
|
-I${IDIST}/lib/dns/sec/dst/include \
|
|
|
|
-DNS_LOCALSTATEDIR=\"${LOCALSTATEDIR}\" \
|
|
|
|
-DNS_SYSCONFDIR=\"${SYSCONFDIR}\" \
|
|
|
|
-DVERSION=\"${VERSION}\"
|
|
|
|
|
|
|
|
.if (${USE_INET6} != "no")
|
|
|
|
CPPFLAGS+= -DWANT_IPV6
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(HAVE_GCC) && ${HAVE_GCC} == 4
|
|
|
|
COPTS+= -Wno-pointer-sign
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if !defined(LIB) || empty(LIB)
|
|
|
|
# NOTE: the order of these libraries is important...
|
|
|
|
LDADD+= -lbind9 -ldns -llwres -lisccfg -lisccc -lisc
|
|
|
|
DPADD+= ${LIBBIND9} ${LIBDNS} ${LIBLWRES}
|
|
|
|
DPADD+= ${LIBISCCFG} ${LIBISCCC} ${LIBISC}
|
|
|
|
.else
|
|
|
|
CPPFLAGS+= -DLIBINTERFACE=${LIBINTERFACE} \
|
|
|
|
-DLIBREVISION=${LIBREVISION} -DLIBAGE=${LIBAGE}
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${NAMED_USE_PTHREADS} == "yes"
|
2009-04-14 01:20:40 +04:00
|
|
|
# XXX: Not ready yet
|
|
|
|
# CPPFLAGS+= -DISC_PLATFORM_USE_NATIVE_RWLOCKS
|
2009-04-12 07:46:04 +04:00
|
|
|
.if !defined (LIB) || empty(LIB)
|
|
|
|
LDADD+= -lpthread
|
|
|
|
DPADD+= ${LIBPTHREAD}
|
|
|
|
.else
|
|
|
|
LIBDPLIBS+= pthread ${NETBSDSRCDIR}/lib/libpthread
|
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${NAMED_USE_OPENSSL} == "yes"
|
|
|
|
CPPFLAGS+=-DOPENSSL
|
|
|
|
.if !defined (LIB) || empty(LIB)
|
|
|
|
LDADD+= -lcrypto
|
|
|
|
DPADD+= ${LIBCRYPTO}
|
|
|
|
.else
|
2009-07-20 19:40:05 +04:00
|
|
|
LIBDPLIBS+= crypto ${NETBSDSRCDIR}/crypto/external/bsd/openssl/lib/libcrypto
|
2009-04-12 07:46:04 +04:00
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${NAMED_USE_PTHREADS} == "yes"
|
|
|
|
CPPFLAGS+=-DISC_PLATFORM_USETHREADS -I${IDIST}/lib/isc/pthreads/include
|
|
|
|
.else
|
|
|
|
CPPFLAGS+=-I${IDIST}/lib/isc/nothreads/include
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if exists(${.CURDIR}/../../Makefile.inc)
|
|
|
|
.include "${.CURDIR}/../../Makefile.inc"
|
|
|
|
.endif
|
|
|
|
.endif
|