* [PATCH 1/2] build: avoid per-target CFLAGS
@ 2012-11-27 12:49 Jan Engelhardt
2012-11-27 12:49 ` [PATCH 2/2] build: move remaining preprocessor flags into CPPFLAGS Jan Engelhardt
0 siblings, 1 reply; 3+ messages in thread
From: Jan Engelhardt @ 2012-11-27 12:49 UTC (permalink / raw)
To: eric; +Cc: netfilter-devel
There is no harm in putting the includes in the global AM_CPPFLAGS;
this can generally save number of compilations of a file when a
source file is used multiple times.
Signed-off-by: Jan Engelhardt <jengelh@inai.de>
---
Available in
git://git.inai.de/ulogd master
input/flow/Makefile.am | 3 +--
input/packet/Makefile.am | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/input/flow/Makefile.am b/input/flow/Makefile.am
index 36c34ca..0e07a7d 100644
--- a/input/flow/Makefile.am
+++ b/input/flow/Makefile.am
@@ -1,5 +1,5 @@
-AM_CPPFLAGS = -I$(top_srcdir)/include
+AM_CPPFLAGS = -I$(top_srcdir)/include ${LIBNETFILTER_CONNTRACK_CFLAGS}
AM_CFLAGS = ${regular_CFLAGS}
if BUILD_NFCT
@@ -7,7 +7,6 @@ pkglib_LTLIBRARIES = ulogd_inpflow_NFCT.la # ulogd_inpflow_IPFIX.la
ulogd_inpflow_NFCT_la_SOURCES = ulogd_inpflow_NFCT.c
ulogd_inpflow_NFCT_la_LDFLAGS = -avoid-version -module $(LIBNETFILTER_CONNTRACK_LIBS)
-ulogd_inpflow_NFCT_la_CFLAGS = $(AM_CFLAGS) $(LIBNETFILTER_CONNTRACK_CFLAGS)
endif
#ulogd_inpflow_IPFIX_la_SOURCES = ulogd_inpflow_IPFIX.c
diff --git a/input/packet/Makefile.am b/input/packet/Makefile.am
index debea91..1c884b8 100644
--- a/input/packet/Makefile.am
+++ b/input/packet/Makefile.am
@@ -1,5 +1,5 @@
-AM_CPPFLAGS = -I$(top_srcdir)/include
+AM_CPPFLAGS = -I$(top_srcdir)/include ${LIBNETFILTER_LOG_CFLAGS}
AM_CFLAGS = ${regular_CFLAGS}
pkglib_LTLIBRARIES = ulogd_inppkt_ULOG.la ulogd_inppkt_UNIXSOCK.la
@@ -9,7 +9,6 @@ endif
ulogd_inppkt_NFLOG_la_SOURCES = ulogd_inppkt_NFLOG.c
ulogd_inppkt_NFLOG_la_LDFLAGS = -avoid-version -module $(LIBNETFILTER_LOG_LIBS)
-ulogd_inppkt_NFLOG_la_CFLAGS = $(AM_CFLAGS) $(LIBNETFILTER_LOG_CFLAGS)
ulogd_inppkt_ULOG_la_SOURCES = ulogd_inppkt_ULOG.c
ulogd_inppkt_ULOG_la_LDFLAGS = -avoid-version -module
--
1.7.10.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] build: move remaining preprocessor flags into CPPFLAGS
2012-11-27 12:49 [PATCH 1/2] build: avoid per-target CFLAGS Jan Engelhardt
@ 2012-11-27 12:49 ` Jan Engelhardt
2012-11-27 13:09 ` Eric Leblond
0 siblings, 1 reply; 3+ messages in thread
From: Jan Engelhardt @ 2012-11-27 12:49 UTC (permalink / raw)
To: eric; +Cc: netfilter-devel
The flags retrieved from `pkg-config --cflags ...` are generally only
preprocessor flags (mostly -I to point to the directories), since
anything else would inconvenience downstream users.
Signed-off-by: Jan Engelhardt <jengelh@inai.de>
---
filter/Makefile.am | 4 ++--
output/Makefile.am | 6 +++---
output/sqlite3/Makefile.am | 4 ++--
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/filter/Makefile.am b/filter/Makefile.am
index 5af0696..875850b 100644
--- a/filter/Makefile.am
+++ b/filter/Makefile.am
@@ -1,7 +1,7 @@
SUBDIRS = raw2packet packet2flow
-AM_CPPFLAGS = -I$(top_srcdir)/include
-AM_CFLAGS = ${regular_CFLAGS} ${LIBNFNETLINK_CFLAGS}
+AM_CPPFLAGS = -I$(top_srcdir)/include ${LIBNFNETLINK_CFLAGS}
+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/output/Makefile.am b/output/Makefile.am
index 61d827a..fe0a19c 100644
--- a/output/Makefile.am
+++ b/output/Makefile.am
@@ -1,6 +1,6 @@
-AM_CPPFLAGS = -I$(top_srcdir)/include ${LIBNETFILTER_ACCT_CFLAGS}
-AM_CFLAGS = ${regular_CFLAGS} ${LIBNETFILTER_LOG_CFLAGS} \
- ${LIBNETFILTER_CONNTRACK_CFLAGS}
+AM_CPPFLAGS = -I$(top_srcdir)/include ${LIBNETFILTER_ACCT_CFLAGS} \
+ ${LIBNETFILTER_CONNTRACK_CFLAGS} ${LIBNETFILTER_LOG_CFLAGS}
+AM_CFLAGS = ${regular_CFLAGS}
SUBDIRS= pcap mysql pgsql sqlite3 dbi
diff --git a/output/sqlite3/Makefile.am b/output/sqlite3/Makefile.am
index dd148ec..62af267 100644
--- a/output/sqlite3/Makefile.am
+++ b/output/sqlite3/Makefile.am
@@ -1,5 +1,5 @@
-AM_CPPFLAGS = -I$(top_srcdir)/include
-AM_CFLAGS = ${regular_CFLAGS} ${libsqlite3_CFLAGS}
+AM_CPPFLAGS = -I$(top_srcdir)/include ${libsqlite3_CFLAGS}
+AM_CFLAGS = ${regular_CFLAGS}
if HAVE_SQLITE3
--
1.7.10.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 2/2] build: move remaining preprocessor flags into CPPFLAGS
2012-11-27 12:49 ` [PATCH 2/2] build: move remaining preprocessor flags into CPPFLAGS Jan Engelhardt
@ 2012-11-27 13:09 ` Eric Leblond
0 siblings, 0 replies; 3+ messages in thread
From: Eric Leblond @ 2012-11-27 13:09 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: netfilter-devel
Hi,
On Tue, 2012-11-27 at 13:49 +0100, Jan Engelhardt wrote:
> The flags retrieved from `pkg-config --cflags ...` are generally only
> preprocessor flags (mostly -I to point to the directories), since
> anything else would inconvenience downstream users.
>
...
> -AM_CPPFLAGS = -I$(top_srcdir)/include
> -AM_CFLAGS = ${regular_CFLAGS} ${libsqlite3_CFLAGS}
> +AM_CPPFLAGS = -I$(top_srcdir)/include ${libsqlite3_CFLAGS}
> +AM_CFLAGS = ${regular_CFLAGS}
>
> if HAVE_SQLITE3
All four patches have been applied. Thanks a lot Jan.
BR,
--
Eric Leblond <eric@regit.org>
Blog: https://home.regit.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-11-27 13:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-27 12:49 [PATCH 1/2] build: avoid per-target CFLAGS Jan Engelhardt
2012-11-27 12:49 ` [PATCH 2/2] build: move remaining preprocessor flags into CPPFLAGS Jan Engelhardt
2012-11-27 13:09 ` Eric Leblond
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).