From: Jeremy Sowden <jeremy@azazel.net>
To: Netfilter Devel <netfilter-devel@vger.kernel.org>
Subject: [libnetfilter_log PATCH 4/9] build: move dependency CFLAGS variables out of `AM_CPPFLAGS`
Date: Sat, 9 Oct 2021 12:38:34 +0100 [thread overview]
Message-ID: <20211009113839.2765382-5-jeremy@azazel.net> (raw)
In-Reply-To: <20211009113839.2765382-1-jeremy@azazel.net>
`${LIBNFNETLINK_CFLAGS}` and `${LIBMNL_CFLAGS}` are not required for all
libraries and executables: include them only where necessary.
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
---
Make_global.am | 2 +-
src/Makefile.am | 18 ++++++++++--------
utils/Makefile.am | 11 ++++++-----
3 files changed, 17 insertions(+), 14 deletions(-)
diff --git a/Make_global.am b/Make_global.am
index 9bc8ea1d7f67..4d5bec913af2 100644
--- a/Make_global.am
+++ b/Make_global.am
@@ -1,2 +1,2 @@
-AM_CPPFLAGS = -I${top_srcdir}/include ${LIBNFNETLINK_CFLAGS} ${LIBMNL_CFLAGS}
+AM_CPPFLAGS = -I${top_srcdir}/include
AM_CFLAGS = -Wall
diff --git a/src/Makefile.am b/src/Makefile.am
index 815d9d31cfc0..203ca0c3cdc6 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -25,16 +25,18 @@ include ${top_srcdir}/Make_global.am
lib_LTLIBRARIES = libnetfilter_log.la
-libnetfilter_log_la_LDFLAGS = -Wc,-nostartfiles \
- -version-info $(LIBVERSION)
-libnetfilter_log_la_SOURCES = libnetfilter_log.c nlmsg.c
-libnetfilter_log_la_LIBADD = ${LIBNFNETLINK_LIBS} ${LIBMNL_LIBS}
+libnetfilter_log_la_CPPFLAGS = ${AM_CPPFLAGS} ${LIBNFNETLINK_CFLAGS} ${LIBMNL_CFLAGS}
+libnetfilter_log_la_LDFLAGS = -Wc,-nostartfiles \
+ -version-info $(LIBVERSION)
+libnetfilter_log_la_SOURCES = libnetfilter_log.c nlmsg.c
+libnetfilter_log_la_LIBADD = ${LIBNFNETLINK_LIBS} ${LIBMNL_LIBS}
if BUILD_IPULOG
lib_LTLIBRARIES += libnetfilter_log_libipulog.la
-libnetfilter_log_libipulog_la_LDFLAGS = -Wc,-nostartfiles \
- -version-info $(IPULOG_LIBVERSION)
-libnetfilter_log_libipulog_la_LIBADD = libnetfilter_log.la ${LIBNFNETLINK_LIBS}
-libnetfilter_log_libipulog_la_SOURCES = libipulog_compat.c
+libnetfilter_log_libipulog_la_CPPFLAGS = ${AM_CPPFLAGS} ${LIBNFNETLINK_CFLAGS}
+libnetfilter_log_libipulog_la_LDFLAGS = -Wc,-nostartfiles \
+ -version-info $(IPULOG_LIBVERSION)
+libnetfilter_log_libipulog_la_LIBADD = libnetfilter_log.la ${LIBNFNETLINK_LIBS}
+libnetfilter_log_libipulog_la_SOURCES = libipulog_compat.c
endif
diff --git a/utils/Makefile.am b/utils/Makefile.am
index 39abb3e00af9..133b6ec550cf 100644
--- a/utils/Makefile.am
+++ b/utils/Makefile.am
@@ -6,12 +6,13 @@ nfulnl_test_SOURCES = nfulnl_test.c
nfulnl_test_LDADD = ../src/libnetfilter_log.la
nfulnl_test_LDFLAGS = -dynamic
-nf_log_SOURCES = nf-log.c
-nf_log_LDADD = ../src/libnetfilter_log.la $(LIBMNL_LIBS)
-nf_log_LDFLAGS = -dynamic
+nf_log_SOURCES = nf-log.c
+nf_log_LDADD = ../src/libnetfilter_log.la $(LIBMNL_LIBS)
+nf_log_LDFLAGS = -dynamic
+nf_log_CPPFLAGS = $(AM_CPPFLAGS) $(LIBMNL_CFLAGS)
if BUILD_NFCT
-nf_log_LDADD += $(LIBNETFILTER_CONNTRACK_LIBS)
-nf_log_CPPFLAGS = ${AM_CPPFLAGS} ${LIBNETFILTER_CONNTRACK_CFLAGS} -DBUILD_NFCT
+nf_log_LDADD += $(LIBNETFILTER_CONNTRACK_LIBS)
+nf_log_CPPFLAGS += $(LIBNETFILTER_CONNTRACK_CFLAGS) -DBUILD_NFCT
endif
if BUILD_IPULOG
--
2.33.0
next prev parent reply other threads:[~2021-10-09 11:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-09 11:38 [libnetfilter_log PATCH 0/8] Build fixes Jeremy Sowden
2021-10-09 11:38 ` [libnetfilter_log PATCH 1/9] build: correct pkg-config dependency configuration Jeremy Sowden
2021-10-09 11:38 ` [libnetfilter_log PATCH 2/9] build: add pkg-config configuration for libipulog Jeremy Sowden
2021-10-09 11:38 ` [libnetfilter_log PATCH 3/9] build: fix linker flags for nf-log Jeremy Sowden
2021-10-09 11:38 ` Jeremy Sowden [this message]
2021-10-09 11:38 ` [libnetfilter_log PATCH 5/9] build: remove superfluous .la when linking ulog_test Jeremy Sowden
2021-10-09 11:38 ` [libnetfilter_log PATCH 6/9] build: remove `-dynamic` when linking check progs Jeremy Sowden
2021-10-09 11:38 ` [libnetfilter_log PATCH 7/9] build: replace `AM_PROG_LIBTOOL` and `AC_DISABLE_STATIC` with `LT_INIT` Jeremy Sowden
2021-10-09 11:38 ` [libnetfilter_log PATCH 8/9] build: replace `AC_HELP_STRING` with `AS_HELP_STRING` Jeremy Sowden
2021-10-09 11:38 ` [libnetfilter_log PATCH 9/9] Add Emacs artefacts to .gitignore Jeremy Sowden
2021-10-11 23:00 ` [libnetfilter_log PATCH 0/8] Build fixes 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=20211009113839.2765382-5-jeremy@azazel.net \
--to=jeremy@azazel.net \
--cc=netfilter-devel@vger.kernel.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).