1# Copyright (C) Internet Systems Consortium, Inc. ("ISC") 2# 3# This Source Code Form is subject to the terms of the Mozilla Public 4# License, v. 2.0. If a copy of the MPL was not distributed with this 5# file, You can obtain one at http://mozilla.org/MPL/2.0/. 6# 7# See the COPYRIGHT file distributed with this work for additional 8# information regarding copyright ownership. 9 10srcdir = @srcdir@ 11VPATH = @srcdir@ 12top_srcdir = @top_srcdir@ 13 14@BIND9_MAKE_INCLUDES@ 15 16CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES} ${ISCCFG_INCLUDES} \ 17 ${OPENSSL_CFLAGS} 18 19CDEFINES = 20CWARNINGS = 21BACKTRACECFLAGS = @BACKTRACECFLAGS@ 22 23DNSLIBS = ../../lib/dns/libdns.@A@ @NO_LIBTOOL_DNSLIBS@ 24ISCLIBS = ../../lib/isc/libisc.@A@ @NO_LIBTOOL_ISCLIBS@ 25ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @NO_LIBTOOL_ISCLIBS 26ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@ 27 28DNSDEPLIBS = ../../lib/dns/libdns.@A@ 29ISCDEPLIBS = ../../lib/isc/libisc.@A@ 30ISCDEPNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ 31ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@ 32 33LIBS = @LIBS@ 34 35SUBDIRS = system @PKCS11_TOOLS@ 36TESTDIRS = system 37 38# Test programs that are built by default: 39# cfg_test is needed for regenerating doc/misc/options 40# makejournal is needed by system tests 41# wire_test is needed for fuzz testing 42# other opptional test programs have been moved to ./optional 43 44# Alphabetically 45XTARGETS = all_tests 46TARGETS = cfg_test@EXEEXT@ makejournal@EXEEXT@ \ 47 wire_test@EXEEXT@ @XTARGETS@ 48 49SRCS = cfg_test.c makejournal.c wire_test.c 50 51@BIND9_MAKE_RULES@ 52 53.NOTPARALLEL: 54 55.PHONY: 56all_tests: 57 echo "making depend in `pwd`/optional"; \ 58 (cd optional; ${MAKE} ${MAKEDEFS} DESTDIR="${DESTDIR}" $@) 59 60wire_test@EXEEXT@: wire_test.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} 61 ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ wire_test.@O@ \ 62 ${DNSLIBS} ${ISCLIBS} ${LIBS} 63 64cfg_test@EXEEXT@: cfg_test.@O@ ${ISCCFGDEPLIBS} ${ISCDEPLIBS} 65 ${LIBTOOL_MODE_LINK} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ cfg_test.@O@ \ 66 ${ISCCFGLIBS} ${DNSLIBS} ${ISCLIBS} ${LIBS} 67 68makejournal@EXEEXT@: makejournal.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} 69 ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ makejournal.@O@ \ 70 ${DNSLIBS} ${ISCLIBS} ${LIBS} 71 72distclean:: 73 rm -f headerdep_test.sh 74 75clean distclean:: 76 rm -f ${TARGETS} 77 ( cd optional; $(MAKE) $@) 78 79check: test 80 81test: 82 @for dir in $(TESTDIRS) ;\ 83 do \ 84 ( cd $$dir; $(MAKE) test ) ;\ 85 done 86