]> git.ipfire.org Git - thirdparty/ulogd2.git/commitdiff
build: add Make_global.am for common flags
authorJeremy Sowden <jeremy@azazel.net>
Sun, 14 Nov 2021 15:52:22 +0000 (15:52 +0000)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 15 Nov 2021 10:42:41 +0000 (11:42 +0100)
Move `${regular_CFLAGS}` from configure.ac to Make_global.am, renaming
it to `AM_CFLAGS`.  Add `AM_CPPFGLAGS` to include
`$(top_srcdir)/include`.  Include the new file in the Makefiles that
require it.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
17 files changed:
Make_global.am [new file with mode: 0644]
Makefile.am
configure.ac
filter/Makefile.am
filter/raw2packet/Makefile.am
input/flow/Makefile.am
input/packet/Makefile.am
input/sum/Makefile.am
libipulog/Makefile.am
output/Makefile.am
output/dbi/Makefile.am
output/ipfix/Makefile.am
output/mysql/Makefile.am
output/pcap/Makefile.am
output/pgsql/Makefile.am
output/sqlite3/Makefile.am
src/Makefile.am

diff --git a/Make_global.am b/Make_global.am
new file mode 100644 (file)
index 0000000..4ce896d
--- /dev/null
@@ -0,0 +1,2 @@
+AM_CPPFLAGS = -I$(top_srcdir)/include
+AM_CFLAGS   = -Wall -Wextra -Wno-unused-parameter
index 5600f8c6f5523701e56b64a821232dbbc94239e7..0e5721472cb234121fa64ee855b875113818078e 100644 (file)
@@ -5,7 +5,6 @@ man_MANS = ulogd.8
 
 EXTRA_DIST = $(man_MANS) ulogd.conf.in doc
 
-AM_CPPFLAGS = -I$(top_srcdir)/include
 SUBDIRS = include libipulog src input filter output
 
 noinst_DATA = ulogd.conf
index 1d795bad325d32dfd2c5d593d3b8de5ba2504cf9..f7d6b50c47f5cb7a15aacc805c7c69367d7ef0f9 100644 (file)
@@ -157,9 +157,6 @@ AC_ARG_WITH([ulogd2libdir],
         [ulogd2libdir="${libdir}/ulogd"])
 AC_SUBST([ulogd2libdir])
 
-regular_CFLAGS="-Wall -Wextra -Wno-unused-parameter";
-AC_SUBST([regular_CFLAGS])
-
 dnl AC_SUBST(DATABASE_DIR)
 dnl AC_SUBST(DATABASE_LIB)
 dnl AC_SUBST(DATABASE_LIB_DIR)
index c2755ecb7c4937686b18561f0a64a32e88251a9f..f1d2c81f48d43c309fbba8f21d80d16debbbc989 100644 (file)
@@ -1,7 +1,8 @@
 SUBDIRS = raw2packet
 
-AM_CPPFLAGS = -I$(top_srcdir)/include ${LIBNFNETLINK_CFLAGS}
-AM_CFLAGS = ${regular_CFLAGS}
+include $(top_srcdir)/Make_global.am
+
+AM_CPPFLAGS += ${LIBNFNETLINK_CFLAGS}
 
 pkglib_LTLIBRARIES = ulogd_filter_IFINDEX.la ulogd_filter_PWSNIFF.la \
                         ulogd_filter_PRINTPKT.la ulogd_filter_PRINTFLOW.la \
index 7498f9aa3c552a8b62c31b836d72fde229466e7c..90768ef6ca0e7a45765665cbbd6707bf1a1eb05d 100644 (file)
@@ -1,6 +1,4 @@
-
-AM_CPPFLAGS = -I$(top_srcdir)/include
-AM_CFLAGS = ${regular_CFLAGS}
+include $(top_srcdir)/Make_global.am
 
 pkglib_LTLIBRARIES = ulogd_raw2packet_BASE.la
 
index 0e07a7dc1ccc1f39cdd0ff0dec112384a23452db..004e532981a4c1265aa1e903333ca8db6293a07e 100644 (file)
@@ -1,6 +1,6 @@
+include $(top_srcdir)/Make_global.am
 
-AM_CPPFLAGS = -I$(top_srcdir)/include ${LIBNETFILTER_CONNTRACK_CFLAGS}
-AM_CFLAGS = ${regular_CFLAGS}
+AM_CPPFLAGS += ${LIBNETFILTER_CONNTRACK_CFLAGS}
 
 if BUILD_NFCT
 pkglib_LTLIBRARIES = ulogd_inpflow_NFCT.la # ulogd_inpflow_IPFIX.la
index 1c3151d52f136bd76df458f08633e7a79eaefc3d..daf374a659172eeb8f9e043ff048d95cc3b6ea43 100644 (file)
@@ -1,6 +1,6 @@
+include $(top_srcdir)/Make_global.am
 
-AM_CPPFLAGS = -I$(top_srcdir)/include ${LIBNETFILTER_LOG_CFLAGS}
-AM_CFLAGS = ${regular_CFLAGS}
+AM_CPPFLAGS += ${LIBNETFILTER_LOG_CFLAGS}
 
 pkglib_LTLIBRARIES = ulogd_inppkt_UNIXSOCK.la
 
index b6ddb4d29b93db102dd89565bda5feb53540b177..e0c42f7de37688d31914c0c87e329db94d633544 100644 (file)
@@ -1,5 +1,7 @@
-AM_CPPFLAGS = -I$(top_srcdir)/include $(LIBNETFILTER_ACCT_CFLAGS) $(LIBMNL_CFLAGS)
-AM_CFLAGS = ${regular_CFLAGS}
+include $(top_srcdir)/Make_global.am
+
+AM_CPPFLAGS += $(LIBNETFILTER_ACCT_CFLAGS) $(LIBMNL_CFLAGS)
+
 if BUILD_NFACCT
 pkglib_LTLIBRARIES = ulogd_inpflow_NFACCT.la
 ulogd_inpflow_NFACCT_la_SOURCES = ulogd_inpflow_NFACCT.c
index 111cd4889ed6d5207ca13b24aa334ee22a75bc5b..708975a5fb99f6c3188059c76d09d720130329d7 100644 (file)
@@ -1,6 +1,4 @@
-
-AM_CPPFLAGS = -I$(top_srcdir)/include
-AM_CFLAGS = ${regular_CFLAGS}
+include $(top_srcdir)/Make_global.am
 
 noinst_LTLIBRARIES = libipulog.la
 
index 7ba821764afe77aceb58496a145ee13b4bf5cda9..879c317d03ff8900a294fd5fbed2c6d1a35def88 100644 (file)
@@ -1,6 +1,8 @@
-AM_CPPFLAGS = -I$(top_srcdir)/include ${LIBNETFILTER_ACCT_CFLAGS} \
-              ${LIBNETFILTER_CONNTRACK_CFLAGS} ${LIBNETFILTER_LOG_CFLAGS}
-AM_CFLAGS = ${regular_CFLAGS}
+include $(top_srcdir)/Make_global.am
+
+AM_CPPFLAGS += ${LIBNETFILTER_ACCT_CFLAGS} \
+              ${LIBNETFILTER_CONNTRACK_CFLAGS} \
+              ${LIBNETFILTER_LOG_CFLAGS}
 
 SUBDIRS= pcap mysql pgsql sqlite3 dbi ipfix
 
index f413cab4a3405398d8386f5f895bc004bc05d8c6..38db0a26fd84c4d588bbbc9cf3fc2a08c2519c3c 100644 (file)
@@ -1,6 +1,6 @@
+include $(top_srcdir)/Make_global.am
 
-AM_CPPFLAGS = -I$(top_srcdir)/include $(DBI_INC)
-AM_CFLAGS = ${regular_CFLAGS}
+AM_CPPFLAGS += $(DBI_INC)
 
 if HAVE_DBI
 
index cacda265c1f5543409d90799de8174350f5be28e..7354f6be6d5146b7f62d4634a3a4419a2c4ed953 100644 (file)
@@ -1,5 +1,4 @@
-AM_CPPFLAGS = -I$(top_srcdir)/include
-AM_CFLAGS = $(regular_CFLAGS)
+include $(top_srcdir)/Make_global.am
 
 pkglib_LTLIBRARIES = ulogd_output_IPFIX.la
 
index c24208c3e3026ae96e75226c02a2ad1cfe014866..3839a135c92696f8a4e0738a6c4e1eb31c5b56e0 100644 (file)
@@ -1,5 +1,6 @@
-AM_CPPFLAGS = -I$(top_srcdir)/include $(MYSQL_INC)
-AM_CFLAGS = ${regular_CFLAGS}
+include $(top_srcdir)/Make_global.am
+
+AM_CPPFLAGS += $(MYSQL_INC)
 
 if HAVE_MYSQL
 
index c1723a642a63737c07953b1357c10791e9f6cdd2..a022bf0cc15c0c6a5d157b48ef53d7395f01430f 100644 (file)
@@ -1,6 +1,4 @@
-
-AM_CPPFLAGS = -I$(top_srcdir)/include
-AM_CFLAGS = ${regular_CFLAGS}
+include $(top_srcdir)/Make_global.am
 
 if HAVE_PCAP
 
index bdaf1d249dce04f2e16919b9170e79cc556b60dc..fbc0d04c9f11f02ae3914c1c45a024bb56ccd345 100644 (file)
@@ -1,6 +1,6 @@
+include $(top_srcdir)/Make_global.am
 
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(PQINCPATH)
-AM_CFLAGS = ${regular_CFLAGS}
+AM_CPPFLAGS += -I$(PQINCPATH)
 
 if HAVE_PGSQL
 
index 62af267c4108882448af6c31577a0ef87aafd484..e00e1d6cf11cad26e9475c7061e5cbc56875e970 100644 (file)
@@ -1,5 +1,6 @@
-AM_CPPFLAGS = -I$(top_srcdir)/include ${libsqlite3_CFLAGS}
-AM_CFLAGS = ${regular_CFLAGS}
+include $(top_srcdir)/Make_global.am
+
+AM_CPPFLAGS += ${libsqlite3_CFLAGS}
 
 if HAVE_SQLITE3
 
index e1d45aee4b6c9f81ce7e505ad0839ea162bf7758..7a12a72da9a38f42a3aefa6109ce617740adb8a7 100644 (file)
@@ -1,9 +1,8 @@
+include $(top_srcdir)/Make_global.am
 
-AM_CPPFLAGS = -I$(top_srcdir)/include \
-             -DULOGD_CONFIGFILE='"$(sysconfdir)/ulogd.conf"' \
-             -DULOGD_LOGFILE_DEFAULT='"$(localstatedir)/log/ulogd.log"' \
-             -DULOGD2_LIBDIR='"$(ulogd2libdir)"'
-AM_CFLAGS = ${regular_CFLAGS}
+AM_CPPFLAGS += -DULOGD_CONFIGFILE='"$(sysconfdir)/ulogd.conf"' \
+              -DULOGD_LOGFILE_DEFAULT='"$(localstatedir)/log/ulogd.log"' \
+              -DULOGD2_LIBDIR='"$(ulogd2libdir)"'
 
 sbin_PROGRAMS = ulogd