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