Makefile.am 2.31 KB
Newer Older
1 2 3
SUBDIRS = .

AM_CPPFLAGS  = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
4
AM_CPPFLAGS += $(BOOST_INCLUDES) $(MULTITHREADING_FLAG)
5
AM_CPPFLAGS += -I$(top_srcdir)/src/lib/dns -I$(top_builddir)/src/lib/dns
6
AM_CPPFLAGS += -I$(top_srcdir)/src/lib/util -I$(top_builddir)/src/lib/util
7 8 9
AM_CPPFLAGS += -I$(top_srcdir)/src/lib/nsas -I$(top_builddir)/src/lib/nsas
AM_CXXFLAGS = $(B10_CXXFLAGS)

10
AM_LDFLAGS = $(PTHREAD_LDFLAGS)
11
if USE_STATIC_LINK
12
AM_LDFLAGS += -static
13 14
endif

15 16 17
# 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
18 19
# But older GCC compilers don't have the flag.     
AM_CXXFLAGS += $(WARNING_NO_MISSING_FIELD_INITIALIZERS_CFLAG)
20

21 22 23 24 25
if USE_CLANGPP
# see ../Makefile.am
AM_CXXFLAGS += -Wno-unused-parameter
endif

26 27 28 29 30 31 32
CLEANFILES = *.gcno *.gcda

TESTS =
if HAVE_GTEST
TESTS += run_unittests
run_unittests_SOURCES  = run_unittests.cc
run_unittests_SOURCES += address_entry_unittest.cc
33
run_unittests_SOURCES += hash_deleter_unittest.cc
34
run_unittests_SOURCES += hash_key_unittest.cc
35
run_unittests_SOURCES += hash_table_unittest.cc
36
run_unittests_SOURCES += hash_unittest.cc
37
run_unittests_SOURCES += nameserver_address_unittest.cc
38
run_unittests_SOURCES += nameserver_address_store_unittest.cc
39
run_unittests_SOURCES += nameserver_entry_unittest.cc
40
run_unittests_SOURCES += nsas_entry_compare_unittest.cc
Michal Vaner's avatar
Michal Vaner committed
41
run_unittests_SOURCES += nsas_test.h
Michal Vaner's avatar
Michal Vaner committed
42
run_unittests_SOURCES += zone_entry_unittest.cc
Michal Vaner's avatar
Michal Vaner committed
43
run_unittests_SOURCES += fetchable_unittest.cc
44 45 46 47

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

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

run_unittests_LDADD += $(top_builddir)/src/lib/nsas/libnsas.la
run_unittests_LDADD += $(top_builddir)/src/lib/dns/libdns++.la
56
run_unittests_LDADD += $(top_builddir)/src/lib/asiolink/libasiolink.la
57 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
run_unittests_LDADD += $(top_builddir)/src/lib/util/libutil.la
60 61 62 63
run_unittests_LDADD += $(top_builddir)/src/lib/exceptions/libexceptions.la
endif

noinst_PROGRAMS = $(TESTS)