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

AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
4
AM_CPPFLAGS += $(BOOST_INCLUDES)
5 6 7 8 9 10 11 12 13 14 15
AM_CXXFLAGS = $(B10_CXXFLAGS)

if USE_STATIC_LINK
AM_LDFLAGS = -static
endif

CLEANFILES = *.gcno *.gcda

TESTS =
if HAVE_GTEST
TESTS += run_unittests
16 17
run_unittests_SOURCES  = run_unittests.cc
run_unittests_SOURCES += log_formatter_unittest.cc
18
run_unittests_SOURCES += logger_level_impl_unittest.cc
19
run_unittests_SOURCES += logger_level_unittest.cc
Stephen Morris's avatar
Stephen Morris committed
20
run_unittests_SOURCES += logger_manager_unittest.cc
21
run_unittests_SOURCES += logger_unittest.cc
22
run_unittests_SOURCES += logger_specification_unittest.cc
Stephen Morris's avatar
Stephen Morris committed
23 24 25 26 27 28
# run_unittests_SOURCES += message_dictionary_unittest.cc
# run_unittests_SOURCES += message_initializer_unittest_2.cc
# run_unittests_SOURCES += message_initializer_unittest.cc
# run_unittests_SOURCES += message_reader_unittest.cc
# run_unittests_SOURCES += output_option_unittest.cc
# run_unittests_SOURCES += root_logger_name_unittest.cc
29

30 31
run_unittests_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES) $(LOG4CPLUS_INCLUDES)
run_unittests_LDFLAGS  = $(AM_LDFLAGS)  $(GTEST_LDFLAGS)
32

33 34
run_unittests_CXXFLAGS = $(AM_CXXFLAGS)
if USE_CLANGPP
35 36 37
# This is to workaround unused variables tcout and tcerr in
# log4cplus's streams.h.
run_unittests_CXXFLAGS += -Wno-unused-variable
38
endif
39 40
run_unittests_LDADD  = $(GTEST_LDADD)
run_unittests_LDADD += $(top_builddir)/src/lib/log/liblog.la
41
run_unittests_LDADD += $(top_builddir)/src/lib/util/libutil.la
Stephen Morris's avatar
Stephen Morris committed
42
run_unittests_LDADD += $(top_builddir)/src/lib/exceptions/libexceptions.la
43
run_unittests_LDADD += $(top_builddir)/src/lib/util/unittests/libutil_unittests.la
44 45
endif

46 47 48 49 50 51
TESTS += logger_example
logger_example_SOURCES = logger_example.cc
logger_example_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES)
logger_example_LDFLAGS = $(AM_LDFLAGS) $(LOG4CPLUS_LDFLAGS)
logger_example_LDADD  = $(top_builddir)/src/lib/log/liblog.la
logger_example_LDADD += $(top_builddir)/src/lib/util/libutil.la
52

53
noinst_PROGRAMS = $(TESTS)
54 55

# Additional test using the shell
56
PYTESTS = console_test.sh local_file_test.sh severity_test.sh
57
check-local:
58
	$(SHELL) $(abs_builddir)/console_test.sh
59 60
	$(SHELL) $(abs_builddir)/local_file_test.sh
	$(SHELL) $(abs_builddir)/severity_test.sh