diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -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 $@ |