aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2020-06-04 17:40:05 +0200
committerToni Uhlig <matzeton@googlemail.com>2020-06-04 17:40:05 +0200
commit192ddbe71639da20202285ea9665a25c924810da (patch)
tree025613071d0d253f08a2aae3ab676b1e0b0d948a /Makefile
parent38b113d8c3d2be85bf3368186ec1ef6cd6a4472d (diff)
Makefile use -I and -rpath if CUSTOM_LIBNDPI variable used
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 4 insertions, 0 deletions
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