1SUBDIRS = . 2 3AM_CPPFLAGS = $(ATF_CFLAGS) -DUNIT_TEST -I$(top_srcdir)/includes 4AM_CPPFLAGS += -I$(top_srcdir)/bind/include -I$(top_srcdir) 5AM_CPPFLAGS += -DLOCALSTATEDIR='"."' 6 7EXTRA_DIST = Atffile 8 9# for autotools debugging only 10info: 11 @echo "ATF_CFLAGS=$(ATF_CFLAGS)" 12 @echo "ATF_LDFLAGS=$(ATF_LDFLAGS)" 13 @echo "ATF_LIBS=$(ATF_LIBS)" 14 15DHCPSRC = ../dhcp.c ../bootp.c ../confpars.c ../db.c ../class.c \ 16 ../failover.c ../omapi.c ../mdb.c ../stables.c ../salloc.c \ 17 ../ddns.c ../dhcpleasequery.c ../dhcpv6.c ../mdb6.c \ 18 ../ldap.c ../ldap_casa.c ../dhcpd.c 19 20DHCPLIBS = $(top_builddir)/common/libdhcp.a $(top_builddir)/omapip/libomapi.a \ 21 $(top_builddir)/dhcpctl/libdhcpctl.a $(top_builddir)/bind/lib/libirs.a \ 22 $(top_builddir)/bind/lib/libdns.a $(top_builddir)/bind/lib/libisccfg.a \ 23 $(top_builddir)/bind/lib/libisc.a 24 25ATF_TESTS = 26TESTS = 27if HAVE_ATF 28 29check: $(ATF_TESTS) 30 atf-run | atf-report 31 32ATF_TESTS += dhcpd_unittests legacy_unittests hash_unittests load_bal_unittests 33 34dhcpd_unittests_SOURCES = $(DHCPSRC) 35dhcpd_unittests_SOURCES += simple_unittest.c 36 37dhcpd_unittests_LDADD = $(ATF_LDFLAGS) 38dhcpd_unittests_LDADD += $(DHCPLIBS) 39 40dhcpd_unittests_LDFLAGS = $(AM_LDFLAGS) $(ATF_LDFLAGS) 41 42hash_unittests_SOURCES = $(DHCPSRC) hash_unittest.c 43hash_unittests_LDADD = $(DHCPLIBS) $(ATF_LDFLAGS) 44 45 46# This is a legacy unittest. It replaces main() with something that was in mdb6.c 47legacy_unittests_SOURCES = $(DHCPSRC) mdb6_unittest.c 48legacy_unittests_LDADD = $(DHCPLIBS) $(ATF_LDFLAGS) 49 50load_bal_unittests_SOURCES = $(DHCPSRC) load_bal_unittest.c 51load_bal_unittests_LDADD = $(DHCPLIBS) $(ATF_LDFLAGS) 52 53endif 54 55check_PROGRAMS = $(ATF_TESTS) $(TESTS) 56