summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBaruch Siach <baruch@tkos.co.il>2017-04-16 07:49:27 +0300
committerTobias Klauser <tklauser@distanz.ch>2017-05-23 08:59:23 +0200
commit4de312bce77d3548af6cc448a9f4e566126b4bab (patch)
treeb941f27cad5fc58481ccf31f0507653912707f6e
parentb463e1f265628f97967a01ce0a2cf18afe7b7aa3 (diff)
flowtop: take PKG_CONFIG into account for libnetfilter_conntrack
Use $PKG_CONFIG to determine the linker flags for libnetfilter_conntrack. This fixes static link failure like the following: LD flowtop .../usr/x86_64-buildroot-linux-musl/sysroot/usr/lib/../lib64/libnetfilter_conntrack.a(main.o): In function `nfct_open_nfnl': main.c:(.text+0x52): undefined reference to `nfnl_subsys_open' main.c:(.text+0x69): undefined reference to `nfnl_subsys_close' main.c:(.text+0x87): undefined reference to `nfnl_subsys_open' main.c:(.text+0xa3): undefined reference to `nfnl_subsys_close' .../usr/x86_64-buildroot-linux-musl/sysroot/usr/lib/../lib64/libnetfilter_conntrack.a(main.o): In function `nfct_open': main.c:(.text+0xc9): undefined reference to `nfnl_open' main.c:(.text+0xf0): undefined reference to `nfnl_close' ... Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
-rw-r--r--flowtop/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/flowtop/Makefile b/flowtop/Makefile
index effe7eb..e001ce8 100644
--- a/flowtop/Makefile
+++ b/flowtop/Makefile
@@ -1,5 +1,5 @@
flowtop-libs = -lurcu \
- -lnetfilter_conntrack \
+ $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) --libs libnetfilter_conntrack 2> /dev/null ) \
$(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) --libs ncurses 2> /dev/null \
|| echo '-lncurses') \
$(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) --libs tinfo 2> /dev/null ) \