Makefile.in 9.74 KB
Newer Older
Mark Andrews's avatar
Mark Andrews committed
1
# Copyright (C) 2004, 2005  Internet Systems Consortium, Inc. ("ISC")
Mark Andrews's avatar
Mark Andrews committed
2
# Copyright (C) 1998-2003  Internet Software Consortium.
3
#
Bob Halley's avatar
Bob Halley committed
4 5 6
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
7
#
Mark Andrews's avatar
Mark Andrews committed
8 9 10 11 12 13 14
# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
Bob Halley's avatar
Bob Halley committed
15

16
# $Id: Makefile.in,v 1.125 2005/06/08 02:06:57 marka Exp $
David Lawrence's avatar
David Lawrence committed
17

Bob Halley's avatar
Bob Halley committed
18 19 20 21
srcdir =	@srcdir@
VPATH =		@srcdir@
top_srcdir =	@top_srcdir@

22
@BIND9_MAKE_INCLUDES@
23

24 25
CINCLUDES =	${DNS_INCLUDES} ${ISC_INCLUDES} ${ISCCFG_INCLUDES} \
		${LWRES_INCLUDES} ${OMAPI_INCLUDES}
26

Bob Halley's avatar
Bob Halley committed
27 28 29
CDEFINES =
CWARNINGS =

30
DNSLIBS =	../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
Bob Halley's avatar
Bob Halley committed
31
ISCLIBS =	../../lib/isc/libisc.@A@
32
ISCCFGLIBS = 	../../lib/isccfg/libisccfg.@A@
Michael Graff's avatar
Michael Graff committed
33
LWRESLIBS =	../../lib/lwres/liblwres.@A@
34

Bob Halley's avatar
Bob Halley committed
35 36
DNSDEPLIBS =	../../lib/dns/libdns.@A@
ISCDEPLIBS =	../../lib/isc/libisc.@A@
37
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
Michael Graff's avatar
Michael Graff committed
38
LWRESDEPLIBS =	../../lib/lwres/liblwres.@A@
39 40

LIBS =		@LIBS@
Bob Halley's avatar
Bob Halley committed
41

42
SUBDIRS = db dst master mem names net rbt sockaddr tasks timers system
43

44 45 46 47
# A few of the test programs are built by default:
# cfg_test is needed for regenerating doc/misc/options;
# genrandom is needed by the system tests

48
# Alphabetically
Mark Andrews's avatar
Mark Andrews committed
49 50
TARGETS =	cfg_test@EXEEXT@ \
		genrandom@EXEEXT@
51 52

# All the other tests are optional and not built by default.
53

54
# Alphabetically
Mark Andrews's avatar
Mark Andrews committed
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
XTARGETS =	adb_test@EXEEXT@ \
		byaddr_test@EXEEXT@ \
		byname_test@EXEEXT@ \
		compress_test@EXEEXT@ \
		db_test@EXEEXT@ \
		entropy_test@EXEEXT@ \
		entropy2_test@EXEEXT@ \
		gxba_test@EXEEXT@ \
		gxbn_test@EXEEXT@ \
		hash_test@EXEEXT@ \
		fsaccess_test@EXEEXT@ \
		inter_test@EXEEXT@ \
		journalprint@EXEEXT@ \
		keyboard_test@EXEEXT@ \
		lex_test@EXEEXT@ \
		lfsr_test@EXEEXT@ \
		log_test@EXEEXT@ \
		lwres_test@EXEEXT@ \
		lwresconf_test@EXEEXT@ \
		master_test@EXEEXT@ \
		mempool_test@EXEEXT@ \
		name_test@EXEEXT@ \
77
		nsecify@EXEEXT@ \
Mark Andrews's avatar
Mark Andrews committed
78 79 80 81 82 83 84 85 86 87 88 89 90
		ratelimiter_test@EXEEXT@ \
		rbt_test@EXEEXT@ \
		rdata_test@EXEEXT@ \
		rwlock_test@EXEEXT@ \
		serial_test@EXEEXT@ \
		shutdown_test@EXEEXT@ \
		sig0_test@EXEEXT@ \
		sock_test@EXEEXT@ \
		sym_test@EXEEXT@ \
		task_test@EXEEXT@ \
		timer_test@EXEEXT@ \
		wire_test@EXEEXT@ \
		zone_test@EXEEXT@
Bob Halley's avatar
Bob Halley committed
91

92
# Alphabetically
93 94 95
SRCS =		cfg_test.c genrandom.c ${XSRCS}

XSRCS =		adb_test.c \
96 97
		byaddr_test.c \
		byname_test.c \
Michael Graff's avatar
Michael Graff committed
98
		compress_test.c \
99
		db_test.c \
Michael Graff's avatar
Michael Graff committed
100
		entropy_test.c \
101
		entropy2_test.c \
Mark Andrews's avatar
Mark Andrews committed
102
		gxba_test.c \
Mark Andrews's avatar
Mark Andrews committed
103
		gxbn_test.c \
104
		hash_test.c \
David Lawrence's avatar
David Lawrence committed
105
		fsaccess_test.c \
Mark Andrews's avatar
Mark Andrews committed
106
		inter_test.c \
107
		journalprint.c \
Michael Graff's avatar
Michael Graff committed
108
		keyboard_test.c \
Bob Halley's avatar
Bob Halley committed
109
		lex_test.c \
Michael Graff's avatar
Michael Graff committed
110
		lfsr_test.c \
111
		log_test.c \
Michael Graff's avatar
Michael Graff committed
112
		lwres_test.c \
113
		lwresconf_test.c \
114 115
		master_test.c \
		mempool_test.c \
Bob Halley's avatar
Bob Halley committed
116
		name_test.c \
117
		nsecify.c \
118
		printmsg.c \
Andreas Gustafsson's avatar
Andreas Gustafsson committed
119
		ratelimiter_test.c \
120 121 122 123 124
		rbt_test.c \
		rdata_test.c \
		rwlock_test.c \
		serial_test.c \
		shutdown_test.c \
125
		sig0_test.c \
Bob Halley's avatar
Bob Halley committed
126 127 128 129 130
		sock_test.c \
		sym_test.c \
		task_test.c \
		timer_test.c \
		wire_test.c \
Andreas Gustafsson's avatar
Andreas Gustafsson committed
131
		zone_test.c
Bob Halley's avatar
Bob Halley committed
132

Bob Halley's avatar
Bob Halley committed
133 134
@BIND9_MAKE_RULES@

135 136
all_tests: ${XTARGETS}

Mark Andrews's avatar
Mark Andrews committed
137
genrandom@EXEEXT@: genrandom.@O@
138
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ genrandom.@O@ @GENRANDOMLIB@
139

Mark Andrews's avatar
Mark Andrews committed
140
adb_test@EXEEXT@: adb_test.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
141
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ adb_test.@O@ \
Michael Graff's avatar
Michael Graff committed
142 143
		${DNSLIBS} ${ISCLIBS} ${LIBS}

144
nsecify@EXEEXT@: nsecify.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
145
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ nsecify.@O@ \
Bob Halley's avatar
Bob Halley committed
146 147
		${DNSLIBS} ${ISCLIBS} ${LIBS}

Mark Andrews's avatar
Mark Andrews committed
148
byaddr_test@EXEEXT@: byaddr_test.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
149
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ byaddr_test.@O@ \
Bob Halley's avatar
Bob Halley committed
150 151
		${DNSLIBS} ${ISCLIBS} ${LIBS}

Mark Andrews's avatar
Mark Andrews committed
152
byname_test@EXEEXT@: byname_test.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
153
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ byname_test.@O@ \
Bob Halley's avatar
Bob Halley committed
154 155
		${DNSLIBS} ${ISCLIBS} ${LIBS}

Mark Andrews's avatar
Mark Andrews committed
156
lex_test@EXEEXT@: lex_test.@O@ ${ISCDEPLIBS}
157
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ lex_test.@O@ \
158
		${ISCLIBS} ${LIBS}
159

Mark Andrews's avatar
Mark Andrews committed
160
lfsr_test@EXEEXT@: lfsr_test.@O@ ${ISCDEPLIBS}
161
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ lfsr_test.@O@ \
Michael Graff's avatar
Michael Graff committed
162 163
		${ISCLIBS} ${LIBS}

Mark Andrews's avatar
Mark Andrews committed
164
log_test@EXEEXT@: log_test.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
165
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ log_test.@O@ \
166 167
		${DNSLIBS} ${ISCLIBS} ${LIBS}

Mark Andrews's avatar
Mark Andrews committed
168
name_test@EXEEXT@: name_test.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
169
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ name_test.@O@ \
170
		${DNSLIBS} ${ISCLIBS} ${LIBS}
171

Mark Andrews's avatar
Mark Andrews committed
172
hash_test@EXEEXT@: hash_test.@O@ ${ISCDEPLIBS}
173
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ hash_test.@O@ \
Michael Graff's avatar
Michael Graff committed
174 175
		${ISCLIBS} ${LIBS}

Mark Andrews's avatar
Mark Andrews committed
176
entropy_test@EXEEXT@: entropy_test.@O@ ${ISCDEPLIBS}
177
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ entropy_test.@O@ \
Michael Graff's avatar
Michael Graff committed
178 179
		${ISCLIBS} ${LIBS}

Mark Andrews's avatar
Mark Andrews committed
180
entropy2_test@EXEEXT@: entropy2_test.@O@ ${ISCDEPLIBS}
181
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ entropy2_test.@O@ \
182 183
		${ISCLIBS} ${LIBS}

Mark Andrews's avatar
Mark Andrews committed
184
sock_test@EXEEXT@: sock_test.@O@ ${ISCDEPLIBS}
185
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ sock_test.@O@ \
186
		${ISCLIBS} ${LIBS}
Bob Halley's avatar
Bob Halley committed
187

Mark Andrews's avatar
Mark Andrews committed
188
sym_test@EXEEXT@: sym_test.@O@ ${ISCDEPLIBS}
189
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ sym_test.@O@ \
190
		${ISCLIBS} ${LIBS}
Bob Halley's avatar
Bob Halley committed
191

Mark Andrews's avatar
Mark Andrews committed
192
task_test@EXEEXT@: task_test.@O@ ${ISCDEPLIBS}
Mark Andrews's avatar
Mark Andrews committed
193
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ task_test.@O@ \
194
		${ISCLIBS} ${LIBS}
Bob Halley's avatar
Bob Halley committed
195

Mark Andrews's avatar
Mark Andrews committed
196
shutdown_test@EXEEXT@: shutdown_test.@O@ ${ISCDEPLIBS}
197
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ shutdown_test.@O@ \
198
		${ISCLIBS} ${LIBS}
Bob Halley's avatar
Bob Halley committed
199

Mark Andrews's avatar
Mark Andrews committed
200
timer_test@EXEEXT@: timer_test.@O@ ${ISCDEPLIBS}
201
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ timer_test.@O@ \
202
		${ISCLIBS} ${LIBS}
Bob Halley's avatar
Bob Halley committed
203

Mark Andrews's avatar
Mark Andrews committed
204
ratelimiter_test@EXEEXT@: ratelimiter_test.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
205
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ ratelimiter_test.@O@ \
Andreas Gustafsson's avatar
Andreas Gustafsson committed
206 207
		${DNSLIBS} ${ISCLIBS} ${LIBS}

Mark Andrews's avatar
Mark Andrews committed
208
rbt_test@EXEEXT@: rbt_test.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
209
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ rbt_test.@O@ \
210
		${DNSLIBS} ${ISCLIBS} ${LIBS}
Bob Halley's avatar
Bob Halley committed
211

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

Mark Andrews's avatar
Mark Andrews committed
216
rwlock_test@EXEEXT@: rwlock_test.@O@ ${ISCDEPLIBS}
217
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ rwlock_test.@O@ \
218
		${ISCLIBS} ${LIBS}
219

Mark Andrews's avatar
Mark Andrews committed
220
wire_test@EXEEXT@: wire_test.@O@ printmsg.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
221
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ wire_test.@O@ printmsg.@O@ \
222
		${DNSLIBS} ${ISCLIBS} ${LIBS}
223

Mark Andrews's avatar
Mark Andrews committed
224
master_test@EXEEXT@: master_test.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
225
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ master_test.@O@ \
226
		${DNSLIBS} ${ISCLIBS} ${LIBS}
227

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

Mark Andrews's avatar
Mark Andrews committed
232
compress_test@EXEEXT@: compress_test.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
233
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ compress_test.@O@ \
234
		${DNSLIBS} ${ISCLIBS} ${LIBS}
Bob Halley's avatar
Bob Halley committed
235

Mark Andrews's avatar
Mark Andrews committed
236
mempool_test@EXEEXT@: mempool_test.@O@ ${ISCDEPLIBS}
237
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ mempool_test.@O@ \
238
		${ISCLIBS} ${LIBS}
Mark Andrews's avatar
Mark Andrews committed
239

Mark Andrews's avatar
Mark Andrews committed
240
serial_test@EXEEXT@: serial_test.@O@ ${ISCDEPLIBS}
241
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ serial_test.@O@ \
242 243
		${ISCLIBS} ${LIBS}

Mark Andrews's avatar
Mark Andrews committed
244
zone_test@EXEEXT@: zone_test.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
245
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ zone_test.@O@ \
246 247
		${DNSLIBS} ${ISCLIBS} ${LIBS}

Mark Andrews's avatar
Mark Andrews committed
248
fsaccess_test@EXEEXT@: fsaccess_test.@O@ ${ISCDEPLIBS}
249
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ fsaccess_test.@O@ \
David Lawrence's avatar
David Lawrence committed
250 251
		${ISCLIBS} ${LIBS}

Mark Andrews's avatar
Mark Andrews committed
252
inter_test@EXEEXT@: inter_test.@O@ ${ISCDEPLIBS}
253
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ inter_test.@O@ \
Mark Andrews's avatar
Mark Andrews committed
254 255
		${ISCLIBS} ${LIBS}

Mark Andrews's avatar
Mark Andrews committed
256
keyboard_test@EXEEXT@: keyboard_test.@O@ ${ISCDEPLIBS}
257
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ keyboard_test.@O@ \
Michael Graff's avatar
Michael Graff committed
258 259
		${ISCLIBS} ${LIBS}

Mark Andrews's avatar
Mark Andrews committed
260
lwresconf_test@EXEEXT@: lwresconf_test.@O@ ${ISCDEPLIBS} ${LWRESDEPLIBS}
261
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ lwresconf_test.@O@ \
262 263
		${LWRESLIBS} ${ISCLIBS} ${LIBS}

Mark Andrews's avatar
Mark Andrews committed
264
lwres_test@EXEEXT@: lwres_test.@O@ ${ISCDEPLIBS} ${LWRESDEPLIBS}
265
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ lwres_test.@O@ \
266
		${LWRESLIBS} ${ISCLIBS} ${LIBS}
267

Mark Andrews's avatar
Mark Andrews committed
268
gxbn_test@EXEEXT@: gxbn_test.@O@ ${LWRESDEPLIBS}
269
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ gxbn_test.@O@ \
Mark Andrews's avatar
Mark Andrews committed
270 271
		${LWRESLIBS} ${ISCLIBS} ${LIBS}

Mark Andrews's avatar
Mark Andrews committed
272
gxba_test@EXEEXT@: gxba_test.@O@ ${LWRESDEPLIBS}
273
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ gxba_test.@O@ \
Mark Andrews's avatar
Mark Andrews committed
274 275
		${LWRESLIBS} ${ISCLIBS} ${LIBS}

Mark Andrews's avatar
Mark Andrews committed
276
sig0_test@EXEEXT@: sig0_test.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
277
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ sig0_test.@O@ \
278 279
		${DNSLIBS} ${ISCLIBS} ${LIBS}

Mark Andrews's avatar
Mark Andrews committed
280
journalprint@EXEEXT@: journalprint.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
281
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ journalprint.@O@ \
282 283
		${DNSLIBS} ${ISCLIBS} ${LIBS}

Mark Andrews's avatar
Mark Andrews committed
284
cfg_test@EXEEXT@: cfg_test.@O@ ${ISCCFGDEPLIBS} ${ISCDEPLIBS}
285
	${LIBTOOL_MODE_LINK} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ cfg_test.@O@ \
286
		${ISCCFGLIBS} ${DNSLIBS} ${ISCLIBS} ${LIBS}
287

288 289 290
distclean::
	rm -f headerdep_test.sh

291
clean distclean::
292
	rm -f ${TARGETS} ${XTARGETS}
Bob Halley's avatar
Bob Halley committed
293
	rm -f t_journal
James Brister's avatar
James Brister committed
294

295 296
check: test

William King's avatar
William King committed
297
test:
298
	@for dir in $(SUBDIRS) ;\
William King's avatar
William King committed
299
	do \
300
		( cd $$dir; $(MAKE) test ) ;\
William King's avatar
William King committed
301
	done