Improve how the various helper libraries are added to LDADD/DPADD, including
supporting caching the OBJDIRS (via .MAKEOVERRIDES) to speed up subdir makes. (Based on similar work in gnu/usr.sbin/postfix)
This commit is contained in:
parent
deb5b059d1
commit
a7bdccd7ef
@ -1,6 +1,8 @@
|
||||
# $NetBSD: Makefile,v 1.12 2004/05/19 10:29:21 itojun Exp $
|
||||
# $NetBSD: Makefile,v 1.13 2004/05/23 03:16:40 lukem Exp $
|
||||
|
||||
SUBDIR= libbind9 libdns libisc libisccc libisccfg liblwres .WAIT \
|
||||
dig host named nslookup nsupdate rndc rndc-confgen
|
||||
|
||||
.include "Makefile.inc"
|
||||
|
||||
.include <bsd.subdir.mk>
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: Makefile.inc,v 1.17 2004/05/23 02:49:26 lukem Exp $
|
||||
# $NetBSD: Makefile.inc,v 1.18 2004/05/23 03:16:40 lukem Exp $
|
||||
|
||||
.if !defined(BIND9_MAKEFILE_INC)
|
||||
BIND9_MAKEFILE_INC=yes
|
||||
@ -9,14 +9,15 @@ NAMED_USE_PTHREADS?=yes
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
IDIST= ${NETBSDSRCDIR}/dist/bind
|
||||
IDIST= ${NETBSDSRCDIR}/dist/bind
|
||||
BIND_SRCDIR= ${NETBSDSRCDIR}/usr.sbin/bind
|
||||
.include "${IDIST}/version"
|
||||
|
||||
VERSION=${MAJORVER}.${MINORVER}.${PATCHVER}${RELEASETYPE}${RELEASEVER}
|
||||
SYSCONFDIR=/etc
|
||||
LOCALSTATEDIR=/var
|
||||
|
||||
CPPFLAGS+=-I${.CURDIR}/../include \
|
||||
CPPFLAGS+=-I${BIND_SRCDIR}/include \
|
||||
-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 \
|
||||
@ -28,30 +29,22 @@ CPPFLAGS+=-I${.CURDIR}/../include \
|
||||
-DNS_SYSCONFDIR=\"${SYSCONFDIR}\" \
|
||||
-DVERSION=\"${VERSION}\"
|
||||
|
||||
.if !defined(LIB) || empty(LIB)
|
||||
LIBBIND9OBJDIR!=cd ${.CURDIR}/../libbind9 && ${PRINTOBJDIR}
|
||||
LDADD+= -L${LIBBIND9OBJDIR} -lbind9
|
||||
DPADD+= ${LIBBIND9OBJDIR}/libbind9.a
|
||||
LIBDNSOBJDIR!=cd ${.CURDIR}/../libdns && ${PRINTOBJDIR}
|
||||
LDADD+= -L${LIBDNSOBJDIR} -ldns
|
||||
DPADD+= ${LIBDNSOBJDIR}/libdns.a
|
||||
LIBLWRESOBJDIR!=cd ${.CURDIR}/../liblwres && ${PRINTOBJDIR}
|
||||
LDADD+= -L${LIBLWRESOBJDIR} -llwres
|
||||
DPADD+= ${LIBLWRESOBJDIR}/liblwres.a
|
||||
LIBISCCFGOBJDIR!=cd ${.CURDIR}/../libisccfg && ${PRINTOBJDIR}
|
||||
LDADD+= -L${LIBISCCFGOBJDIR} -lisccfg
|
||||
DPADD+= ${LIBISCCFGOBJDIR}/libisccfg.a
|
||||
LIBISCCCOBJDIR!=cd ${.CURDIR}/../libisccc && ${PRINTOBJDIR}
|
||||
LDADD+= -L${LIBISCCCOBJDIR} -lisccc
|
||||
DPADD+= ${LIBISCCCOBJDIR}/libisccc.a
|
||||
LIBISCOBJDIR!=cd ${.CURDIR}/../libisc && ${PRINTOBJDIR}
|
||||
LDADD+= -L${LIBISCOBJDIR} -lisc
|
||||
DPADD+= ${LIBISCOBJDIR}/libisc.a
|
||||
.if !defined(LIB) || empty(LIB) # {
|
||||
# NOTE: the order of these libraries is important...
|
||||
.for _LL in bind9 dns lwres isccfg isccc isc
|
||||
.if !defined(BOBJDIR.${_LL})
|
||||
BOBJDIR.${_LL}!=cd ${BIND_SRCDIR}/lib${_LL} && ${PRINTOBJDIR}
|
||||
.MAKEOVERRIDES+=BOBJDIR.${_LL}
|
||||
.endif
|
||||
LDADD+= -L${BOBJDIR.${_LL}} -l${_LL}
|
||||
DPADD+= ${BOBJDIR.${_LL}}/lib${_LL}.a
|
||||
.endfor
|
||||
|
||||
.if ${NAMED_USE_PTHREADS} == "yes"
|
||||
LDADD+= -lpthread
|
||||
DPADD+= ${LIBPTHREAD}
|
||||
.endif
|
||||
.else
|
||||
.else # }
|
||||
MKPRIVATELIB=yes
|
||||
CPPFLAGS+= -DLIBINTERFACE=${LIBINTERFACE} \
|
||||
-DLIBREVISION=${LIBREVISION} -DLIBAGE=${LIBAGE}
|
||||
|
Loading…
Reference in New Issue
Block a user