Makefile.am 2.14 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
AM_CPPFLAGS  = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
AM_CPPFLAGS += $(BOOST_INCLUDES)
AM_CPPFLAGS += -I$(top_srcdir)/src/lib/server_common
AM_CPPFLAGS += -I$(top_builddir)/src/lib/server_common
AM_CXXFLAGS = $(B10_CXXFLAGS)

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

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

CLEANFILES = *.gcno *.gcda

25
TESTS_ENVIRONMENT = \
26
        $(LIBTOOL) --mode=execute $(VALGRIND_COMMAND)
27

28 29 30 31
TESTS =
if HAVE_GTEST
TESTS += run_unittests
run_unittests_SOURCES  = run_unittests.cc
32
run_unittests_SOURCES += client_unittest.cc
33
run_unittests_SOURCES += portconfig_unittest.cc
34
run_unittests_SOURCES += keyring_test.cc
35
run_unittests_SOURCES += socket_requestor_test.cc
36
nodist_run_unittests_SOURCES = data_path.h
37 38 39 40 41

run_unittests_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES)
run_unittests_LDFLAGS = $(AM_LDFLAGS) $(GTEST_LDFLAGS)
run_unittests_LDADD = $(GTEST_LDADD)
run_unittests_LDADD += $(top_builddir)/src/lib/server_common/libserver_common.la
42
run_unittests_LDADD += $(top_builddir)/src/lib/asiolink/libasiolink.la
43
run_unittests_LDADD += $(top_builddir)/src/lib/asiodns/libasiodns.la
44
run_unittests_LDADD += $(top_builddir)/src/lib/cc/libcc.la
45
run_unittests_LDADD += $(top_builddir)/src/lib/log/liblog.la
46 47
run_unittests_LDADD += $(top_builddir)/src/lib/acl/libacl.la
run_unittests_LDADD += $(top_builddir)/src/lib/util/libutil.la
48
run_unittests_LDADD += $(top_builddir)/src/lib/log/liblog.la
jelte's avatar
jelte committed
49
run_unittests_LDADD += $(top_builddir)/src/lib/dns/libdns++.la
50
run_unittests_LDADD += $(top_builddir)/src/lib/util/unittests/libutil_unittests.la
51
run_unittests_LDADD += $(top_builddir)/src/lib/exceptions/libb10-exceptions.la
52 53
run_unittests_LDADD += $(top_builddir)/src/lib/config/libcfgclient.la
run_unittests_LDADD += $(top_builddir)/src/lib/config/tests/libfake_session.la
54 55
endif

56
noinst_PROGRAMS = $(TESTS)
57 58

EXTRA_DIST = testdata/spec.spec