Makefile.in 8.9 KB
Newer Older
1
# Copyright (C) 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
#
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
9 10 11 12 13 14 15 16 17

srcdir =	@srcdir@
VPATH =		@srcdir@
top_srcdir =	@top_srcdir@

# Attempt to disable parallel processing.
.NOTPARALLEL:
.NO_PARALLEL:

18
VERSION=@BIND9_VERSION@
19 20 21

@BIND9_MAKE_INCLUDES@

Evan Hunt's avatar
Evan Hunt committed
22
CINCLUDES =	-I. -Iinclude ${DNS_INCLUDES} ${ISC_INCLUDES} \
23
		@DST_OPENSSL_INC@
Evan Hunt's avatar
Evan Hunt committed
24
CDEFINES =	@CRYPTO@ -DTESTS="\"${top_builddir}/lib/dns/tests/\""
25

26
ISCLIBS =	../../isc/libisc.@A@ @ISC_OPENSSL_LIBS@
27 28 29 30 31 32 33
ISCDEPLIBS =	../../isc/libisc.@A@
DNSLIBS =	../libdns.@A@ @DNS_CRYPTO_LIBS@
DNSDEPLIBS =	../libdns.@A@

LIBS =		@LIBS@ @ATFLIBS@

OBJS =		dnstest.@O@
34 35
SRCS =		acl_test.c \
		db_test.c \
Mark Andrews's avatar
Mark Andrews committed
36 37
		dbdiff_test.c \
		dbiterator_test.c \
38
		dh_test.c \
Mark Andrews's avatar
Mark Andrews committed
39
		dispatch_test.c \
Evan Hunt's avatar
Evan Hunt committed
40
		dnstap_test.c \
41
		dst_test.c \
Mark Andrews's avatar
Mark Andrews committed
42
		dnstest.c \
Evan Hunt's avatar
Evan Hunt committed
43
		dstrandom_test.c \
Mark Andrews's avatar
Mark Andrews committed
44
		geoip_test.c \
Evan Hunt's avatar
Evan Hunt committed
45
		gost_test.c \
Evan Hunt's avatar
Evan Hunt committed
46
		keytable_test.c \
Mark Andrews's avatar
Mark Andrews committed
47
		master_test.c \
48
		name_test.c \
Mark Andrews's avatar
Mark Andrews committed
49
		nsec3_test.c \
50
		peer_test.c \
Mark Andrews's avatar
Mark Andrews committed
51 52
		private_test.c \
		rbt_test.c \
53
		rbt_serialize_test.c \
Mark Andrews's avatar
Mark Andrews committed
54 55 56
		rdata_test.c \
		rdataset_test.c \
		rdatasetstats_test.c \
57
		resolver_test.c \
58
		rsa_test.c \
Mark Andrews's avatar
Mark Andrews committed
59
		time_test.c \
60
		tsig_test.c \
Mark Andrews's avatar
Mark Andrews committed
61 62
		update_test.c \
		zonemgr_test.c \
Mark Andrews's avatar
Mark Andrews committed
63
		zt_test.c
64 65

SUBDIRS =
66 67
TARGETS =	acl_test@EXEEXT@ \
		db_test@EXEEXT@ \
Mark Andrews's avatar
Mark Andrews committed
68 69 70
		dbdiff_test@EXEEXT@ \
		dbiterator_test@EXEEXT@ \
		dbversion_test@EXEEXT@ \
71
		dh_test@EXEEXT@ \
Mark Andrews's avatar
Mark Andrews committed
72
		dispatch_test@EXEEXT@ \
Evan Hunt's avatar
Evan Hunt committed
73
		dnstap_test@EXEEXT@ \
74
		dst_test@EXEEXT@ \
Evan Hunt's avatar
Evan Hunt committed
75
		dstrandom_test@EXEEXT@ \
Mark Andrews's avatar
Mark Andrews committed
76
		geoip_test@EXEEXT@ \
Evan Hunt's avatar
Evan Hunt committed
77
		gost_test@EXEEXT@ \
Evan Hunt's avatar
Evan Hunt committed
78
		keytable_test@EXEEXT@ \
Mark Andrews's avatar
Mark Andrews committed
79
		master_test@EXEEXT@ \
80
		name_test@EXEEXT@ \
Mark Andrews's avatar
Mark Andrews committed
81
		nsec3_test@EXEEXT@ \
82
		peer_test@EXEEXT@ \
Mark Andrews's avatar
Mark Andrews committed
83 84
		private_test@EXEEXT@ \
		rbt_test@EXEEXT@ \
85
		rbt_serialize_test@EXEEXT@ \
Mark Andrews's avatar
Mark Andrews committed
86 87 88
		rdata_test@EXEEXT@ \
		rdataset_test@EXEEXT@ \
		rdatasetstats_test@EXEEXT@ \
89
		resolver_test@EXEEXT@ \
90
		rsa_test@EXEEXT@ \
Mark Andrews's avatar
Mark Andrews committed
91
		time_test@EXEEXT@ \
92
		tsig_test@EXEEXT@ \
Mark Andrews's avatar
Mark Andrews committed
93 94 95
		update_test@EXEEXT@ \
		zonemgr_test@EXEEXT@ \
		zt_test@EXEEXT@
96 97 98

@BIND9_MAKE_RULES@

99 100 101 102 103
acl_test@EXEEXT@: acl_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
			acl_test.@O@ dnstest.@O@ ${DNSLIBS} \
				${ISCLIBS} ${LIBS}

Mark Andrews's avatar
Mark Andrews committed
104
db_test@EXEEXT@: db_test.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
105
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
106
			db_test.@O@ dnstest.@O@ ${DNSLIBS} \
Mark Andrews's avatar
Mark Andrews committed
107
			${ISCLIBS} ${LIBS}
108

Mark Andrews's avatar
Mark Andrews committed
109
dbdiff_test@EXEEXT@: dbdiff_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
Evan Hunt's avatar
Evan Hunt committed
110
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
Mark Andrews's avatar
Mark Andrews committed
111
			dbdiff_test.@O@ dnstest.@O@ ${DNSLIBS} \
Evan Hunt's avatar
Evan Hunt committed
112 113
				${ISCLIBS} ${LIBS}

Mark Andrews's avatar
Mark Andrews committed
114
dbiterator_test@EXEEXT@: dbiterator_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
115
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
Mark Andrews's avatar
Mark Andrews committed
116
			dbiterator_test.@O@ dnstest.@O@ ${DNSLIBS} \
117
				${ISCLIBS} ${LIBS}
118

Mark Andrews's avatar
Mark Andrews committed
119
dbversion_test@EXEEXT@: dbversion_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
120
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
Mark Andrews's avatar
Mark Andrews committed
121
			dbversion_test.@O@ dnstest.@O@ ${DNSLIBS} \
122 123
				${ISCLIBS} ${LIBS}

Mark Andrews's avatar
Mark Andrews committed
124
dh_test@EXEEXT@: dh_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
125
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
Mark Andrews's avatar
Mark Andrews committed
126 127
			dh_test.@O@ dnstest.@O@ ${DNSLIBS} \
			${ISCLIBS} ${LIBS}
128

Mark Andrews's avatar
Mark Andrews committed
129
dispatch_test@EXEEXT@: dispatch_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
130
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
Mark Andrews's avatar
Mark Andrews committed
131
			dispatch_test.@O@ dnstest.@O@ ${DNSLIBS} \
132
				${ISCLIBS} ${LIBS}
133

Mark Andrews's avatar
Mark Andrews committed
134
dnstap_test@EXEEXT@: dnstap_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
135
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
Mark Andrews's avatar
Mark Andrews committed
136
			dnstap_test.@O@ dnstest.@O@ ${DNSLIBS} \
137
				${ISCLIBS} ${LIBS}
138

139 140 141 142 143
dst_test@EXEEXT@: dst_test.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
			dst_test.@O@ dnstest.@O@ ${DNSLIBS} \
			${ISCLIBS} ${LIBS}

Mark Andrews's avatar
Mark Andrews committed
144
geoip_test@EXEEXT@: geoip_test.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
145
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
Mark Andrews's avatar
Mark Andrews committed
146 147
			geoip_test.@O@ dnstest.@O@ ${DNSLIBS} \
			${ISCLIBS} ${LIBS}
148

Mark Andrews's avatar
Mark Andrews committed
149
gost_test@EXEEXT@: gost_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
150
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
Mark Andrews's avatar
Mark Andrews committed
151 152
			gost_test.@O@ dnstest.@O@ ${DNSLIBS} \
			${ISCLIBS} ${LIBS}
153

Mark Andrews's avatar
Mark Andrews committed
154
keytable_test@EXEEXT@: keytable_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
155
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
Mark Andrews's avatar
Mark Andrews committed
156
			keytable_test.@O@ dnstest.@O@ ${DNSLIBS} \
157
				${ISCLIBS} ${LIBS}
158

Mark Andrews's avatar
Mark Andrews committed
159 160 161 162 163 164 165 166 167
master_test@EXEEXT@: master_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
	test -d testdata || mkdir testdata
	test -d testdata/master || mkdir testdata/master
	${PERL} ${srcdir}/mkraw.pl < ${srcdir}/testdata/master/master12.data.in \
		> testdata/master/master12.data
	${PERL} ${srcdir}/mkraw.pl < ${srcdir}/testdata/master/master13.data.in \
		> testdata/master/master13.data
	${PERL} ${srcdir}/mkraw.pl < ${srcdir}/testdata/master/master14.data.in \
		> testdata/master/master14.data
168
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
Mark Andrews's avatar
Mark Andrews committed
169
			master_test.@O@ dnstest.@O@ ${DNSLIBS} \
170
				${ISCLIBS} ${LIBS}
171

172 173 174 175 176
name_test@EXEEXT@: name_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
			name_test.@O@ dnstest.@O@ ${DNSLIBS} \
				${ISCLIBS} ${LIBS}

177
nsec3_test@EXEEXT@: nsec3_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
178 179
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
			nsec3_test.@O@ dnstest.@O@ ${DNSLIBS} \
180
				${ISCLIBS} ${LIBS}
Evan Hunt's avatar
Evan Hunt committed
181

Mark Andrews's avatar
Mark Andrews committed
182
peer_test@EXEEXT@: peer_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
183
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
Mark Andrews's avatar
Mark Andrews committed
184
			peer_test.@O@ dnstest.@O@ ${DNSLIBS} \
185
				${ISCLIBS} ${LIBS}
186

Mark Andrews's avatar
Mark Andrews committed
187
private_test@EXEEXT@: private_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
Evan Hunt's avatar
Evan Hunt committed
188
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
Mark Andrews's avatar
Mark Andrews committed
189
			private_test.@O@ dnstest.@O@ ${DNSLIBS} \
Evan Hunt's avatar
Evan Hunt committed
190 191
				${ISCLIBS} ${LIBS}

Mark Andrews's avatar
Mark Andrews committed
192
rbt_serialize_test@EXEEXT@: rbt_serialize_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
193
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
Mark Andrews's avatar
Mark Andrews committed
194
			rbt_serialize_test.@O@ dnstest.@O@ ${DNSLIBS} \
195
				${ISCLIBS} ${LIBS}
196

197 198 199
rbt_test@EXEEXT@: rbt_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
			rbt_test.@O@ dnstest.@O@ ${DNSLIBS} \
200 201
				${ISCLIBS} ${LIBS}

202 203
rdata_test@EXEEXT@: rdata_test.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
204
			rdata_test.@O@ dnstest.@O@ ${DNSLIBS} \
205
			${ISCLIBS} ${LIBS}
206

Mark Andrews's avatar
Mark Andrews committed
207
rdataset_test@EXEEXT@: rdataset_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
Evan Hunt's avatar
Evan Hunt committed
208
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
Mark Andrews's avatar
Mark Andrews committed
209 210
			rdataset_test.@O@ dnstest.@O@ ${DNSLIBS} \
				${ISCLIBS} ${LIBS}
211

Mark Andrews's avatar
Mark Andrews committed
212
rdatasetstats_test@EXEEXT@: rdatasetstats_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
213
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
Mark Andrews's avatar
Mark Andrews committed
214 215
			rdatasetstats_test.@O@ dnstest.@O@ ${DNSLIBS} \
				${ISCLIBS} ${LIBS}
216

217 218 219 220 221 222
resolver_test@EXEEXT@: resolver_test.@O@ dnstest.@O@ \
		${ISCDEPLIBS} ${DNSDEPLIBS}
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
			resolver_test.@O@ dnstest.@O@ ${DNSLIBS} \
				${ISCLIBS} ${LIBS}

223 224 225 226 227
rsa_test@EXEEXT@: rsa_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
			rsa_test.@O@ dnstest.@O@ ${DNSLIBS} \
			${ISCLIBS} ${LIBS}

Mark Andrews's avatar
Mark Andrews committed
228 229 230 231 232
time_test@EXEEXT@: time_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
			time_test.@O@ dnstest.@O@ ${DNSLIBS} \
				${ISCLIBS} ${LIBS}

233 234 235 236 237
tsig_test@EXEEXT@: tsig_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
			tsig_test.@O@ dnstest.@O@ ${DNSLIBS} \
			${ISCLIBS} ${LIBS}

Mark Andrews's avatar
Mark Andrews committed
238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253
update_test@EXEEXT@: update_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
			update_test.@O@ dnstest.@O@ ${DNSLIBS} \
				${ISCLIBS} ${LIBS}

zonemgr_test@EXEEXT@: zonemgr_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
			zonemgr_test.@O@ dnstest.@O@ ${DNSLIBS} \
				${ISCLIBS} ${LIBS}

zt_test@EXEEXT@: zt_test.@O@ dnstest.@O@ \
		${ISCDEPLIBS} ${DNSDEPLIBS}
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
			zt_test.@O@ dnstest.@O@ ${DNSLIBS} \
				${ISCLIBS} ${LIBS}

Evan Hunt's avatar
Evan Hunt committed
254 255 256 257 258
dstrandom_test@EXEEXT@: dstrandom_test.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
			dstrandom_test.@O@ ${DNSLIBS} \
			${ISCLIBS} ${ISCPK11LIBS} ${LIBS}

259
unit::
260
	sh ${top_builddir}/unit/unittest.sh
261

262 263
clean distclean::
	rm -f ${TARGETS}
264
	rm -f atf.out
265
	rm -f testdata/master/master12.data testdata/master/master13.data \
Mark Andrews's avatar
Mark Andrews committed
266
		testdata/master/master14.data
267
	rm -f zone.bin