diff options
Diffstat (limited to 'Makefile.shared')
-rw-r--r-- | Makefile.shared | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/Makefile.shared b/Makefile.shared index 8bc6dd4ccd..6970e58da7 100644 --- a/Makefile.shared +++ b/Makefile.shared @@ -248,16 +248,21 @@ link_o.cygwin: INHIBIT_SYMLINKS=yes; \ SHLIB=cyg$(LIBNAME); \ base=-Wl,--enable-auto-image-base; \ + deffile=; \ if expr $(PLATFORM) : 'mingw' > /dev/null; then \ - SHLIB=$(LIBNAME); base=; \ + SHLIB=$(LIBNAME)eay32; base=; \ + if test -f $(LIBNAME)eay32.def; then \ + deffile=$(LIBNAME)eay32.def; \ + fi; \ fi; \ SHLIB_SUFFIX=.dll; \ LIBVERSION="$(LIBVERSION)"; \ SHLIB_SOVER=${LIBVERSION:+"-$(LIBVERSION)"}; \ ALLSYMSFLAGS='-Wl,--whole-archive'; \ NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \ - SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared $$base -Wl,-s,-Bsymbolic"; \ + SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared $$base $$deffile -Wl,-s,-Bsymbolic"; \ $(LINK_SO_O) +#for mingw target if def-file is in use dll-name should match library-name link_a.cygwin: @ $(CALC_VERSIONS); \ INHIBIT_SYMLINKS=yes; \ @@ -265,9 +270,13 @@ link_a.cygwin: dll_name=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX; extras=; \ base=-Wl,--enable-auto-image-base; \ if expr $(PLATFORM) : 'mingw' > /dev/null; then \ - SHLIB=$(LIBNAME); SHLIB_SOVER=32; \ + case $(LIBNAME) in \ + crypto) SHLIB=libeay;; \ + ssl) SHLIB=ssleay;; \ + esac; \ + SHLIB_SOVER=32; \ extras="$(LIBNAME).def"; \ - $(PERL) util/mkdef.pl 32 $(LIBNAME) > $$extras; \ + $(PERL) util/mkdef.pl 32 $$SHLIB > $$extras; \ base=; [ $(LIBNAME) = "crypto" ] && base=-Wl,--image-base,0x63000000; \ fi; \ dll_name=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX; \ |