summaryrefslogtreecommitdiff
path: root/mk/rte.app.mk
diff options
context:
space:
mode:
authorDavid Marchand <david.marchand@6wind.com>2013-11-22 11:24:55 +0100
committerThomas Monjalon <thomas.monjalon@6wind.com>2013-11-24 21:31:37 +0100
commit622ed6b87aec0e51401ca5294f7a1bbffabf5ebc (patch)
treee9cff6c21846efc8386d7bb30a7bcc5fe20a7ca3 /mk/rte.app.mk
parent21d4314f5c8e295e1f850086201af861aeeab89c (diff)
downloaddpdk-622ed6b87aec0e51401ca5294f7a1bbffabf5ebc.zip
dpdk-622ed6b87aec0e51401ca5294f7a1bbffabf5ebc.tar.gz
dpdk-622ed6b87aec0e51401ca5294f7a1bbffabf5ebc.tar.xz
pcap: use pcap-config to guess compilation flags
Use pcap-config to populate CFLAGS and LDFLAGS. LIBPCAP_CFLAGS and LIBPCAP_LDFLAGS can be used to override this (useful when cross-compiling). Signed-off-by: David Marchand <david.marchand@6wind.com> Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Diffstat (limited to 'mk/rte.app.mk')
-rw-r--r--mk/rte.app.mk5
1 files changed, 4 insertions, 1 deletions
diff --git a/mk/rte.app.mk b/mk/rte.app.mk
index 1c875e5..786100c 100644
--- a/mk/rte.app.mk
+++ b/mk/rte.app.mk
@@ -150,7 +150,10 @@ LDLIBS += -lrte_eal
endif
ifeq ($(CONFIG_RTE_LIBRTE_PMD_PCAP),y)
-LDLIBS += -lrte_pmd_pcap -lpcap
+LDLIBS += -lrte_pmd_pcap
+LIBPCAP_LDFLAGS ?= $(shell pcap-config --libs)
+$(if $(LIBPCAP_LDFLAGS),,$(error LIBPCAP_LDFLAGS is undefined))
+LDLIBS += $(LIBPCAP_LDFLAGS)
endif
LDLIBS += $(EXECENV_LDLIBS)