From 145422f74db8b27483a841e72f6b0d8c714cc5b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Mon, 26 Jan 2015 18:26:10 +0100 Subject: [PATCH] Make now creates libmbedtls.so with polarssl link --- library/Makefile | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/library/Makefile b/library/Makefile index 36c8a40e0..a7190d69e 100644 --- a/library/Makefile +++ b/library/Makefile @@ -22,7 +22,7 @@ ifdef SHARED CFLAGS += -fPIC endif -SONAME=libpolarssl.so.7 +SONAME=libmbedtls.so.7 DLEXT=so.7 # OSX shared library extension: @@ -73,7 +73,7 @@ endif static: libpolarssl.a -shared: libpolarssl.$(DLEXT) libpolarssl.so +shared: libpolarssl.so libpolarssl.a: libmbedtls.a echo " LN $@ -> $?" @@ -89,19 +89,27 @@ libmbedtls.a: $(OBJS) echo " RL $@" $(AR) s $@ -libpolarssl.${DLEXT}: $(OBJS) +libpolarssl.so: libmbedtls.so + echo " LN $@ -> $?" +ifndef WINDOWS + ln -sf $? $@ +else + copy /y /b $? $@ +endif + +libmbedtls.${DLEXT}: $(OBJS) echo " LD $@" $(CC) ${LDFLAGS} -shared -Wl,-soname,$(SONAME) -o $@ $(OBJS) -libpolarssl.so: libpolarssl.${DLEXT} - echo " LN $@ -> libpolarssl.${DLEXT}" - ln -sf libpolarssl.${DLEXT} $@ +libmbedtls.so: libmbedtls.${DLEXT} + echo " LN $@ -> libmbedtls.${DLEXT}" + ln -sf libmbedtls.${DLEXT} $@ -libpolarssl.dylib: $(OBJS) +libmbedtls.dylib: $(OBJS) echo " LD $@" $(CC) ${LDFLAGS} -dynamiclib -o $@ $(OBJS) -libpolarssl.dll: $(OBJS) +libmbedtls.dll: $(OBJS) echo " LD $@" $(CC) -shared -Wl,-soname,$@ -o $@ $(OBJS) -lws2_32 -lwinmm -lgdi32