From 418080010a1dcc1cdcb192e603a8c3b9656dcb1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Fri, 13 Feb 2015 13:15:13 +0000 Subject: [PATCH] Replace SONAME with SOVERSION in makefile - avoids duplication - fixes warning about redefined rule with WINDOWS=1 --- library/Makefile | 12 ++++++------ scripts/bump_version.sh | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/library/Makefile b/library/Makefile index 552cbf221..44a725c14 100644 --- a/library/Makefile +++ b/library/Makefile @@ -22,9 +22,9 @@ ifdef SHARED CFLAGS += -fPIC endif -SONAME=libmbedtls.so.7 +SOVERSION=8 -DLEXT=so.8 +DLEXT=so.$(SOVERSION) # OSX shared library extension: # DLEXT=dylib @@ -89,14 +89,14 @@ libpolarssl.so: libmbedtls.so echo " LN $@ -> $?" ln -sf $? $@ -libmbedtls.${DLEXT}: $(OBJS) - echo " LD $@" - $(CC) ${LDFLAGS} -shared -Wl,-soname,$(SONAME) -o $@ $(OBJS) - libmbedtls.so: libmbedtls.${DLEXT} echo " LN $@ -> libmbedtls.${DLEXT}" ln -sf libmbedtls.${DLEXT} $@ +libmbedtls.so.$(SOVERSION): $(OBJS) + echo " LD $@" + $(CC) ${LDFLAGS} -shared -Wl,-soname,$@ -o $@ $(OBJS) + libmbedtls.dylib: $(OBJS) echo " LD $@" $(CC) ${LDFLAGS} -dynamiclib -o $@ $(OBJS) diff --git a/scripts/bump_version.sh b/scripts/bump_version.sh index ae744516a..3ff5b6096 100755 --- a/scripts/bump_version.sh +++ b/scripts/bump_version.sh @@ -56,7 +56,7 @@ then mv tmp library/CMakeLists.txt [ $VERBOSE ] && echo "Bumping SOVERSION in library/Makefile" - sed -e "s/SONAME=libpolarssl.so.[0-9]\+/SONAME=libpolarssl.so.$SOVERSION/g" -e "s/DLEXT=so.[0-9]\+/DLEXT=so.$SOVERSION/g" < library/Makefile > tmp + sed -e "s/SOVERSION=[0-9]\+/SOVERSION=$SOVERSION/g" < library/Makefile > tmp mv tmp library/Makefile fi