summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMaksym Telychko <maksym.telychko@globallogic.com>2019-06-10 15:02:59 +0300
committerMaksym Telychko <maksym.telychko@globallogic.com>2019-06-10 15:02:59 +0300
commit00f886a2eb636a9e44eca0ab47d4125db3e9300a (patch)
treed421d34b212a16b17b08c72619819485132b69d1 /Makefile
parent5a7d8772ea898b3567685431b5a6be13015e5887 (diff)
downloadlibmts-io-00f886a2eb636a9e44eca0ab47d4125db3e9300a.tar.gz
libmts-io-00f886a2eb636a9e44eca0ab47d4125db3e9300a.tar.bz2
libmts-io-00f886a2eb636a9e44eca0ab47d4125db3e9300a.zip
[MTS-MTQ] refactoring: soname links
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 6 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 2fdaf04..e49f5cc 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,7 @@
include version
APPNAME = libmts-io
+SONAME = $(APPNAME).so.$(VERSION)
libdir ?= /usr/lib
OBJS += \
@@ -47,12 +48,12 @@ LDFLAGS += -s -shared -Wl,-soname,$(APPNAME).so.0
.PHONY: all clean install
-all: $(APPNAME).a $(APPNAME).so
+all: $(APPNAME).a $(SONAME)
$(APPNAME).a: $(OBJS)
$(AR) -r $@ $?
-$(APPNAME).so: $(OBJS)
+$(SONAME): $(OBJS)
$(CC) $(LDFLAGS) -o $@ $? $(LDLIBS)
# Handle header dependencies
@@ -63,9 +64,9 @@ CPPFLAGS += -MMD
install:
mkdir -p $(DESTDIR)$(libdir)
mkdir -p $(DESTDIR)$(includedir)/mts
- install -m 0644 $(APPNAME).a $(APPNAME).so $(DESTDIR)$(libdir)/
- ln -sf $(APPNAME).so $(DESTDIR)$(libdir)/$(APPNAME).so.0
- ln -sf $(APPNAME).so.0 $(DESTDIR)$(libdir)/$(APPNAME).so
+ install -m 0644 $(APPNAME).a $(SONAME) $(DESTDIR)$(libdir)/
+ ln -sf $(SONAME) $(DESTDIR)$(libdir)/$(APPNAME).so.0
+ ln -sf $(SONAME) $(DESTDIR)$(libdir)/$(APPNAME).so
install -m 0644 include/mts/* $(DESTDIR)$(includedir)/mts/
clean: