summaryrefslogtreecommitdiff
path: root/src/Makefile
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2020-08-25 15:35:46 +0300
committerTimo Teräs <timo.teras@iki.fi>2020-08-25 15:35:46 +0300
commit2408ad4f9576727bfe24493b01b7609d4b6230e8 (patch)
tree23284f3cd21098383176e2b36ea9864f1f3a6d0a /src/Makefile
parentf25519ec40399595db938b48a4074a31ede02556 (diff)
downloadapk-tools-2408ad4f9576727bfe24493b01b7609d4b6230e8.tar.gz
apk-tools-2408ad4f9576727bfe24493b01b7609d4b6230e8.tar.bz2
apk-tools-2408ad4f9576727bfe24493b01b7609d4b6230e8.tar.xz
apk-tools-2408ad4f9576727bfe24493b01b7609d4b6230e8.zip
build: make soname explicit and simplify and fix soname link
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile28
1 files changed, 10 insertions, 18 deletions
diff --git a/src/Makefile b/src/Makefile
index 606d2ff..186823f 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -16,26 +16,25 @@ ZLIB_CFLAGS := $(shell $(PKG_CONFIG) --cflags zlib)
ZLIB_LIBS := $(shell $(PKG_CONFIG) --libs zlib)
# Dynamic library
-libapk.so.$(VERSION)-objs := \
+libapk_soname := 3.12.0
+libapk_so := $(obj)/libapk.so.$(libapk_soname)
+libapk.so.$(libapk_soname)-objs := \
common.o database.o package.o commit.o solver.o \
version.o atom.o blob.o hash.o print.o \
io.o io_url.o io_gunzip.o io_archive.o
-libapk.so.$(VERSION)-libs := libfetch/libfetch.a
+libapk.so.$(libapk_soname)-libs := libfetch/libfetch.a
-libapk_soname := $(VERSION)
-shlibs-y += libapk.so.$(VERSION)
-LDFLAGS_libapk.so.$(VERSION) += -Wl,-soname,libapk.so.$(libapk_soname)
+shlibs-y += libapk.so.$(libapk_soname)
+LDFLAGS_libapk.so.$(libapk_soname) += -Wl,-soname,libapk.so.$(libapk_soname)
-libapk_so := $(obj)/libapk.so.$(VERSION)
install-libapk_so := $(INSTALLDIR) $(DESTDIR)$(LIBDIR) && \
- $(INSTALL) $(libapk_so) $(DESTDIR)$(LIBDIR)/libapk.so.$(VERSION) && \
- $(INSTALL) $(obj)/libapk.so.$(libapk_soname) $(DESTDIR)$(LIBDIR) && \
- $(INSTALL) $(obj)/libapk.so $(DESTDIR)$(LIBDIR)
+ $(INSTALL) $(libapk_so) $(DESTDIR)$(LIBDIR) && \
+ $(LN) libapk.so.$(libapk_soname) $(DESTDIR)$(LIBDIR)/libapk.so
# Static library
-libapk.a-objs := $(libapk.so.$(VERSION)-objs)
-libapk.a-libs := $(libapk.so.$(VERSION)-libs)
+libapk.a-objs := $(libapk.so.$(libapk_soname)-objs)
+libapk.a-libs := $(libapk.so.$(libapk_soname)-libs)
libs-y += libapk.a
libapk_a := $(obj)/libapk.a
@@ -117,13 +116,6 @@ $(obj)/apk-test: $(libapk_so)
$(obj)/apk.so: $(libapk_so)
-ifneq ($(libapk_soname), $(VERSION))
-generate-y += libapk.so.$(libapk_soname)
-
-$(obj)/libapk.so.$(libapk_soname):
- $(LN) libapk.so.$(VERSION) $(obj)/libapk.so.$(libapk_soname)
-endif
-
generate-y += libapk.so
$(obj)/libapk.so: