aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 $@