From 4c1a6e004a940a66c1d113ea3656a124e3dca1ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lutz=20J=C3=A4nicke?= Date: Thu, 17 Apr 2008 10:19:16 +0000 Subject: Apply mingw patches as supplied by Roumen Petrov an Alon Bar-Lev PR: 1552 Submitted by: Roumen Petrov , "Alon Bar-Lev" --- Makefile.shared | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'Makefile.shared') 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; \ -- cgit v1.2.3