Makefile.am 1.39 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 += portconfig_unittest.cc
30 31 32 33 34 35

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
36 37
run_unittests_LDADD += $(top_builddir)/src/lib/exceptions/libexceptions.la
run_unittests_LDADD += $(top_builddir)/src/lib/asiolink/libasiolink.la
38
run_unittests_LDADD += $(top_builddir)/src/lib/asiodns/libasiodns.la
39
run_unittests_LDADD += $(top_builddir)/src/lib/cc/libcc.la
jelte's avatar
jelte committed
40
run_unittests_LDADD += $(top_builddir)/src/lib/dns/libdns++.la
41 42 43
endif

noinst_PROGRAMS = $(TESTS)