]> git.ipfire.org Git - thirdparty/dhcp.git/blob - relay/tests/Makefile.am
0aa8df4864cd12437b2874d37a09523c94a7d207
[thirdparty/dhcp.git] / relay / tests / Makefile.am
1 SUBDIRS = .
2
3 AM_CPPFLAGS = $(ATF_CFLAGS) -DUNIT_TEST -I$(top_srcdir)/includes
4 AM_CPPFLAGS += -I@BINDDIR@/include -I$(top_srcdir)
5 AM_CPPFLAGS += -DLOCALSTATEDIR='"."'
6
7 EXTRA_DIST = Atffile Kyuafile
8
9 # for autotools debugging only
10 info:
11 @echo "ATF_CFLAGS=$(ATF_CFLAGS)"
12 @echo "ATF_LDFLAGS=$(ATF_LDFLAGS)"
13 @echo "ATF_LIBS=$(ATF_LIBS)"
14
15 DHCPSRC = ../dhcrelay.c
16
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@
23
24 ATF_TESTS =
25 if HAVE_ATF
26
27 ATF_TESTS += relay_unittests
28
29 relay_unittests_SOURCES = $(DHCPSRC)
30 relay_unittests_SOURCES += relay_unittests.c
31
32 relay_unittests_LDADD = $(ATF_LDFLAGS)
33 relay_unittests_LDADD += $(DHCPLIBS)
34
35 check: $(ATF_TESTS)
36 @if test $(top_srcdir) != ${top_builddir}; then \
37 cp $(top_srcdir)/relay/tests/Atffile Atffile; \
38 cp $(top_srcdir)/relay/tests/Kyuafile Kyuafile; \
39 fi
40 sh ${top_builddir}/tests/unittest.sh
41
42 distclean-local:
43 @if test $(top_srcdir) != ${top_builddir}; then \
44 rm -f Atffile Kyuafile; \
45 fi
46
47 endif
48
49 check_PROGRAMS = $(ATF_TESTS)