aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2015-04-16 19:04:13 +0200
committerMattias Andrée <maandree@operamail.com>2015-04-16 19:04:13 +0200
commitf8d0c882833f4b47b03c2cfbd5ad6a12b98c51ab (patch)
treeaa590ad78e66b22deb974651cc2e88abe8fe707d
parentmakefile: add .so file (diff)
downloadbus-f8d0c882833f4b47b03c2cfbd5ad6a12b98c51ab.tar.gz
bus-f8d0c882833f4b47b03c2cfbd5ad6a12b98c51ab.tar.bz2
bus-f8d0c882833f4b47b03c2cfbd5ad6a12b98c51ab.tar.xz
add soname to .so file
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r--Makefile10
1 files 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 $@