Make now creates libmbedtls.so with polarssl link

This commit is contained in:
Manuel Pégourié-Gonnard 2015-01-26 18:26:10 +01:00
parent 04a81d5c65
commit 145422f74d

View File

@ -22,7 +22,7 @@ ifdef SHARED
CFLAGS += -fPIC CFLAGS += -fPIC
endif endif
SONAME=libpolarssl.so.7 SONAME=libmbedtls.so.7
DLEXT=so.7 DLEXT=so.7
# OSX shared library extension: # OSX shared library extension:
@ -73,7 +73,7 @@ endif
static: libpolarssl.a static: libpolarssl.a
shared: libpolarssl.$(DLEXT) libpolarssl.so shared: libpolarssl.so
libpolarssl.a: libmbedtls.a libpolarssl.a: libmbedtls.a
echo " LN $@ -> $?" echo " LN $@ -> $?"
@ -89,19 +89,27 @@ libmbedtls.a: $(OBJS)
echo " RL $@" echo " RL $@"
$(AR) s $@ $(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 $@" echo " LD $@"
$(CC) ${LDFLAGS} -shared -Wl,-soname,$(SONAME) -o $@ $(OBJS) $(CC) ${LDFLAGS} -shared -Wl,-soname,$(SONAME) -o $@ $(OBJS)
libpolarssl.so: libpolarssl.${DLEXT} libmbedtls.so: libmbedtls.${DLEXT}
echo " LN $@ -> libpolarssl.${DLEXT}" echo " LN $@ -> libmbedtls.${DLEXT}"
ln -sf libpolarssl.${DLEXT} $@ ln -sf libmbedtls.${DLEXT} $@
libpolarssl.dylib: $(OBJS) libmbedtls.dylib: $(OBJS)
echo " LD $@" echo " LD $@"
$(CC) ${LDFLAGS} -dynamiclib -o $@ $(OBJS) $(CC) ${LDFLAGS} -dynamiclib -o $@ $(OBJS)
libpolarssl.dll: $(OBJS) libmbedtls.dll: $(OBJS)
echo " LD $@" echo " LD $@"
$(CC) -shared -Wl,-soname,$@ -o $@ $(OBJS) -lws2_32 -lwinmm -lgdi32 $(CC) -shared -Wl,-soname,$@ -o $@ $(OBJS) -lws2_32 -lwinmm -lgdi32