aboutsummaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorGuido Falsi <mad@madpilot.net>2018-10-29 17:06:58 +0100
committerGuido Falsi <mad@madpilot.net>2018-10-29 17:06:58 +0100
commitc2169b3dca4e9fb1fc77e23873d9c86a048f540c (patch)
tree84451912f087bb67a42c487c4ec716030964032a /src/lib
parent01444f79e1a780259090a68fbdb73eacfacd5d5b (diff)
Add command line options to correctly populate the shared object SONAME property.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/Makefile.in3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/Makefile.in b/src/lib/Makefile.in
index 216595430..6cbe4437c 100644
--- a/src/lib/Makefile.in
+++ b/src/lib/Makefile.in
@@ -19,6 +19,7 @@ RANLIB = ranlib
OBJECTS = $(patsubst protocols/%.c, protocols/%.o, $(wildcard protocols/*.c)) $(patsubst third_party/src/%.c, third_party/src/%.o, $(wildcard third_party/src/*.c)) ndpi_main.o
HEADERS = $(wildcard ../include/*.h)
+NDPI_VERSION_MAJOR = @NDPI_MAJOR@
NDPI_LIB_STATIC = libndpi.a
NDPI_LIB_SHARED_BASE = libndpi.so
NDPI_LIB_SHARED = $(NDPI_LIB_SHARED_BASE).@NDPI_VERSION_SHORT@
@@ -37,7 +38,7 @@ $(NDPI_LIB_STATIC): $(OBJECTS)
$(RANLIB) $@
$(NDPI_LIB_SHARED): $(OBJECTS)
- $(CC) -shared -fPIC -o $@ $(OBJECTS)
+ $(CC) -shared -fPIC -Wl,-soname,$(NDPI_LIB_SHARED_BASE).$(NDPI_VERSION_MAJOR) -o $@ $(OBJECTS)
ln -Ffs $(NDPI_LIB_SHARED) $(NDPI_LIB_SHARED_BASE)
%.o: %.c $(HEADERS) Makefile