Makefile.am 3.21 KB
Newer Older
1
2
3
4
SUBDIRS = .

AM_CPPFLAGS  = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
AM_CPPFLAGS += $(BOOST_INCLUDES) $(MULTITHREADING_FLAG)
5
AM_CPPFLAGS += -I$(top_srcdir)/src/lib/util -I$(top_builddir)/src/lib/util
6
7
AM_CPPFLAGS += -I$(top_srcdir)/src/lib/dns -I$(top_builddir)/src/lib/dns
AM_CPPFLAGS += -I$(top_srcdir)/src/lib/cache -I$(top_builddir)/src/lib/cache
zhanglikun's avatar
zhanglikun committed
8
9
AM_CPPFLAGS += -DTEST_DATA_SRCDIR=\"$(srcdir)/testdata\"
AM_CPPFLAGS += -DTEST_DATA_BUILDDIR=\"$(abs_top_builddir)/src/lib/cache/tests/testdata\"
10
11
AM_CXXFLAGS = $(B10_CXXFLAGS)

zhanglikun's avatar
zhanglikun committed
12

13
14
15
16
17
18
19
20
AM_LDFLAGS = $(PTHREAD_LDFLAGS)
if USE_STATIC_LINK
AM_LDFLAGS += -static
endif

# Some versions of GCC warn about some versions of Boost regarding
# missing initializer for members in its posix_time.
# https://svn.boost.org/trac/boost/ticket/3477
zhanglikun's avatar
zhanglikun committed
21
# But older GCC compilers don't have the flag.
22
23
24
25
26
27
28
29
30
AM_CXXFLAGS += $(WARNING_NO_MISSING_FIELD_INITIALIZERS_CFLAG)

if USE_CLANGPP
# see ../Makefile.am
AM_CXXFLAGS += -Wno-unused-parameter
endif

CLEANFILES = *.gcno *.gcda

31
TESTS_ENVIRONMENT = \
32
	$(LIBTOOL) --mode=execute $(VALGRIND_COMMAND)
33

34
35
36
37
TESTS =
if HAVE_GTEST
TESTS += run_unittests
run_unittests_SOURCES  = run_unittests.cc
38
39
40
41
42
43
44
45
46
47
run_unittests_SOURCES += $(top_srcdir)/src/lib/dns/tests/unittest_util.cc
run_unittests_SOURCES += rrset_entry_unittest.cc
run_unittests_SOURCES += rrset_cache_unittest.cc
run_unittests_SOURCES += message_cache_unittest.cc
run_unittests_SOURCES += message_entry_unittest.cc
run_unittests_SOURCES += local_zone_data_unittest.cc
run_unittests_SOURCES += resolver_cache_unittest.cc
run_unittests_SOURCES += negative_cache_unittest.cc
run_unittests_SOURCES += cache_test_messagefromfile.h
run_unittests_SOURCES += cache_test_sectioncount.h
48
49

run_unittests_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES)
50
51
run_unittests_LDFLAGS  = $(AM_LDFLAGS) $(GTEST_LDFLAGS)
run_unittests_LDADD    = $(GTEST_LDADD)
52

53
run_unittests_LDADD += $(top_builddir)/src/lib/cache/libb10-cache.la
54
run_unittests_LDADD += $(top_builddir)/src/lib/log/libb10-log.la
55
run_unittests_LDADD += $(top_builddir)/src/lib/nsas/libb10-nsas.la
56
run_unittests_LDADD += $(top_builddir)/src/lib/dns/libb10-dns++.la
57
run_unittests_LDADD += $(top_builddir)/src/lib/util/libb10-util.la
58
run_unittests_LDADD += $(top_builddir)/src/lib/asiolink/libb10-asiolink.la
59
run_unittests_LDADD += $(top_builddir)/src/lib/util/unittests/libutil_unittests.la
60
run_unittests_LDADD += $(top_builddir)/src/lib/exceptions/libb10-exceptions.la
61
62
endif

63
noinst_PROGRAMS = $(TESTS)
Jelte Jansen's avatar
Jelte Jansen committed
64

65
EXTRA_DIST  = testdata/message_cname_referral.wire
66
67
EXTRA_DIST += testdata/message_example_com_soa.wire
EXTRA_DIST += testdata/message_fromWire1
Jelte Jansen's avatar
Jelte Jansen committed
68
69
70
71
72
EXTRA_DIST += testdata/message_fromWire2
EXTRA_DIST += testdata/message_fromWire3
EXTRA_DIST += testdata/message_fromWire4
EXTRA_DIST += testdata/message_fromWire5
EXTRA_DIST += testdata/message_fromWire6
73
74
EXTRA_DIST += testdata/message_fromWire7
EXTRA_DIST += testdata/message_fromWire8
75
EXTRA_DIST += testdata/message_fromWire9
76
EXTRA_DIST += testdata/message_large_ttl.wire
77
78
EXTRA_DIST += testdata/message_nodata_with_soa.wire
EXTRA_DIST += testdata/message_nxdomain_cname.wire
79
EXTRA_DIST += testdata/message_nxdomain_large_ttl.wire
80
81
82
EXTRA_DIST += testdata/message_nxdomain_no_soa.wire
EXTRA_DIST += testdata/message_nxdomain_with_soa.wire
EXTRA_DIST += testdata/message_referral.wire