Makefile.am 2.01 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 25 26 27 28
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
29
run_unittests_SOURCES += client_unittest.cc
30
run_unittests_SOURCES += portconfig_unittest.cc
31
run_unittests_SOURCES += keyring_test.cc
32
nodist_run_unittests_SOURCES = data_path.h
33 34 35 36 37

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
38
run_unittests_LDADD += $(top_builddir)/src/lib/asiolink/libasiolink.la
39
run_unittests_LDADD += $(top_builddir)/src/lib/asiodns/libasiodns.la
40
run_unittests_LDADD += $(top_builddir)/src/lib/cc/libcc.la
41
run_unittests_LDADD += $(top_builddir)/src/lib/log/liblog.la
42 43
run_unittests_LDADD += $(top_builddir)/src/lib/acl/libacl.la
run_unittests_LDADD += $(top_builddir)/src/lib/util/libutil.la
44
run_unittests_LDADD += $(top_builddir)/src/lib/log/liblog.la
jelte's avatar
jelte committed
45
run_unittests_LDADD += $(top_builddir)/src/lib/dns/libdns++.la
46
run_unittests_LDADD += $(top_builddir)/src/lib/util/unittests/libutil_unittests.la
47
run_unittests_LDADD += $(top_builddir)/src/lib/exceptions/libexceptions.la
48 49
run_unittests_LDADD += $(top_builddir)/src/lib/config/libcfgclient.la
run_unittests_LDADD += $(top_builddir)/src/lib/config/tests/libfake_session.la
50 51
endif

52
noinst_PROGRAMS = $(TESTS)
53 54

EXTRA_DIST = testdata/spec.spec