Makefile.am 1.54 KB
Newer Older
1
2
AUTOMAKE_OPTIONS = subdir-objects

Ocean Wang's avatar
Ocean Wang committed
3
4
5
AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
AM_CPPFLAGS += $(BOOST_INCLUDES)
AM_CPPFLAGS += -I$(top_builddir)/src/lib/dns -I$(top_srcdir)/src/bin
6
AM_CPPFLAGS += -I$(top_builddir)/src/lib/cc  -I$(top_builddir)/src/lib/util
Ocean Wang's avatar
Ocean Wang committed
7

8
AM_CXXFLAGS = $(KEA_CXXFLAGS)
Ocean Wang's avatar
Ocean Wang committed
9
10
11
12
13
14
15

if USE_STATIC_LINK
AM_LDFLAGS = -static
endif

CLEANFILES = *.gcno *.gcda

16
TESTS_ENVIRONMENT = \
17
	$(LIBTOOL) --mode=execute $(VALGRIND_COMMAND)
18

Ocean Wang's avatar
Ocean Wang committed
19
20
21
TESTS =
if HAVE_GTEST
TESTS += run_unittests
22
run_unittests_SOURCES  = run_unittests.cc
23
run_unittests_SOURCES += dns_service_unittest.cc
24
run_unittests_SOURCES += dns_server_unittest.cc
25
run_unittests_SOURCES += io_fetch_unittest.cc
Ocean Wang's avatar
Ocean Wang committed
26
27
28
29

run_unittests_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES)

run_unittests_LDADD  = $(GTEST_LDADD)
30
run_unittests_LDADD += $(top_builddir)/src/lib/dns/libkea-dns++.la
31
run_unittests_LDADD += $(top_builddir)/src/lib/util/unittests/libutil_unittests.la
32
33
34
35
36
run_unittests_LDADD += $(top_builddir)/src/lib/util/libkea-util.la
run_unittests_LDADD += $(top_builddir)/src/lib/asiolink/libkea-asiolink.la
run_unittests_LDADD += $(top_builddir)/src/lib/log/libkea-log.la
run_unittests_LDADD += $(top_builddir)/src/lib/exceptions/libkea-exceptions.la
run_unittests_LDADD += $(top_builddir)/src/lib/asiodns/libkea-asiodns.la
Ocean Wang's avatar
Ocean Wang committed
37

38
run_unittests_LDFLAGS = $(AM_LDFLAGS) $(GTEST_LDFLAGS)
Ocean Wang's avatar
Ocean Wang committed
39
40

# Note: the ordering matters: -Wno-... must follow -Wextra (defined in
41
# KEA_CXXFLAGS)
Ocean Wang's avatar
Ocean Wang committed
42
43
44
45
46
47
run_unittests_CXXFLAGS = $(AM_CXXFLAGS)
if USE_GXX
run_unittests_CXXFLAGS += -Wno-unused-parameter
endif
endif

48
noinst_PROGRAMS = $(TESTS)