From 192ddbe71639da20202285ea9665a25c924810da Mon Sep 17 00:00:00 2001 From: Toni Uhlig Date: Thu, 4 Jun 2020 17:40:05 +0200 Subject: Makefile use -I and -rpath if CUSTOM_LIBNDPI variable used Signed-off-by: Toni Uhlig --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 105a90b1b..09aa23b5d 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,10 @@ LIBS = -pthread -lpcap -lm ifneq ($(CUSTOM_LIBNDPI),) LIBS += '$(CUSTOM_LIBNDPI)' +CFLAGS += '-I$(shell dirname $(CUSTOM_LIBNDPI))/../include' +ifeq ($(findstring $*.so, $(CUSTOM_LIBNDPI)),.so) +LDFLAGS += -Wl,-rpath='$(shell dirname $(CUSTOM_LIBNDPI))' +endif else LIBS += -lndpi endif -- cgit v1.2.3