Welcome to little lamb

Code » anopa » commit d72e4db

Makefile: Fix install w/ dynamic library

author Olivier Brunel
2016-01-18 13:58:52 UTC
committer Olivier Brunel
2016-01-18 13:58:52 UTC
parent 3c3aa35ff0e31bf3fb75d365399acf31687735d4

Makefile: Fix install w/ dynamic library

We only use 3 version numbers.

Thanks to linsam; Fixes #2

Makefile +2 -4

diff --git a/Makefile b/Makefile
index 8d7c360..41f7ee7 100644
--- a/Makefile
+++ b/Makefile
@@ -21,7 +21,6 @@ include package/deps.mak
 
 version_m := $(basename $(version))
 version_M := $(basename $(version_m))
-version_l := $(basename $(version_M))
 CPPFLAGS_ALL := -iquote src/include-local -Isrc/include $(CPPFLAGS)
 CFLAGS_ALL := $(CFLAGS) -pipe -Wall
 CFLAGS_SHARED := -fPIC
@@ -95,8 +94,7 @@ $(DESTDIR)$(dynlibdir)/lib%.so: lib%.so
 	$(INSTALL) -D -m 755 $< $@.$(version) && \
 	$(INSTALL) -l $<.$(version) $@.$(version_m) && \
 	$(INSTALL) -l $<.$(version_m) $@.$(version_M) && \
-	$(INSTALL) -l $<.$(version_M) $@.$(version_l) && \
-	exec $(INSTALL) -l $<.$(version_l) $@
+	exec $(INSTALL) -l $<.$(version_M) $@
 
 $(DESTDIR)$(libexecdir)/% $(DESTDIR)$(bindir)/% $(DESTDIR)$(sbindir)/%: % package/modes
 	exec $(INSTALL) -D -m 600 $< $@
@@ -127,7 +125,7 @@ lib%.a:
 	exec $(RANLIB) $@
 
 lib%.so:
-	exec $(REALCC) -o $@ $(CFLAGS_ALL) $(CFLAGS_SHARED) $(LDFLAGS_ALL) $(LDFLAGS_SHARED) -Wl,-soname,$@.$(version_l) $^
+	exec $(REALCC) -o $@ $(CFLAGS_ALL) $(CFLAGS_SHARED) $(LDFLAGS_ALL) $(LDFLAGS_SHARED) -Wl,-soname,$@.$(version_M) $^
 
 $(ALL_SCRIPTS):
 	exec sed -e "s/@VERSION@/$(version)/g" -e "s/@BINDIR@/$(subst /,\/,$(bindir))/g" \