From f8d0c882833f4b47b03c2cfbd5ad6a12b98c51ab Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 16 Apr 2015 19:04:13 +0200 Subject: add soname to .so file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- Makefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 2195289..eedb726 100644 --- a/Makefile +++ b/Makefile @@ -3,20 +3,24 @@ FLAGS = -std=c99 -Wall -Wextra -pedantic -O2 +LIB_MAJOR = 1 +LIB_MINOR = 0 +LIB_VERSION = ${LIB_MAJOR}.${LIB_MINOR} + all: bus -bus: bin/bus bin/libbus.so +bus: bin/bus bin/libbus.so.$(LIB_MAJOR) bin/bus: obj/cmdline-nofpic.o obj/bus-nofpic.o @echo CC -o $@ @mkdir -p bin @${CC} ${FLAGS} -o $@ $^ ${LDFLAGS} -bin/libbus.so: obj/bus-fpic.o +bin/libbus.so.${LIB_VERSION}: obj/bus-fpic.o @echo CC -o $@ @mkdir -p bin - @${CC} ${FLAGS} -shared -o $@ $^ ${LDFLAGS} + @${CC} ${FLAGS} -shared -Wl,-soname,libbus.so.${LIB_MAJOR} -o $@ $^ ${LDFLAGS} obj/%-nofpic.o: src/%.c src/*.h @echo CC -c $@ -- cgit v1.2.3-70-g09d2