aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYour Name <you@example.com>2022-02-24 17:00:55 -0500
committerYour Name <you@example.com>2022-02-24 17:00:55 -0500
commite062f308c82fce1d4f0540063b8f99fc323d49d7 (patch)
tree8755c68cecfc270c221f45fc65cb1352ab7b7cff
parent7e7bf42a82c2778354a2ddc40045ac1f6540594f (diff)
downloadlibbible-e062f308c82fce1d4f0540063b8f99fc323d49d7.tar.gz
libbible-e062f308c82fce1d4f0540063b8f99fc323d49d7.tar.bz2
libbible-e062f308c82fce1d4f0540063b8f99fc323d49d7.zip
Creates soname symlink
-rw-r--r--Makefile4
-rw-r--r--src/lib/Makefile2
2 files changed, 4 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index f1bf29d..4b102b5 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,5 @@
export version = 1.0.2
+export soname_version = $(word 1, $(subst ., , $(version)))
override CXXFLAGS += -MMD -Wall -std=c++20
SOURCES = $(wildcard src/*.cc)
OBJECTS = $(SOURCES:.cc=.o)
@@ -26,7 +27,8 @@ test: libbible
install: libbible $(EXECUTABLE)
install -d $(DESTDIR)$(libdir)
install -m 644 src/lib/libbible.so $(DESTDIR)$(libdir)/libbible.so.$(version)
- ln -s libbible.so.$(version) $(DESTDIR)$(libdir)/libbible.so
+ ln -s libbible.so.$(soname_version) $(DESTDIR)$(libdir)/libbible.so
+ ln -s libbible.so.$(version) $(DESTDIR)$(libdir)/libbible.so.$(soname_version)
install -m 644 src/lib/libbible.a $(DESTDIR)$(libdir)
install -d $(DESTDIR)$(includedir)
install -m 644 src/lib/libbible.h $(DESTDIR)$(includedir)
diff --git a/src/lib/Makefile b/src/lib/Makefile
index 4f0d2cf..80b7bb7 100644
--- a/src/lib/Makefile
+++ b/src/lib/Makefile
@@ -5,7 +5,7 @@ SOURCES = $(wildcard *.cc)
OBJECTS = $(SOURCES:.cc=.o)
DEPS = $(OBJECTS:.o=.d)
LIBRARY = libbible
-SONAME = $(LIBRARY).so.$(word 1, $(subst ., , $(version)))
+SONAME = $(LIBRARY).so.$(soname_version)
LIBRARY_STATIC = $(LIBRARY).a
LIBRARY_SHARED = $(LIBRARY).so