summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDaniel Borkmann <dborkman@redhat.com>2013-07-08 18:49:25 +0200
committerDaniel Borkmann <dborkman@redhat.com>2013-07-08 18:49:25 +0200
commit36476eaf763d29e8885f519ab1e0b8beda28074a (patch)
tree72efadf2d7c25299e2f0c351b906faa92d32a2eb /Makefile
parent78b9949fa486acc9a192df6e6283699fbe9b813a (diff)
configure: netsniff-ng: libpcap is not a hard dependency
netsniff-ng uses libpcap only for high-level filter compiling. Thus, let netsniff-ng not "hard-depend" on libpcap, but rather disable filter compiling in case the user does not want to install libpcap. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 5fe3447..f1a75a9 100644
--- a/Makefile
+++ b/Makefile
@@ -81,6 +81,12 @@ CFLAGS_DEF += -D_LARGEFILE_SOURCE
CFLAGS_DEF += -D_LARGEFILE64_SOURCE
CFLAGS_DEF += -D_FILE_OFFSET_BITS=64
+ifeq ($(CONFIG_LIBPCAP), 1)
+ CFLAGS_PCAP = -D__WITH_TCPDUMP_LIKE_FILTER
+else
+ CFLAGS_PCAP =
+endif
+
WFLAGS_DEF = -Wall
WFLAGS_DEF += -Wformat=2
WFLAGS_DEF += -Wmissing-prototypes
@@ -245,7 +251,7 @@ $(foreach tool,$(TOOLS),$(eval $(call TOOL_templ,$(tool))))
%:: ;
-netsniff-ng: ALL_CFLAGS += $(shell pkg-config --cflags libnl-3.0) $(shell pkg-config --cflags libnl-genl-3.0) -D__WITH_PROTOS -D__WITH_TCPDUMP_LIKE_FILTER
+netsniff-ng: ALL_CFLAGS += $(shell pkg-config --cflags libnl-3.0) $(shell pkg-config --cflags libnl-genl-3.0) $(CFLAGS_PCAP) -D__WITH_PROTOS
trafgen: ALL_CFLAGS += -I.. $(shell pkg-config --cflags libnl-3.0) $(shell pkg-config --cflags libnl-genl-3.0) -D__WITH_PROTOS
ifpps: ALL_CFLAGS += $(shell pkg-config --cflags ncurses)
flowtop: ALL_CFLAGS += $(shell pkg-config --cflags ncurses)