From 98e21eb8633b31b006671735602df08d3f073261 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Tue, 27 May 2014 11:10:16 +0200 Subject: build: Allow to build astraceroute and flowtop without GeoIP support Both tools are already prepared to handle NULL return values of the geoip_* lookup functions, so we might as well build them without geoip support if not needed/present. Signed-off-by: Tobias Klauser --- flowtop/Makefile | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'flowtop/Makefile') diff --git a/flowtop/Makefile b/flowtop/Makefile index 12f8d61..03f628e 100644 --- a/flowtop/Makefile +++ b/flowtop/Makefile @@ -1,11 +1,14 @@ -flowtop-libs = -lGeoIP \ - -lurcu \ +flowtop-libs = -lurcu \ -lnetfilter_conntrack \ $(shell pkg-config --libs ncurses 2> /dev/null \ || echo '-lncurses') \ $(shell pkg-config --libs tinfo 2> /dev/null ) \ - -lpthread \ + -lpthread + +ifeq ($(CONFIG_GEOIP), 1) +flowtop-libs += -lGeoIP \ -lz +endif flowtop-objs = xmalloc.o \ ioops.o \ @@ -21,10 +24,13 @@ flowtop-objs = xmalloc.o \ dissector.o \ proto_none.o \ tprintf.o \ - geoip.o \ screen.o \ flowtop.o +ifeq ($(CONFIG_GEOIP), 1) +flowtop-objs += geoip.o +endif + flowtop-eflags = $(shell pkg-config --cflags ncurses) flowtop-confs = tcp.conf \ -- cgit v1.2.3-54-g00ecf