3 AM_CPPFLAGS = $(ATF_CFLAGS) -DUNIT_TEST -I$(top_srcdir)/includes
4 AM_CPPFLAGS += -I@BINDDIR@/include -I$(top_srcdir)
5 AM_CPPFLAGS += -DLOCALSTATEDIR='"."'
7 EXTRA_DIST = Atffile Kyuafile
9 # for autotools debugging only
11 @echo "ATF_CFLAGS=$(ATF_CFLAGS)"
12 @echo "ATF_LDFLAGS=$(ATF_LDFLAGS)"
13 @echo "ATF_LIBS=$(ATF_LIBS)"
15 DHCPSRC = ../dhcrelay.c
17 DHCPLIBS = $(top_builddir)/common/libdhcp.@A@ \
18 $(top_builddir)/omapip/libomapi.@A@ \
19 @BINDLIBIRSDIR@/libirs.@A@ \
20 @BINDLIBDNSDIR@/libdns.@A@ \
21 @BINDLIBISCCFGDIR@/libisccfg.@A@ \
22 @BINDLIBISCDIR@/libisc.@A@
27 ATF_TESTS += relay_unittests
29 relay_unittests_SOURCES = $(DHCPSRC)
30 relay_unittests_SOURCES += relay_unittests.c
32 relay_unittests_LDADD = $(ATF_LDFLAGS)
33 relay_unittests_LDADD += $(DHCPLIBS)
36 @if test $(top_srcdir) != ${top_builddir}; then \
37 cp $(top_srcdir)/relay/tests/Atffile Atffile; \
38 cp $(top_srcdir)/relay/tests/Kyuafile Kyuafile; \
40 sh ${top_builddir}/tests/unittest.sh
43 @if test $(top_srcdir) != ${top_builddir}; then \
44 rm -f Atffile Kyuafile; \
49 check_PROGRAMS = $(ATF_TESTS)