Makefile.am 3.22 KB
Newer Older
1
2
3
SUBDIRS = .

AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
4
AM_CPPFLAGS += -I$(top_builddir)/src/hooks/dhcp/user_chk -I$(top_srcdir)/src/hooks/dhcp/user_chk
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
AM_CPPFLAGS += $(BOOST_INCLUDES) $(BOTAN_INCLUDES)
AM_CPPFLAGS += -DTEST_DATA_BUILDDIR=\"$(abs_top_builddir)/src/hooks/dhcp/user_chk/tests\"
AM_CPPFLAGS += -DINSTALL_PROG=\"$(abs_top_srcdir)/install-sh\"

AM_CXXFLAGS = $(B10_CXXFLAGS)

# 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
# But older GCC compilers don't have the flag.
AM_CXXFLAGS += $(WARNING_NO_MISSING_FIELD_INITIALIZERS_CFLAG)

USER_CHK_LIB = $(top_builddir)/src/hooks/dhcp/user_chk/libdhcp_user_chk.la

if USE_STATIC_LINK
AM_LDFLAGS = -static
endif

23
24
25
# Unit test data files need to get installed.
EXTRA_DIST = test_users_1.txt   test_users_err.txt

26
27
28
29
30
31
32
33
34
35
CLEANFILES = *.gcno *.gcda

TESTS_ENVIRONMENT = \
	$(LIBTOOL) --mode=execute $(VALGRIND_COMMAND)

TESTS =
if HAVE_GTEST
TESTS += libdhcp_user_chk_unittests

libdhcp_user_chk_unittests_SOURCES  = 
36
37
38
libdhcp_user_chk_unittests_SOURCES += ../load_unload.cc
libdhcp_user_chk_unittests_SOURCES += ../subnet_select_co.cc
libdhcp_user_chk_unittests_SOURCES += ../version.cc
39
libdhcp_user_chk_unittests_SOURCES += ../user.cc ../user.h
40
# Until logging in dynamically loaded libraries is fixed, exclude these.
41
#libdhcp_user_chk_unittests_SOURCES += ../user_chk_log.cc ../user_chk_log.h
42
#libdhcp_user_chk_unittests_SOURCES += ../user_chk_messages.cc ../user_chk_messages.h
43
libdhcp_user_chk_unittests_SOURCES += ../user_data_source.h
44
libdhcp_user_chk_unittests_SOURCES += ../user_file.cc ../user_file.h
45
46
47
48
49
libdhcp_user_chk_unittests_SOURCES += ../user_registry.cc ../user_registry.h
libdhcp_user_chk_unittests_SOURCES += run_unittests.cc
libdhcp_user_chk_unittests_SOURCES += userid_unittests.cc
libdhcp_user_chk_unittests_SOURCES += user_unittests.cc
libdhcp_user_chk_unittests_SOURCES += user_registry_unittests.cc
50
libdhcp_user_chk_unittests_SOURCES += user_file_unittests.cc
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65

libdhcp_user_chk_unittests_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES) $(LOG4CPLUS_INCLUDES)

libdhcp_user_chk_unittests_LDFLAGS  = $(AM_LDFLAGS)  $(GTEST_LDFLAGS)

libdhcp_user_chk_unittests_CXXFLAGS = $(AM_CXXFLAGS)
if USE_CLANGPP
# This is to workaround unused variables tcout and tcerr in
# log4cplus's streams.h and unused parameters from some of the
# Boost headers.
libdhcp_user_chk_unittests_CXXFLAGS += -Wno-unused-parameter
endif

libdhcp_user_chk_unittests_LDADD = $(top_builddir)/src/lib/log/libb10-log.la
libdhcp_user_chk_unittests_LDADD += $(top_builddir)/src/lib/util/libb10-util.la
66
libdhcp_user_chk_unittests_LDADD += $(top_builddir)/src/lib/hooks/libb10-hooks.la
67
68
libdhcp_user_chk_unittests_LDADD += $(top_builddir)/src/lib/dhcp/libb10-dhcp++.la
libdhcp_user_chk_unittests_LDADD += $(top_builddir)/src/lib/exceptions/libb10-exceptions.la
69
libdhcp_user_chk_unittests_LDADD += $(top_builddir)/src/lib/cc/libb10-cc.la
70
71
72
73
libdhcp_user_chk_unittests_LDADD += ${BOTAN_LIBS} ${BOTAN_RPATH}
libdhcp_user_chk_unittests_LDADD += $(GTEST_LDADD)
endif
noinst_PROGRAMS = $(TESTS)
74
75
76

libdhcp_user_chk_unittestsdir = $(abs_top_builddir)/src/hooks/dhcp/user_chk/tests
libdhcp_user_chk_unittests_DATA = test_users_1.txt test_users_err.txt