Makefile.am 2.75 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 += -DTEST_DATA_DIR=\"$(abs_top_srcdir)/src/lib/testutils/testdata\"
Michal Vaner's avatar
Michal Vaner committed
7
AM_CPPFLAGS += -DTEST_DATA_BUILDDIR=\"$(abs_top_builddir)/src/lib/testutils/testdata\"
8
AM_CPPFLAGS += -DINSTALL_PROG=\"$(abs_top_srcdir)/install-sh\"
9

10 11
AM_CXXFLAGS = $(B10_CXXFLAGS)

JINMEI Tatuya's avatar
JINMEI Tatuya committed
12 13 14 15
if USE_STATIC_LINK
AM_LDFLAGS = -static
endif

16 17 18 19
CLEANFILES = *.gcno *.gcda

TESTS =
if HAVE_GTEST
20

21 22 23 24
TESTS += run_unittests
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
25
run_unittests_SOURCES += ../query.h ../query.cc
26
run_unittests_SOURCES += ../change_user.h ../change_user.cc
Michal 'vorner' Vaner's avatar
Michal 'vorner' Vaner committed
27
run_unittests_SOURCES += ../auth_config.h ../auth_config.cc
28
run_unittests_SOURCES += ../command.h ../command.cc
29
run_unittests_SOURCES += ../common.h ../common.cc
30
run_unittests_SOURCES += ../statistics.h ../statistics.cc
31
run_unittests_SOURCES += auth_srv_unittest.cc
32
run_unittests_SOURCES += config_unittest.cc
33
run_unittests_SOURCES += command_unittest.cc
34
run_unittests_SOURCES += common_unittest.cc
35
run_unittests_SOURCES += query_unittest.cc
36
run_unittests_SOURCES += change_user_unittest.cc
37
run_unittests_SOURCES += statistics_unittest.cc
38 39 40 41 42
run_unittests_SOURCES += run_unittests.cc
run_unittests_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES)
run_unittests_LDFLAGS = $(AM_LDFLAGS) $(GTEST_LDFLAGS)
run_unittests_LDADD = $(GTEST_LDADD)
run_unittests_LDADD += $(SQLITE_LIBS)
43
run_unittests_LDADD += $(top_builddir)/src/lib/testutils/libtestutils.la
JINMEI Tatuya's avatar
JINMEI Tatuya committed
44 45
run_unittests_LDADD +=  $(top_builddir)/src/lib/datasrc/libdatasrc.la
run_unittests_LDADD +=  $(top_builddir)/src/lib/dns/libdns++.la
46
run_unittests_LDADD += $(top_builddir)/src/lib/asiodns/libasiodns.la
47
run_unittests_LDADD += $(top_builddir)/src/lib/asiolink/libasiolink.la
JINMEI Tatuya's avatar
JINMEI Tatuya committed
48 49 50 51
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
52
run_unittests_LDADD += $(top_builddir)/src/lib/log/liblog.la
53
run_unittests_LDADD += $(top_builddir)/src/lib/server_common/libserver_common.la
54
run_unittests_LDADD += $(top_builddir)/src/lib/nsas/libnsas.la
55 56 57
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
58 59 60
endif

noinst_PROGRAMS = $(TESTS)