summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2020-12-01 10:28:44 +0100
committerToni Uhlig <matzeton@googlemail.com>2020-12-01 10:28:44 +0100
commit6f734f9eff342b91e694caf935b848eef5e1ced9 (patch)
tree649c0792dbea557d62295e1086c5b68993a0f795
parentf8692c6be11c664e4345ceaaec5c6b35ba9b3feb (diff)
Set rpath when compiling with use of pkg-config.
* New Makefile target: mocksrvd, fake nDPIsrvd instamce Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
-rw-r--r--Makefile9
1 files changed, 8 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index b81c40188..564afc5a7 100644
--- a/Makefile
+++ b/Makefile
@@ -16,6 +16,10 @@ LUA_CFLAGS=$(shell $(PKG_CONFIG_BIN) --cflags $(LUA_LIBNAME))
LUA_LIBS=$(shell $(PKG_CONFIG_BIN) --libs $(LUA_LIBNAME))
endif
+ifneq ($(PKG_CONFIG_PATH),)
+PROJECT_CFLAGS += -Wl,-rpath='$(shell dirname $(PKG_CONFIG_PATH))'
+endif
+
else # PKG_CONFIG_BIN
ifeq ($(NDPI_WITH_GCRYPT),yes)
@@ -148,4 +152,7 @@ else
endif
@echo '------------------------------------'
-.PHONY: all examples install clean help
+mocksrvd:
+ nc -k -l -U /tmp/ndpid-collector.sock
+
+.PHONY: all examples install clean help mocksrvd