diff options
author | Mattias Andrée <maandree@operamail.com> | 2015-04-16 19:04:13 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2015-04-16 19:04:13 +0200 |
commit | f8d0c882833f4b47b03c2cfbd5ad6a12b98c51ab (patch) | |
tree | aa590ad78e66b22deb974651cc2e88abe8fe707d /Makefile | |
parent | makefile: add .so file (diff) | |
download | bus-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 '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 $@ |