diff --git a/tests/Makefile.am b/tests/Makefile.am index 0136d41d209d5418889108e12b2510ebfa5af642..bf3a90bb971750d52c4f59eeeae261361861c1de 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -33,11 +33,23 @@ check_PROGRAMS = $(TESTS) api_interactive END = +COMMON_SOURCES = \ + compare-files.cpp \ + compare-files.hpp \ + config-template.cpp \ + config-template.hpp \ + fake-daemon.cpp \ + fake-daemon.hpp \ + test-env.cpp \ + test-env.hpp \ + $(END) + api_CXXFLAGS = \ -Wall -Wextra \ $(END) api_CPPFLAGS = \ + @BOOST_CPPFLAGS@ \ -I$(top_srcdir)/include \ -I$(top_srcdir)/rpc \ -I$(top_srcdir)/src \ @@ -69,24 +81,17 @@ api_SOURCES = \ api-ctl-task-status.cpp \ api-ctl-copy-remote-data.cpp \ api-ctl-remove-local-data.cpp \ - compare-files.cpp \ - compare-files.hpp \ - config-template.cpp \ - config-template.hpp \ - fake-daemon.cpp \ - fake-daemon.hpp \ - test-env.cpp \ - test-env.hpp \ + $(COMMON_SOURCES) \ $(END) api_LDFLAGS = \ - @BOOST_ASIO_LIB@ \ + @BOOST_ASIO_LIB@ \ @BOOST_LDFLAGS@ \ @BOOST_FILESYSTEM_LIB@ \ - @BOOST_PROGRAM_OPTIONS_LIB@ \ - @BOOST_SYSTEM_LIB@ \ - @BOOST_THREAD_LIB@ \ - @BOOST_REGEX_LIB@ \ + @BOOST_PROGRAM_OPTIONS_LIB@ \ + @BOOST_SYSTEM_LIB@ \ + @BOOST_THREAD_LIB@ \ + @BOOST_REGEX_LIB@ \ @PROTOBUF_LIBS@ \ -no-install \ -Wl,-rpath,$(top_builddir)/lib/.libs \ @@ -111,11 +116,11 @@ edit = $(SED) \ config-template.cpp: Makefile $(top_srcdir)/etc/norns.conf.in @( echo "/* This file autogenerated by Makefile */"; \ - echo "#include \"config-template.hpp\""; \ - echo ""; \ - echo "const std::string config_file::cftemplate = "; \ - $(edit) $(top_srcdir)/etc/norns.conf.in ; \ - echo ";"; \ + echo "#include \"config-template.hpp\""; \ + echo ""; \ + echo "const std::string config_file::cftemplate = "; \ + $(edit) $(top_srcdir)/etc/norns.conf.in ; \ + echo ";"; \ ) > $@ # The following produces a version of the api tests where the urd daemon @@ -140,11 +145,12 @@ core_CXXFLAGS = \ $(END) core_CPPFLAGS = \ + @BOOST_CPPFLAGS@ \ -I$(top_srcdir)/include \ - -I$(top_srcdir)/src/externals/hermes/include \ -I$(top_srcdir)/rpc \ -I$(top_srcdir)/src \ - -DUSE_REAL_DAEMON \ + -I$(top_srcdir)/src/externals/hermes/include \ + -D__NORNS_DEBUG__ \ $(END) core_SOURCES = \ @@ -152,22 +158,18 @@ core_SOURCES = \ api-main.cpp \ utils-path-normalize.cpp \ utils-tar.cpp \ - test-env.cpp \ - test-env.hpp \ - compare-files.cpp \ - compare-files.hpp \ + $(COMMON_SOURCES) \ $(END) core_LDFLAGS = \ -no-install \ - -fsanitize=address \ - -fno-omit-frame-pointer \ - @BOOST_ASIO_LIB@ \ + @BOOST_ASIO_LIB@ \ @BOOST_LDFLAGS@ \ @BOOST_FILESYSTEM_LIB@ \ - @BOOST_PROGRAM_OPTIONS_LIB@ \ - @BOOST_SYSTEM_LIB@ \ - @BOOST_THREAD_LIB@ \ + @BOOST_PROGRAM_OPTIONS_LIB@ \ + @BOOST_SYSTEM_LIB@ \ + @BOOST_THREAD_LIB@ \ + @BOOST_REGEX_LIB@ \ @PROTOBUF_LIBS@ \ $(top_builddir)/src/liburd_aux.la \ $(top_builddir)/lib/libnorns_debug.la \