new file mode 100644
@@ -0,0 +1,2 @@
+AM_CPPFLAGS = -I$(top_srcdir)/include
+AM_CFLAGS = -Wall -Wextra -Wno-unused-parameter
@@ -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
@@ -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)
@@ -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 \
@@ -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
@@ -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
@@ -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
@@ -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
@@ -1,6 +1,4 @@
-
-AM_CPPFLAGS = -I$(top_srcdir)/include
-AM_CFLAGS = ${regular_CFLAGS}
+include $(top_srcdir)/Make_global.am
noinst_LTLIBRARIES = libipulog.la
@@ -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
@@ -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
@@ -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
@@ -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
@@ -1,6 +1,4 @@
-
-AM_CPPFLAGS = -I$(top_srcdir)/include
-AM_CFLAGS = ${regular_CFLAGS}
+include $(top_srcdir)/Make_global.am
if HAVE_PCAP
@@ -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
@@ -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
@@ -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
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> --- Make_global.am | 2 ++ Makefile.am | 1 - configure.ac | 3 --- filter/Makefile.am | 5 +++-- filter/raw2packet/Makefile.am | 4 +--- input/flow/Makefile.am | 4 ++-- input/packet/Makefile.am | 4 ++-- input/sum/Makefile.am | 6 ++++-- libipulog/Makefile.am | 4 +--- output/Makefile.am | 8 +++++--- output/dbi/Makefile.am | 4 ++-- output/ipfix/Makefile.am | 3 +-- output/mysql/Makefile.am | 5 +++-- output/pcap/Makefile.am | 4 +--- output/pgsql/Makefile.am | 4 ++-- output/sqlite3/Makefile.am | 5 +++-- src/Makefile.am | 9 ++++----- 17 files changed, 36 insertions(+), 39 deletions(-) create mode 100644 Make_global.am