Makefile.am 3.27 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 31 32 33 34
AM_CXXFLAGS += $(WARNING_NO_MISSING_FIELD_INITIALIZERS_CFLAG)

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

CLEANFILES = *.gcno *.gcda

TESTS =
if HAVE_GTEST
TESTS += run_unittests
run_unittests_SOURCES  = run_unittests.cc
zhanglikun's avatar
zhanglikun committed
35
run_unittests_SOURCES  += $(top_srcdir)/src/lib/dns/tests/unittest_util.cc
36
run_unittests_SOURCES  += rrset_entry_unittest.cc
Ocean Wang's avatar
Ocean Wang committed
37
run_unittests_SOURCES  += rrset_cache_unittest.cc
zhanglikun's avatar
zhanglikun committed
38
run_unittests_SOURCES  += message_cache_unittest.cc
39
run_unittests_SOURCES  += message_entry_unittest.cc
zhanglikun's avatar
zhanglikun committed
40
run_unittests_SOURCES  += local_zone_data_unittest.cc
zhanglikun's avatar
zhanglikun committed
41
run_unittests_SOURCES  += resolver_cache_unittest.cc
42
run_unittests_SOURCES  += negative_cache_unittest.cc
Jelte Jansen's avatar
Jelte Jansen committed
43 44
run_unittests_SOURCES  += cache_test_messagefromfile.h
run_unittests_SOURCES  += cache_test_sectioncount.h
45 46 47 48 49 50 51 52 53 54 55 56 57

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

# NOTE: we may have to clean up this hack later (see the note in configure.ac)
if NEED_LIBBOOST_THREAD
run_unittests_LDADD += -lboost_thread
endif

run_unittests_LDADD += $(top_builddir)/src/lib/cache/libcache.la
run_unittests_LDADD += $(top_builddir)/src/lib/nsas/libnsas.la
run_unittests_LDADD += $(top_builddir)/src/lib/dns/libdns++.la
58 59
run_unittests_LDADD += $(top_builddir)/src/lib/util/unittests/libutil_unittests.la
run_unittests_LDADD += $(top_builddir)/src/lib/util/io/libutil_io.la
60
run_unittests_LDADD += $(top_builddir)/src/lib/util/libutil.la
61
run_unittests_LDADD += $(top_builddir)/src/lib/asiolink/libasiolink.la
62 63 64 65
run_unittests_LDADD += $(top_builddir)/src/lib/exceptions/libexceptions.la
endif

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

67 68 69
EXTRA_DIST = testdata/message_cname_referral.wire
EXTRA_DIST += testdata/message_example_com_soa.wire
EXTRA_DIST += testdata/message_fromWire1
Jelte Jansen's avatar
Jelte Jansen committed
70 71 72 73 74
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
75 76
EXTRA_DIST += testdata/message_fromWire7
EXTRA_DIST += testdata/message_fromWire8
77
EXTRA_DIST += testdata/message_fromWire9
78
EXTRA_DIST += testdata/message_large_ttl.wire
79 80
EXTRA_DIST += testdata/message_nodata_with_soa.wire
EXTRA_DIST += testdata/message_nxdomain_cname.wire
81
EXTRA_DIST += testdata/message_nxdomain_large_ttl.wire
82 83 84
EXTRA_DIST += testdata/message_nxdomain_no_soa.wire
EXTRA_DIST += testdata/message_nxdomain_with_soa.wire
EXTRA_DIST += testdata/message_referral.wire