diff --git a/ChangeLog b/ChangeLog index 1ff7caf2b..d10791f4f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -23,6 +23,7 @@ Bugfix * Fix missing -static-libgcc when building shared libraries for Windows with make. * Fix link error when building shared libraries for Windows with make. + * Fix error when loading libmbedtls.so. Changes * The PEM parser now accepts a trailing space at end of lines (#226). diff --git a/library/Makefile b/library/Makefile index 6cfd0606f..f72ae8e35 100644 --- a/library/Makefile +++ b/library/Makefile @@ -93,9 +93,9 @@ libmbedtls.a: $(OBJS_TLS) echo " RL $@" $(AR) s $@ -libmbedtls.$(SOEXT_TLS): $(OBJS_TLS) +libmbedtls.$(SOEXT_TLS): $(OBJS_TLS) libmbedx509.so echo " LD $@" - $(CC) -shared -Wl,-soname,$@ $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ $(OBJS_TLS) + $(CC) -shared -Wl,-soname,$@ -L. -lmbedcrypto -lmbedx509 $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ $(OBJS_TLS) libmbedtls.so: libmbedtls.$(SOEXT_TLS) echo " LN $@ -> $<" @@ -116,9 +116,9 @@ libmbedx509.a: $(OBJS_X509) echo " RL $@" $(AR) s $@ -libmbedx509.$(SOEXT_X509): $(OBJS_X509) +libmbedx509.$(SOEXT_X509): $(OBJS_X509) libmbedcrypto.so echo " LD $@" - $(CC) -shared -Wl,-soname,$@ $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ $(OBJS_X509) + $(CC) -shared -Wl,-soname,$@ -L. -lmbedcrypto $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ $(OBJS_X509) libmbedx509.so: libmbedx509.$(SOEXT_X509) echo " LN $@ -> $<"