From fdcf8e9b3908b6362aa8b7faabf573eb5415f342 Mon Sep 17 00:00:00 2001 From: Jari Vetoniemi Date: Tue, 17 Mar 2020 12:03:53 +0200 Subject: [PATCH] make: fix soname --- GNUmakefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index 5b7b081..ee271ce 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -35,10 +35,12 @@ wayland: bemenu-renderer-wayland.so %.a: $(LINK.c) -c $(filter %.c,$^) $(LDLIBS) -o $@ +$(libs): private override full=$(addsuffix .$(VERSION), $@) +$(libs): private override major=$(addsuffix .$(firstword $(subst ., ,$(VERSION))), $@) $(libs): %: VERSION .git/index - $(LINK.c) -shared -fPIC $(filter %.c %.a,$^) $(LDLIBS) -o $(addsuffix .$(VERSION), $@) -Wl,-soname - ln -fs $(addsuffix .$(VERSION), $@) $(addsuffix .$(firstword $(subst ., ,$(VERSION))), $@) - ln -fs $(addsuffix .$(VERSION), $@) $@ + $(LINK.c) -shared -fPIC $(filter %.c %.a,$^) $(LDLIBS) -o $(full) -Wl,-soname=$(major) + ln -fs $(full) $(major) + ln -fs $(full) $@ $(pkgconfigs): %: VERSION %.in sed "s/@VERSION@/$(VERSION)/;s,@PREFIX@,$(PREFIX),;s,@LIBDIR@,$(libdir)," $(addsuffix .in, $@) > $@