Makefile.am 1.54 KB
Newer Older
Ocean Wang's avatar
Ocean Wang committed
1
AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
2
AM_CPPFLAGS += -I$(top_srcdir)/src/bin
Ocean Wang's avatar
Ocean Wang committed
3
4
AM_CPPFLAGS += $(BOOST_INCLUDES)

5
AM_CXXFLAGS = $(KEA_CXXFLAGS)
Ocean Wang's avatar
Ocean Wang committed
6
7
8
9
10
11
12

if USE_STATIC_LINK
AM_LDFLAGS = -static
endif

CLEANFILES = *.gcno *.gcda

13
TESTS_ENVIRONMENT = \
14
	$(LIBTOOL) --mode=execute $(VALGRIND_COMMAND)
15

Ocean Wang's avatar
Ocean Wang committed
16
17
18
TESTS =
if HAVE_GTEST
TESTS += run_unittests
19
run_unittests_SOURCES  = run_unittests.cc
20
run_unittests_SOURCES += io_fetch_unittest.cc
Ocean Wang's avatar
Ocean Wang committed
21
22
23

run_unittests_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES)

24
25
run_unittests_LDADD  = $(top_builddir)/src/lib/asiodns/libkea-asiodns.la
run_unittests_LDADD += $(top_builddir)/src/lib/asiolink/libkea-asiolink.la
26
run_unittests_LDADD += $(top_builddir)/src/lib/dns/libkea-dns++.la
27
28
29
run_unittests_LDADD += $(top_builddir)/src/lib/cryptolink/libkea-cryptolink.la
run_unittests_LDADD += $(top_builddir)/src/lib/log/libkea-log.la
run_unittests_LDADD += $(top_builddir)/src/lib/util/threads/libkea-threads.la
30
run_unittests_LDADD += $(top_builddir)/src/lib/util/unittests/libutil_unittests.la
31
32
run_unittests_LDADD += $(top_builddir)/src/lib/util/libkea-util.la
run_unittests_LDADD += $(top_builddir)/src/lib/exceptions/libkea-exceptions.la
33
34
run_unittests_LDADD += $(LOG4CPLUS_LIBS) $(CRYPTO_LIBS)
run_unittests_LDADD += $(BOOST_LIBS) $(GTEST_LDADD)
Ocean Wang's avatar
Ocean Wang committed
35

36
run_unittests_LDFLAGS = $(AM_LDFLAGS) $(CRYPTO_LDFLAGS) $(GTEST_LDFLAGS)
Ocean Wang's avatar
Ocean Wang committed
37
38

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

46
noinst_PROGRAMS = $(TESTS)