From: Jan Engelhardt <jengelh@medozas.de>
To: pablo@netfilter.org
Cc: netfilter-devel@vger.kernel.org
Subject: [PATCH 7/9] build: propagate global CFLAGS
Date: Fri, 5 Nov 2010 19:36:21 +0100 [thread overview]
Message-ID: <1288982184-23584-8-git-send-email-jengelh@medozas.de> (raw)
In-Reply-To: <1288982184-23584-1-git-send-email-jengelh@medozas.de>
We must not override CFLAGS, because that will break when the user
overrides CFLAGS again at make time (which he is entitled to). So,
name our CFLAGS regular_CFLAGS, and also include that across all
Makefiles so that they are actually uesd for all the code.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
configure.ac | 3 ++-
filter/Makefile.am | 1 +
filter/raw2packet/Makefile.am | 1 +
input/flow/Makefile.am | 2 +-
input/packet/Makefile.am | 2 +-
libipulog/Makefile.am | 1 +
output/Makefile.am | 1 +
output/dbi/Makefile.am | 1 +
output/mysql/Makefile.am | 1 +
output/pcap/Makefile.am | 1 +
output/pgsql/Makefile.am | 1 +
output/sqlite3/Makefile.am | 1 +
src/Makefile.am | 1 +
13 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index 2447574..fec034e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,7 +32,8 @@ dnl Checks for library functions.
AC_FUNC_VPRINTF
AC_CHECK_FUNCS(socket strerror)
-CFLAGS="$CFLAGS -Wall -Wextra -Wno-unused-parameter"
+regular_CFLAGS="-Wall -Wextra -Wno-unused-parameter"
+AC_SUBST([regular_CFLAGS])
dnl Check for the right nfnetlink version
LIBNFNETLINK_REQUIRED=0.0.39
diff --git a/filter/Makefile.am b/filter/Makefile.am
index 9b51670..3c3f152 100644
--- a/filter/Makefile.am
+++ b/filter/Makefile.am
@@ -1,6 +1,7 @@
SUBDIRS = raw2packet packet2flow
AM_CPPFLAGS = -I$(top_srcdir)/include
+AM_CFLAGS = ${regular_CFLAGS}
pkglib_LTLIBRARIES = ulogd_filter_IFINDEX.la ulogd_filter_PWSNIFF.la \
ulogd_filter_PRINTPKT.la ulogd_filter_PRINTFLOW.la \
diff --git a/filter/raw2packet/Makefile.am b/filter/raw2packet/Makefile.am
index c959661..8b5a4ad 100644
--- a/filter/raw2packet/Makefile.am
+++ b/filter/raw2packet/Makefile.am
@@ -1,5 +1,6 @@
AM_CPPFLAGS = -I$(top_srcdir)/include
+AM_CFLAGS = ${regular_CFLAGS}
pkglib_LTLIBRARIES = ulogd_raw2packet_BASE.la
diff --git a/input/flow/Makefile.am b/input/flow/Makefile.am
index 21ab32f..127caf6 100644
--- a/input/flow/Makefile.am
+++ b/input/flow/Makefile.am
@@ -1,6 +1,6 @@
AM_CPPFLAGS = -I$(top_srcdir)/include
-AM_CFLAGS = -Wall
+AM_CFLAGS = ${regular_CFLAGS}
pkglib_LTLIBRARIES = ulogd_inpflow_NFCT.la # ulogd_inpflow_IPFIX.la
diff --git a/input/packet/Makefile.am b/input/packet/Makefile.am
index f8afc03..7fd8979 100644
--- a/input/packet/Makefile.am
+++ b/input/packet/Makefile.am
@@ -1,6 +1,6 @@
AM_CPPFLAGS = -I$(top_srcdir)/include
-AM_CFLAGS = -Wall
+AM_CFLAGS = ${regular_CFLAGS}
LIBS=
pkglib_LTLIBRARIES = ulogd_inppkt_NFLOG.la ulogd_inppkt_ULOG.la ulogd_inppkt_UNIXSOCK.la
diff --git a/libipulog/Makefile.am b/libipulog/Makefile.am
index 7c46bec..111cd48 100644
--- a/libipulog/Makefile.am
+++ b/libipulog/Makefile.am
@@ -1,5 +1,6 @@
AM_CPPFLAGS = -I$(top_srcdir)/include
+AM_CFLAGS = ${regular_CFLAGS}
noinst_LTLIBRARIES = libipulog.la
diff --git a/output/Makefile.am b/output/Makefile.am
index 2c35054..34ffb2d 100644
--- a/output/Makefile.am
+++ b/output/Makefile.am
@@ -1,4 +1,5 @@
AM_CPPFLAGS = -I$(top_srcdir)/include
+AM_CFLAGS = ${regular_CFLAGS}
LIBS=""
SUBDIRS= pcap mysql pgsql sqlite3 dbi
diff --git a/output/dbi/Makefile.am b/output/dbi/Makefile.am
index 0e68cd3..1ee8f2a 100644
--- a/output/dbi/Makefile.am
+++ b/output/dbi/Makefile.am
@@ -1,5 +1,6 @@
AM_CPPFLAGS = -I$(top_srcdir)/include $(DBI_INC)
+AM_CFLAGS = ${regular_CFLAGS}
LIBS=$(DBI_LIB)
if HAVE_DBI
diff --git a/output/mysql/Makefile.am b/output/mysql/Makefile.am
index 8da758b..a98cdeb 100644
--- a/output/mysql/Makefile.am
+++ b/output/mysql/Makefile.am
@@ -1,4 +1,5 @@
AM_CPPFLAGS = -I$(top_srcdir)/include $(MYSQL_INC)
+AM_CFLAGS = ${regular_CFLAGS}
LIBS=$(MYSQL_LIB)
if HAVE_MYSQL
diff --git a/output/pcap/Makefile.am b/output/pcap/Makefile.am
index ac89cfe..59cb3f6 100644
--- a/output/pcap/Makefile.am
+++ b/output/pcap/Makefile.am
@@ -1,5 +1,6 @@
AM_CPPFLAGS = -I$(top_srcdir)/include $(PCAP_INC)
+AM_CFLAGS = ${regular_CFLAGS}
LIBS=$(PCAP_LIB)
if HAVE_PCAP
diff --git a/output/pgsql/Makefile.am b/output/pgsql/Makefile.am
index 99947bc..32be79b 100644
--- a/output/pgsql/Makefile.am
+++ b/output/pgsql/Makefile.am
@@ -1,5 +1,6 @@
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(PQINCPATH)
+AM_CFLAGS = ${regular_CFLAGS}
LIBS=$(PQLIBS)
if HAVE_PGSQL
diff --git a/output/sqlite3/Makefile.am b/output/sqlite3/Makefile.am
index d8bedc9..d14398c 100644
--- a/output/sqlite3/Makefile.am
+++ b/output/sqlite3/Makefile.am
@@ -1,4 +1,5 @@
AM_CPPFLAGS = -I$(top_srcdir)/include $(SQLITE3_INC)
+AM_CFLAGS = ${regular_CFLAGS}
LIBS=$(SQLITE3_LIB)
if HAVE_SQLITE3
diff --git a/src/Makefile.am b/src/Makefile.am
index d83d13e..9ae7884 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -2,6 +2,7 @@
AM_CPPFLAGS = -I$(top_srcdir)/include \
-DULOGD_CONFIGFILE="\"$(sysconfdir)/ulogd.conf\"" \
-DULOGD_LOGFILE_DEFAULT="\"$(localstatedir)/log/ulogd.log\""
+AM_CFLAGS = ${regular_CFLAGS}
sbin_PROGRAMS = ulogd
--
1.7.1
next prev parent reply other threads:[~2010-11-05 18:36 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-05 18:36 ulogd2 build updates Jan Engelhardt
2010-11-05 18:36 ` [PATCH 1/9] build: move global automake options into configure.ac Jan Engelhardt
2010-11-05 18:36 ` [PATCH 2/9] build: remove statements without obvious effect Jan Engelhardt
2010-11-05 18:36 ` [PATCH 3/9] build: remove -fPIC flag Jan Engelhardt
2010-11-05 18:36 ` [PATCH 4/9] build: remove unused $(all_includes) Jan Engelhardt
2010-11-05 18:36 ` [PATCH 5/9] output/LOGEMU: resolve build warning Jan Engelhardt
2010-11-05 18:36 ` [PATCH 6/9] build: default to not building static libraries Jan Engelhardt
2010-11-05 18:36 ` Jan Engelhardt [this message]
2010-11-05 18:36 ` [PATCH 8/9] build: no need for error message in PKG_CHECK_MODULES Jan Engelhardt
2010-11-05 18:36 ` [PATCH 9/9] filter/HWHDR: remove redundant sizeof(char) Jan Engelhardt
2010-11-07 19:56 ` ulogd2 build updates Pablo Neira Ayuso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1288982184-23584-8-git-send-email-jengelh@medozas.de \
--to=jengelh@medozas.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).