diff --git a/examples/multiprocess_c/Makefile.am b/examples/multiprocess_c/Makefile.am index 8c7aac91..97788def 100644 --- a/examples/multiprocess_c/Makefile.am +++ b/examples/multiprocess_c/Makefile.am @@ -6,14 +6,18 @@ multi_SOURCES = \ multi.c multi_LDADD = \ + $(SSDEEP_LDADD) \ + $(LUA_LDADD) \ + $(GLOBAL_LDADD) + +multi_LDFLAGS = \ -L$(top_builddir)/src/.libs/ \ + $(GEOIP_LDFLAGS) \ -lmodsecurity \ -lpthread \ - $(YAJL_LDFLAGS) \ - $(GEOIP_LDFLAGS) \ - $(SSDEEP_LDFLAGS) $(SSDEEP_LDADD) \ - $(LUA_LDFLAGS) $(LUA_LDADD) \ - $(GLOBAL_LDADD) + $(LUA_LDFLAGS) \ + $(SSDEEP_LDFLAGS) \ + $(YAJL_LDFLAGS) multi_CFLAGS = \ -I$(top_builddir)/headers \ diff --git a/examples/reading_logs_via_rule_message/Makefile.am b/examples/reading_logs_via_rule_message/Makefile.am index 57b33335..784c5769 100644 --- a/examples/reading_logs_via_rule_message/Makefile.am +++ b/examples/reading_logs_via_rule_message/Makefile.am @@ -6,18 +6,24 @@ simple_request_SOURCES = \ simple_request.cc simple_request_LDADD = \ - $(top_builddir)/src/.libs/libmodsecurity.a \ - -lpthread \ $(CURL_LDADD) \ - $(GEOIP_LDFLAGS) $(GEOIP_LDADD) \ - $(PCRE_LDADD) \ - $(YAJL_LDFLAGS) $(YAJL_LDADD) \ - $(LMDB_LDFLAGS) $(LMDB_LDADD) \ - $(SSDEEP_LDFLAGS) $(SSDEEP_LDADD) \ - $(LUA_LDFLAGS) $(LUA_LDADD) \ + $(GEOIP_LDADD) \ + $(GLOBAL_LDADD) \ $(LIBXML2_LDADD) \ - $(GLOBAL_LDADD) + $(LMDB_LDADD) \ + $(LUA_LDADD) \ + $(PCRE_LDADD) \ + $(SSDEEP_LDADD) \ + $(top_builddir)/src/.libs/libmodsecurity.a \ + $(YAJL_LDADD) +simple_request_LDFLAGS = \ + $(GEOIP_LDFLAGS) \ + $(LMDB_LDFLAGS) \ + -lpthread \ + $(LUA_LDFLAGS) \ + $(SSDEEP_LDFLAGS) \ + $(YAJL_LDFLAGS) simple_request_CPPFLAGS = \ $(GLOBAL_CFLAGS) \ diff --git a/examples/reading_logs_with_offset/Makefile.am b/examples/reading_logs_with_offset/Makefile.am index 855bd660..f0394b28 100644 --- a/examples/reading_logs_with_offset/Makefile.am +++ b/examples/reading_logs_with_offset/Makefile.am @@ -6,17 +6,23 @@ read_SOURCES = \ read.cc read_LDADD = \ - $(top_builddir)/src/.libs/libmodsecurity.a \ $(CURL_LDADD) \ - $(GEOIP_LDFLAGS) $(GEOIP_LDADD) \ - $(PCRE_LDADD) \ - $(YAJL_LDFLAGS) $(YAJL_LDADD) \ - $(LMDB_LDFLAGS) $(LMDB_LDADD) \ - $(SSDEEP_LDFLAGS) $(SSDEEP_LDADD) \ - $(LUA_LDFLAGS) $(LUA_LDADD) \ + $(GEOIP_LDADD) \ + $(GLOBAL_LDADD) \ $(LIBXML2_LDADD) \ - $(GLOBAL_LDADD) + $(LMDB_LDADD) \ + $(LUA_LDADD) \ + $(PCRE_LDADD) \ + $(SSDEEP_LDADD) \ + $(top_builddir)/src/.libs/libmodsecurity.a \ + $(YAJL_LDADD) +read_LDFLAGS = \ + $(GEOIP_LDFLAGS) \ + $(LMDB_LDFLAGS) \ + $(LUA_LDFLAGS) \ + $(SSDEEP_LDFLAGS) \ + $(YAJL_LDFLAGS) read_CPPFLAGS = \ $(GLOBAL_CFLAGS) \ diff --git a/examples/simple_example_using_c/Makefile.am b/examples/simple_example_using_c/Makefile.am index 0979e265..450e0220 100644 --- a/examples/simple_example_using_c/Makefile.am +++ b/examples/simple_example_using_c/Makefile.am @@ -6,13 +6,17 @@ test_SOURCES = \ test.c test_LDADD = \ + $(GLOBAL_LDADD) \ + $(LUA_LDADD) \ + $(SSDEEP_LDADD) + +test_LDFLAGS = \ -L$(top_builddir)/src/.libs/ \ - -lmodsecurity \ - $(YAJL_LDFLAGS) \ $(GEOIP_LDFLAGS) \ - $(SSDEEP_LDFLAGS) $(SSDEEP_LDADD) \ - $(LUA_LDFLAGS) $(LUA_LDADD) \ - $(GLOBAL_LDADD) + -lmodsecurity \ + $(LUA_LDFLAGS) \ + $(SSDEEP_LDFLAGS) \ + $(YAJL_LDFLAGS) test_CFLAGS = \ -I$(top_builddir)/headers \ diff --git a/examples/using_bodies_in_chunks/Makefile.am b/examples/using_bodies_in_chunks/Makefile.am index 57b33335..34ef14fd 100644 --- a/examples/using_bodies_in_chunks/Makefile.am +++ b/examples/using_bodies_in_chunks/Makefile.am @@ -6,18 +6,24 @@ simple_request_SOURCES = \ simple_request.cc simple_request_LDADD = \ - $(top_builddir)/src/.libs/libmodsecurity.a \ - -lpthread \ $(CURL_LDADD) \ - $(GEOIP_LDFLAGS) $(GEOIP_LDADD) \ - $(PCRE_LDADD) \ - $(YAJL_LDFLAGS) $(YAJL_LDADD) \ - $(LMDB_LDFLAGS) $(LMDB_LDADD) \ - $(SSDEEP_LDFLAGS) $(SSDEEP_LDADD) \ - $(LUA_LDFLAGS) $(LUA_LDADD) \ + $(GEOIP_LDADD) \ + $(GLOBAL_LDADD) \ $(LIBXML2_LDADD) \ - $(GLOBAL_LDADD) + $(LMDB_LDADD) \ + $(LUA_LDADD) \ + $(PCRE_LDADD) \ + $(SSDEEP_LDADD) \ + $(top_builddir)/src/.libs/libmodsecurity.a \ + $(YAJL_LDADD) +simple_request_LDFLAGS = \ + $(GEOIP_LDFLAGS) \ + $(LMDB_LDFLAGS) \ + -lpthread \ + $(LUA_LDFLAGS) \ + $(SSDEEP_LDFLAGS) \ + $(YAJL_LDFLAGS) simple_request_CPPFLAGS = \ $(GLOBAL_CFLAGS) \ @@ -37,7 +43,6 @@ simple_request_CPPFLAGS = \ $(PCRE_CFLAGS) \ $(LIBXML2_CFLAGS) - MAINTAINERCLEANFILES = \ Makefile.in diff --git a/src/Makefile.am b/src/Makefile.am index dc478a5a..c4d3f767 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -8,7 +8,6 @@ SUBDIRS = \ $(MAYBE_PARSER) - lib_LTLIBRARIES = libmodsecurity.la libmodsecurity_ladir = $(prefix)/include libmodsecurity_includesub_collectiondir = $(pkgincludedir)/collection/ @@ -28,6 +27,7 @@ EXTRA_DIST = \ parser/seclang-scanner.ll \ parser/stack.hh + MAINTAINERCLEANFILES = \ Makefile.in \ config.h.in \ @@ -51,13 +51,11 @@ pkginclude_HEADERS = \ ../headers/modsecurity/variable_value.h - libmodsecurity_includesub_collection_HEADERS = \ ../headers/modsecurity/collection/collection.h \ ../headers/modsecurity/collection/collections.h - libmodsecurity_includesub_actions_HEADERS = \ ../headers/modsecurity/actions/action.h @@ -243,7 +241,6 @@ UTILS = \ utils/shared_files.cc - COLLECTION = \ collection/collections.cc \ collection/backend/in_memory-per_process.cc \ @@ -309,21 +306,31 @@ libmodsecurity_la_CPPFLAGS = \ $(LUA_CFLAGS) \ $(LIBXML2_CFLAGS) -libmodsecurity_la_LIBADD = \ - $(GLOBAL_LDADD) \ - $(CURL_LDADD) \ - $(GEOIP_LDFLAGS) $(GEOIP_LDADD) \ - $(PCRE_LDADD) \ - $(YAJL_LDFLAGS) $(YAJL_LDADD) \ - $(LMDB_LDFLAGS) $(LMDB_LDADD) \ - $(SSDEEP_LDFLAGS) $(SSDEEP_LDADD) \ - $(LUA_LDFLAGS) $(LUA_LDADD) \ - $(LIBXML2_LDADD) \ - ../others/libinjection.la \ - ../others/libmbedtls.la - libmodsecurity_la_LDFLAGS = \ + $(CURL_LDFLAGS) \ + $(GEOIP_LDFLAGS) \ + $(GLOBAL_LDFLAGS) \ + $(LDFLAGS) \ + $(LIBXML2_LDFLAGS) \ + $(LMDB_LDFLAGS) \ + $(LUA_LDFLAGS) \ + $(PCRE_LDFLAGS) \ + $(SSDEEP_LDFLAGS) \ + $(YAJL_LDFLAGS) \ -version-info @MSC_VERSION_INFO@ +libmodsecurity_la_LIBADD = \ + $(CURL_LDADD) \ + $(GEOIP_LDADD) \ + $(GLOBAL_LDADD) \ + $(LIBXML2_LDADD) \ + $(LMDB_LDADD) \ + $(LUA_LDADD) \ + ../others/libinjection.la \ + ../others/libmbedtls.la \ + $(PCRE_LDADD) \ + $(SSDEEP_LDADD) \ + $(YAJL_LDADD) + diff --git a/test/Makefile.am b/test/Makefile.am index 9d047f10..60f5f275 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -31,23 +31,33 @@ unit_tests_SOURCES = \ unit/unit.cc \ unit/unit_test.cc + noinst_HEADERS = \ common/modsecurity_test.cc \ common/*.h \ unit/*.h \ regression/*.h + unit_tests_LDADD = \ - $(top_builddir)/src/.libs/libmodsecurity.a \ $(CURL_LDADD) \ - $(GEOIP_LDFLAGS) $(GEOIP_LDADD) \ - $(PCRE_LDADD) \ - $(YAJL_LDFLAGS) $(YAJL_LDADD) \ - $(LMDB_LDFLAGS) $(LMDB_LDADD) \ - $(SSDEEP_LDFLAGS) $(SSDEEP_LDADD) \ - $(LUA_LDFLAGS) $(LUA_LDADD) \ + $(GEOIP_LDADD) \ + $(GLOBAL_LDADD) \ $(LIBXML2_LDADD) \ - $(GLOBAL_LDADD) + $(LMDB_LDADD) \ + $(LUA_LDADD) \ + $(PCRE_LDADD) \ + $(SSDEEP_LDADD) \ + $(top_builddir)/src/.libs/libmodsecurity.a \ + $(YAJL_LDADD) + + +unit_tests_LDFLAG = \ + $(GEOIP_LDFLAGS) \ + $(LMDB_LDFLAGS) \ + $(LUA_LDFLAGS) \ + $(SSDEEP_LDFLAGS) \ + $(YAJL_LDFLAGS) unit_tests_CPPFLAGS = \ @@ -80,14 +90,22 @@ regression_tests_SOURCES = \ regression_tests_LDADD = \ $(top_builddir)/src/.libs/libmodsecurity.a \ $(CURL_LDADD) \ - $(GEOIP_LDFLAGS) $(GEOIP_LDADD) \ - $(PCRE_LDADD) \ - $(YAJL_LDFLAGS) $(YAJL_LDADD) \ - $(LMDB_LDFLAGS) $(LMDB_LDADD) \ - $(SSDEEP_LDFLAGS) $(SSDEEP_LDADD) \ - $(LUA_LDFLAGS) $(LUA_LDADD) \ + $(GEOIP_LDADD) \ + $(GLOBAL_LDADD) \ $(LIBXML2_LDADD) \ - $(GLOBAL_LDADD) + $(LMDB_LDADD) \ + $(LUA_LDADD) \ + $(PCRE_LDADD) \ + $(SSDEEP_LDADD) \ + $(YAJL_LDADD) + + +regression_tests_LDFLAGS = \ + $(GEOIP_LDFLAGS) \ + $(YAJL_LDFLAGS) \ + $(LMDB_LDFLAGS) \ + $(SSDEEP_LDFLAGS) \ + $(LUA_LDFLAGS) regression_tests_CPPFLAGS = \ @@ -117,17 +135,23 @@ rules_optimization_SOURCES = \ optimization/optimization.cc rules_optimization_LDADD = \ - $(top_builddir)/src/.libs/libmodsecurity.a \ $(CURL_LDADD) \ - $(GEOIP_LDFLAGS) $(GEOIP_LDADD) \ - $(PCRE_LDADD) \ - $(YAJL_LDFLAGS) $(YAJL_LDADD) \ - $(LMDB_LDFLAGS) $(LMDB_LDADD) \ - $(SSDEEP_LDFLAGS) $(SSDEEP_LDADD) \ - $(LUA_LDFLAGS) $(LUA_LDADD) \ + $(GEOIP_LDADD) \ + $(GLOBAL_LDADD) \ $(LIBXML2_LDADD) \ - $(GLOBAL_LDADD) + $(LMDB_LDADD) \ + $(LUA_LDADD) \ + $(PCRE_LDADD) \ + $(SSDEEP_LDADD) \ + $(top_builddir)/src/.libs/libmodsecurity.a \ + $(YAJL_LDADD) +rules_optimization_LDFLAGS = \ + $(GEOIP_LDFLAGS) \ + $(LMDB_LDFLAGS) \ + $(LUA_LDFLAGS) \ + $(SSDEEP_LDFLAGS) \ + $(YAJL_LDFLAGS) rules_optimization_CPPFLAGS = \ -std=c++11 \ diff --git a/test/benchmark/Makefile.am b/test/benchmark/Makefile.am index 7bc92669..f646b62e 100644 --- a/test/benchmark/Makefile.am +++ b/test/benchmark/Makefile.am @@ -8,15 +8,23 @@ benchmark_SOURCES = \ benchmark_LDADD = \ $(top_builddir)/src/.libs/libmodsecurity.a \ $(CURL_LDADD) \ - $(GEOIP_LDFLAGS) $(GEOIP_LDADD) \ + $(GEOIP_LDADD) \ $(PCRE_LDADD) \ - $(YAJL_LDFLAGS) $(YAJL_LDADD) \ - $(LMDB_LDFLAGS) $(LMDB_LDADD) \ - $(SSDEEP_LDFLAGS) $(SSDEEP_LDADD) \ - $(LUA_LDFLAGS) $(LUA_LDADD) \ + $(YAJL_LDADD) \ + $(LMDB_LDADD) \ + $(SSDEEP_LDADD) \ + $(LUA_LDADD) \ $(LIBXML2_LDADD) \ $(GLOBAL_LDADD) +benchmark_LDFLAGS = \ + $(top_builddir)/src/.libs/libmodsecurity.a \ + $(GEOIP_LDFLAGS) \ + $(YAJL_LDFLAGS) \ + $(LMDB_LDFLAGS) \ + $(SSDEEP_LDFLAGS) \ + $(LUA_LDFLAGS) + benchmark_CPPFLAGS = \ -std=c++11 \ -I$(top_builddir)/headers \ diff --git a/tools/rules-check/Makefile.am b/tools/rules-check/Makefile.am index 0fa6d64a..9d111b5a 100644 --- a/tools/rules-check/Makefile.am +++ b/tools/rules-check/Makefile.am @@ -6,16 +6,24 @@ modsec_rules_check_SOURCES = \ rules-check.cc modsec_rules_check_LDADD = \ - $(top_builddir)/src/.libs/libmodsecurity.a \ $(CURL_LDADD) \ - $(GEOIP_LDFLAGS) $(GEOIP_LDADD) \ - $(PCRE_LDADD) \ - $(YAJL_LDFLAGS) $(YAJL_LDADD) \ - $(LMDB_LDFLAGS) $(LMDB_LDADD) \ - $(SSDEEP_LDFLAGS) $(SSDEEP_LDADD) \ - $(LUA_LDFLAGS) $(LUA_LDADD) \ + $(GEOIP_LDADD) \ + $(GLOBAL_LDADD) \ $(LIBXML2_LDADD) \ - $(GLOBAL_LDADD) + $(LMDB_LDADD) \ + $(LUA_LDADD) \ + $(PCRE_LDADD) \ + $(SSDEEP_LDADD) \ + $(top_builddir)/src/.libs/libmodsecurity.a \ + $(YAJL_LDADD) + +modsec_rules_check_LDFLAGS = \ + $(GEOIP_LDFLAGS) \ + $(LDFLAGS) \ + $(LMDB_LDFLAGS) \ + $(LUA_LDFLAGS) \ + $(SSDEEP_LDFLAGS) \ + $(YAJL_LDFLAGS) modsec_rules_check_CPPFLAGS = \ -std=c++11 \