Makefile.in 5.4 KB
Newer Older
1
# Copyright (C) 1998-2002, 2004-2016  Internet Systems Consortium, Inc. ("ISC")
Mark Andrews's avatar
Mark Andrews committed
2
#
3 4 5
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
6

7 8 9 10
srcdir =	@srcdir@
VPATH =		@srcdir@
top_srcdir =	@top_srcdir@

11
VERSION=@BIND9_VERSION@
Bob Halley's avatar
update  
Bob Halley committed
12

13 14
@BIND9_PRODUCT@

Evan Hunt's avatar
Evan Hunt committed
15 16
@BIND9_DESCRIPTION@

17 18
@BIND9_SRCID@

19 20
@BIND9_CONFIGARGS@

21
@BIND9_MAKE_INCLUDES@
22

23 24 25
#
# Add database drivers here.
#
26 27
DBDRIVER_OBJS =
DBDRIVER_SRCS =
Brian Wellington's avatar
Brian Wellington committed
28
DBDRIVER_INCLUDES =
29
DBDRIVER_LIBS =
30

31 32 33 34 35 36 37
DLZ_DRIVER_DIR =	${top_srcdir}/contrib/dlz/drivers

DLZDRIVER_OBJS =	@DLZ_DRIVER_OBJS@
DLZDRIVER_SRCS =	@DLZ_DRIVER_SRCS@
DLZDRIVER_INCLUDES =	@DLZ_DRIVER_INCLUDES@
DLZDRIVER_LIBS =	@DLZ_DRIVER_LIBS@

38
CINCLUDES =	-I${srcdir}/include -I${srcdir}/unix/include -I. \
39
		${LWRES_INCLUDES} ${DNS_INCLUDES} ${BIND9_INCLUDES} \
40
		${ISCCFG_INCLUDES} ${ISCCC_INCLUDES} ${ISC_INCLUDES} \
41
		${DLZDRIVER_INCLUDES} ${DBDRIVER_INCLUDES} @DST_OPENSSL_INC@
42

Evan Hunt's avatar
Evan Hunt committed
43
CDEFINES =      @CONTRIB_DLZ@ @USE_PKCS11@ @PKCS11_ENGINE@ @CRYPTO@
44 45 46

CWARNINGS =

47
DNSLIBS =	../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
48
ISCCFGLIBS =	../../lib/isccfg/libisccfg.@A@
49
ISCCCLIBS =	../../lib/isccc/libisccc.@A@
50
ISCLIBS =	../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
51
ISCNOSYMLIBS =	../../lib/isc/libisc-nosymtbl.@A@ @ISC_OPENSSL_LIBS@
52
LWRESLIBS =	../../lib/lwres/liblwres.@A@
53
BIND9LIBS =	../../lib/bind9/libbind9.@A@
54

55
DNSDEPLIBS =	../../lib/dns/libdns.@A@
56
ISCCFGDEPLIBS =	../../lib/isccfg/libisccfg.@A@
57
ISCCCDEPLIBS =	../../lib/isccc/libisccc.@A@
58
ISCDEPLIBS =	../../lib/isc/libisc.@A@
59
LWRESDEPLIBS =	../../lib/lwres/liblwres.@A@
60
BIND9DEPLIBS =	../../lib/bind9/libbind9.@A@
61

62
DEPLIBS =	${LWRESDEPLIBS} ${DNSDEPLIBS} ${BIND9DEPLIBS} \
63
		${ISCCFGDEPLIBS} ${ISCCCDEPLIBS} ${ISCDEPLIBS}
64

65
LIBS =		${LWRESLIBS} ${DNSLIBS} ${BIND9LIBS} \
66 67
		${ISCCFGLIBS} ${ISCCCLIBS} ${ISCLIBS} \
		${DLZDRIVER_LIBS} ${DBDRIVER_LIBS} @LIBS@
68

69 70 71 72
NOSYMLIBS =	${LWRESLIBS} ${DNSLIBS} ${BIND9LIBS} \
		${ISCCFGLIBS} ${ISCCCLIBS} ${ISCNOSYMLIBS} \
		${DLZDRIVER_LIBS} ${DBDRIVER_LIBS} @LIBS@

Bob Halley's avatar
Bob Halley committed
73 74
SUBDIRS =	unix

Mark Andrews's avatar
Mark Andrews committed
75
TARGETS =	named@EXEEXT@ lwresd@EXEEXT@
76

77 78
GEOIPLINKOBJS = geoip.@O@

79
OBJS =		builtin.@O@ client.@O@ config.@O@ control.@O@ \
80
		controlconf.@O@ fuzz.@O@ @GEOIPLINKOBJS@ interfacemgr.@O@ \
81
		listenlist.@O@ log.@O@ logconf.@O@ main.@O@ notify.@O@ \
82
		query.@O@ server.@O@ sortlist.@O@ statschannel.@O@ \
83 84
		tkeyconf.@O@ tsigconf.@O@ update.@O@ xfrout.@O@ \
		zoneconf.@O@ \
85
		lwaddr.@O@ lwresd.@O@ lwdclient.@O@ lwderror.@O@ lwdgabn.@O@ \
86
		lwdgnba.@O@ lwdgrbn.@O@ lwdnoop.@O@ lwsearch.@O@ \
87
		${DLZDRIVER_OBJS} ${DBDRIVER_OBJS}
88

89
UOBJS =		unix/os.@O@ unix/dlz_dlopen_driver.@O@
Bob Halley's avatar
Bob Halley committed
90

91 92
SYMOBJS =	symtbl.@O@

93 94
GEOIPLINKSRCS = geoip.c

95
SRCS =		builtin.c client.c config.c control.c \
96
		controlconf.c fuzz.c @GEOIPLINKSRCS@ interfacemgr.c \
97
		listenlist.c log.c logconf.c main.c notify.c \
98
		query.c server.c sortlist.c statschannel.c \
99 100
		tkeyconf.c tsigconf.c update.c xfrout.c \
		zoneconf.c \
101
		lwaddr.c lwresd.c lwdclient.c lwderror.c lwdgabn.c \
102
		lwdgnba.c lwdgrbn.c lwdnoop.c lwsearch.c \
103
		${DLZDRIVER_SRCS} ${DBDRIVER_SRCS}
Bob Halley's avatar
Bob Halley committed
104

105
MANPAGES =	named.8 lwresd.8 named.conf.5
106

107
HTMLPAGES =	named.html lwresd.html named.conf.html
Bob Halley's avatar
Bob Halley committed
108 109 110

MANOBJS =	${MANPAGES} ${HTMLPAGES}

111 112
@BIND9_MAKE_RULES@

113
main.@O@: main.c
114 115
	${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \
		-DVERSION=\"${VERSION}\" \
116
		-DPRODUCT=\"${PRODUCT}\" \
Evan Hunt's avatar
Evan Hunt committed
117
		-DDESCRIPTION=\"${DESCRIPTION}\" \
118
		-DSRCID=\"${SRCID}\" \
119
		-DCONFIGARGS="\"${CONFIGARGS}\"" \
120
		-DBUILDER="\"make\"" \
121 122
		-DNS_LOCALSTATEDIR=\"${localstatedir}\" \
		-DNS_SYSCONFDIR=\"${sysconfdir}\" -c ${srcdir}/main.c
Bob Halley's avatar
update  
Bob Halley committed
123

Evan Hunt's avatar
Evan Hunt committed
124
config.@O@: config.c
125 126
	${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \
		-DVERSION=\"${VERSION}\" \
127
		-DSRCID=\"${SRCID}\" \
Evan Hunt's avatar
Evan Hunt committed
128
		-DDYNDB_LIBDIR=\"@libdir@/bind\" \
129
		-DNS_LOCALSTATEDIR=\"${localstatedir}\" \
130
		-DNS_SYSCONFDIR=\"${sysconfdir}\" \
131 132
		-c ${srcdir}/config.c

Evan Hunt's avatar
Evan Hunt committed
133 134 135 136 137
server.@O@: server.c
	${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \
		-DPRODUCT=\"${PRODUCT}\" \
		-DVERSION=\"${VERSION}\" -c ${srcdir}/server.c

Mark Andrews's avatar
Mark Andrews committed
138
named@EXEEXT@: ${OBJS} ${UOBJS} ${DEPLIBS}
139 140 141
	export MAKE_SYMTABLE="yes"; \
	export BASEOBJS="${OBJS} ${UOBJS}"; \
	${FINALBUILDCMD}
142

Mark Andrews's avatar
Mark Andrews committed
143 144 145
lwresd@EXEEXT@: named@EXEEXT@
	rm -f lwresd@EXEEXT@
	@LN@ named@EXEEXT@ lwresd@EXEEXT@
146

147
doc man:: ${MANOBJS}
Bob Halley's avatar
Bob Halley committed
148

149
docclean manclean maintainer-clean::
Bob Halley's avatar
Bob Halley committed
150 151
	rm -f ${MANOBJS}

152
clean distclean maintainer-clean::
153 154 155
	rm -f ${TARGETS} ${OBJS}

maintainer-clean::
156

Mark Andrews's avatar
Mark Andrews committed
157
bind9.xsl.h: bind9.xsl ${srcdir}/convertxsl.pl
158
	${PERL} ${srcdir}/convertxsl.pl < ${srcdir}/bind9.xsl > bind9.xsl.h
159

160
depend: bind9.xsl.h
161
statschannel.@O@: bind9.xsl.h
Bob Halley's avatar
Bob Halley committed
162 163

installdirs:
164
	$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${sbindir}
165
	$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man5
166
	$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man8
Bob Halley's avatar
Bob Halley committed
167

Mark Andrews's avatar
Mark Andrews committed
168
install:: named@EXEEXT@ lwresd@EXEEXT@ installdirs
169
	${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} named@EXEEXT@ ${DESTDIR}${sbindir}
Mark Andrews's avatar
Mark Andrews committed
170
	(cd ${DESTDIR}${sbindir}; rm -f lwresd@EXEEXT@; @LN@ named@EXEEXT@ lwresd@EXEEXT@)
171 172 173 174
	${INSTALL_DATA} ${srcdir}/named.8 ${DESTDIR}${mandir}/man8
	${INSTALL_DATA} ${srcdir}/lwresd.8 ${DESTDIR}${mandir}/man8
	${INSTALL_DATA} ${srcdir}/named.conf.5 ${DESTDIR}${mandir}/man5

Evan Hunt's avatar
Evan Hunt committed
175 176 177 178 179 180 181
uninstall::
	rm -f ${DESTDIR}${mandir}/man5/named.conf.5
	rm -f ${DESTDIR}${mandir}/man8/lwresd.8
	rm -f ${DESTDIR}${mandir}/man8/named.8
	rm -f ${DESTDIR}${sbindir}/lwresd@EXEEXT@
	${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${sbindir}/named@EXEEXT@

182
@DLZ_DRIVER_RULES@
183 184 185

named-symtbl.@O@: named-symtbl.c
	${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} -c named-symtbl.c