Makefile.am 3.59 KB
Newer Older
1
AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
2
AM_CPPFLAGS += -I$(top_builddir)/src/bin # for generated spec_config.h header
3
AM_CPPFLAGS += -I$(top_builddir)/src/lib/dns -I$(top_srcdir)/src/bin
4
AM_CPPFLAGS += -I$(top_builddir)/src/lib/cc
5
AM_CPPFLAGS += $(BOOST_INCLUDES)
6
AM_CPPFLAGS += -DAUTH_OBJ_DIR=\"$(abs_top_builddir)/src/bin/auth\"
7
AM_CPPFLAGS += -DTEST_DATA_DIR=\"$(abs_top_srcdir)/src/lib/testutils/testdata\"
Michal Vaner's avatar
Michal Vaner committed
8
AM_CPPFLAGS += -DTEST_DATA_BUILDDIR=\"$(abs_top_builddir)/src/lib/testutils/testdata\"
9
AM_CPPFLAGS += -DINSTALL_PROG=\"$(abs_top_srcdir)/install-sh\"
10

11 12
AM_CXXFLAGS = $(B10_CXXFLAGS)

JINMEI Tatuya's avatar
JINMEI Tatuya committed
13 14
if USE_STATIC_LINK
AM_LDFLAGS = -static
15 16 17
# Some test cases cannot work with static link.  To selectively disable such
# tests we signal it via a definition.
AM_CPPFLAGS += -DUSE_STATIC_LINK=1
JINMEI Tatuya's avatar
JINMEI Tatuya committed
18 19
endif

20 21
CLEANFILES = *.gcno *.gcda

22 23
# Do not define global tests, use check-local so
# environment can be set (needed for dynamic loading)
24 25
TESTS =
if HAVE_GTEST
26

27 28 29
run_unittests_SOURCES = $(top_srcdir)/src/lib/dns/tests/unittest_util.h
run_unittests_SOURCES += $(top_srcdir)/src/lib/dns/tests/unittest_util.cc
run_unittests_SOURCES += ../auth_srv.h ../auth_srv.cc
30
run_unittests_SOURCES += ../auth_log.h ../auth_log.cc
31
run_unittests_SOURCES += ../query.h ../query.cc
Michal 'vorner' Vaner's avatar
Michal 'vorner' Vaner committed
32
run_unittests_SOURCES += ../auth_config.h ../auth_config.cc
33
run_unittests_SOURCES += ../command.h ../command.cc
34
run_unittests_SOURCES += ../common.h ../common.cc
35
run_unittests_SOURCES += ../statistics.h ../statistics.cc
36
run_unittests_SOURCES += datasrc_util.h datasrc_util.cc
37
run_unittests_SOURCES += auth_srv_unittest.cc
38
run_unittests_SOURCES += config_unittest.cc
39
run_unittests_SOURCES += config_syntax_unittest.cc
40
run_unittests_SOURCES += command_unittest.cc
41
run_unittests_SOURCES += common_unittest.cc
42
run_unittests_SOURCES += query_unittest.cc
43
run_unittests_SOURCES += statistics_unittest.cc
44
run_unittests_SOURCES += run_unittests.cc
45 46 47 48 49 50 51
# This is a temporary workaround for #1206, where the InMemoryClient has been
# moved to an ldopened library. We could add that library to LDADD, but that
# is nonportable. When #1207 is done this becomes moot anyway, and the
# specific workaround is not needed anymore, so we can then remove this
# line again.
run_unittests_SOURCES += ${top_srcdir}/src/lib/datasrc/memory_datasrc.cc

52 53 54

nodist_run_unittests_SOURCES = ../auth_messages.h ../auth_messages.cc

55 56 57 58
run_unittests_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES)
run_unittests_LDFLAGS = $(AM_LDFLAGS) $(GTEST_LDFLAGS)
run_unittests_LDADD = $(GTEST_LDADD)
run_unittests_LDADD += $(SQLITE_LIBS)
59
run_unittests_LDADD += $(top_builddir)/src/lib/testutils/libtestutils.la
JINMEI Tatuya's avatar
JINMEI Tatuya committed
60 61
run_unittests_LDADD +=  $(top_builddir)/src/lib/datasrc/libdatasrc.la
run_unittests_LDADD +=  $(top_builddir)/src/lib/dns/libdns++.la
62
run_unittests_LDADD += $(top_builddir)/src/lib/util/libutil.la
63
run_unittests_LDADD += $(top_builddir)/src/lib/asiodns/libasiodns.la
64
run_unittests_LDADD += $(top_builddir)/src/lib/asiolink/libasiolink.la
JINMEI Tatuya's avatar
JINMEI Tatuya committed
65 66 67 68
run_unittests_LDADD += $(top_builddir)/src/lib/config/libcfgclient.la
run_unittests_LDADD += $(top_builddir)/src/lib/cc/libcc.la
run_unittests_LDADD += $(top_builddir)/src/lib/exceptions/libexceptions.la
run_unittests_LDADD += $(top_builddir)/src/lib/xfr/libxfr.la
69
run_unittests_LDADD += $(top_builddir)/src/lib/log/liblog.la
70
run_unittests_LDADD += $(top_builddir)/src/lib/server_common/libserver_common.la
71
run_unittests_LDADD += $(top_builddir)/src/lib/nsas/libnsas.la
72
run_unittests_LDADD += $(top_builddir)/src/lib/util/unittests/libutil_unittests.la
73
run_unittests_LDADD += $(top_builddir)/src/lib/statistics/libstatistics.la
74 75 76

check-local:
       B10_FROM_BUILD=${abs_top_builddir} ./run_unittests
77 78
endif