From c2169b3dca4e9fb1fc77e23873d9c86a048f540c Mon Sep 17 00:00:00 2001 From: Guido Falsi Date: Mon, 29 Oct 2018 17:06:58 +0100 Subject: Add command line options to correctly populate the shared object SONAME property. --- src/lib/Makefile.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') 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 -- cgit v1.2.3