diff options
author | Richard Levitte <levitte@openssl.org> | 2016-02-16 20:37:28 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2016-02-19 11:52:16 +0100 |
commit | 520f434b42c83d63d8777075eb66967618551d5b (patch) | |
tree | b8f92bdf5d01bc68bd91d2724043f3a177b61764 /Makefile.in | |
parent | f99f91f1218d12e2e3a0fe10bb97445984a830c8 (diff) |
Big rename fest of MingW shared libraries
So far, MingW shared libraries were named like this
libeay32.dll + libeay32.dll.a
ssleay32.dll + ssleay32.dll.a
That naming scheme is antiquated, a reminicense of SSLeay. We're
therefore changing the scheme to something that's more like the rest
of OpenSSL.
There are two factors to remember:
- Windows libraries have no recorded SOvers, which means that the
shared library version must be encoded in the name. According to
some, it's unwise to encode extra periods in a Windows file name,
so we convert version number periods to underscores.
- MingW has multilib ability. However, DLLs need to reside with the
binaries that use them, so to allow both 32-bit and 64-bit DLLs to
reside in the same place, we add '-x64' in the name of the 64-bit
ones.
The resulting name scheme (for SOver 1.1) is this:
on x86:
libcrypto-1_1.dll + libcrypto.dll.a
libssl-1_1.dll + libssl.dll.a
on x86_64:
libcrypto-1_1-x64.dll + libcrypto.dll.a
libssl-1_1-x64.dll + libssl.dll.a
An observation is that the import lib is the same for both
architectures. Not to worry, though, as they will be installed in
PREFIX/lib/ for x86 and PREFIX/lib64/ for x86_64.
As a side effect, MingW got its own targets in Makefile.shared.
link_dso.mingw-shared and link_app.mingw-shared are aliases for the
corresponding cygwin-shared targets. link_shlib.mingw-shared is,
however, a target separated from the cygwin one.
Reviewed-by: Andy Polyakov <appro@openssl.org>
Diffstat (limited to 'Makefile.in')
-rw-r--r-- | Makefile.in | 97 |
1 files changed, 57 insertions, 40 deletions
diff --git a/Makefile.in b/Makefile.in index b56cc7c70e..a7cd7570a9 100644 --- a/Makefile.in +++ b/Makefile.in @@ -388,14 +388,15 @@ do_$(SHLIB_TARGET): cp cyg$$i-$(SHLIB_MAJOR).$(SHLIB_MINOR).dll test/; \ ;; \ mingw*) \ - case $$i in \ - crypto) i=libeay32;; \ - ssl) i=ssleay32;; \ - esac; \ - rm -f apps/$$i.dll; \ - rm -f test/$$i.dll; \ - cp $$i.dll apps/; \ - cp $$i.dll test/; \ + arch=; \ + if expr $(PLATFORM) : mingw64 > /dev/null; then \ + arch=-x64; \ + fi; \ + rm -f apps/lib$$i-$(SHLIB_MAJOR)_$(SHLIB_MINOR)$$arch.dll; \ + rm -f test/lib$$i-$(SHLIB_MAJOR)_$(SHLIB_MINOR)$$arch.dll; \ + cp lib$$i-$(SHLIB_MAJOR)_$(SHLIB_MINOR)$$arch.dll apps/; \ + cp lib$$i-$(SHLIB_MAJOR)_$(SHLIB_MINOR)$$arch.dll test/; \ + ;; \ esac; \ done @@ -589,30 +590,40 @@ install_sw: for i in $${tmp:-x}; \ do \ if [ -f "$$i" -o -f "$$i.a" ]; then \ - ( echo installing $$i; \ - if expr "$(PLATFORM)" : "Cygwin" >/dev/null; then \ - c=`echo $$i | sed 's/^lib\(.*\)\.dll\.a/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \ + case "$(PLATFORM)" in \ + Cygwin*) \ + c=`echo $$i | sed 's/^lib\(.*\)\.dll/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \ + echo installing $$c; \ cp $$c $(DESTDIR)$(INSTALLTOP)/bin/$$c.new; \ chmod 755 $(DESTDIR)$(INSTALLTOP)/bin/$$c.new; \ mv -f $(DESTDIR)$(INSTALLTOP)/bin/$$c.new $(DESTDIR)$(INSTALLTOP)/bin/$$c; \ - cp $$i $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \ - chmod 644 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \ - mv -f $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i; \ - else \ + echo installing $$i.a; \ + cp $$i.a $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.a.new; \ + chmod 644 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.a.new; \ + mv -f $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.a.new $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.a; \ + ;; \ + mingw*) \ + arch=; \ + if expr $(PLATFORM) : mingw64 > /dev/null; then \ + arch=-x64; \ + fi; \ + m=`echo $$i | sed -e 's/\.dll$$/-$(SHLIB_MAJOR)_$(SHLIB_MINOR)'"$$arch"'.dll/'`; \ + echo installing $$m; \ + cp $$m $(DESTDIR)$(INSTALLTOP)/bin/$$m.new; \ + chmod 755 $(DESTDIR)$(INSTALLTOP)/bin/$$m.new; \ + mv -f $(DESTDIR)$(INSTALLTOP)/bin/$$m.new $(DESTDIR)$(INSTALLTOP)/bin/$$m; \ + echo installing $$i.a; \ + cp $$i.a $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.a.new; \ + chmod 555 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.a.new; \ + mv -f $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.a.new $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.a; \ + ;; \ + *) \ + echo installing $$i; \ cp $$i $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \ chmod 555 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \ mv -f $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i; \ - fi ); \ - if expr $(PLATFORM) : 'mingw' > /dev/null; then \ - ( case $$i in \ - *crypto*) i=libeay32.dll;; \ - *ssl*) i=ssleay32.dll;; \ - esac; \ - echo installing $$i; \ - cp $$i $(DESTDIR)$(INSTALLTOP)/bin/$$i.new; \ - chmod 755 $(DESTDIR)$(INSTALLTOP)/bin/$$i.new; \ - mv -f $(DESTDIR)$(INSTALLTOP)/bin/$$i.new $(DESTDIR)$(INSTALLTOP)/bin/$$i ); \ - fi; \ + ;; \ + esac; \ fi; \ done; \ ( here="`pwd`"; \ @@ -643,24 +654,30 @@ uninstall_sw: for i in $${tmp:-x}; \ do \ if [ -f "$$i" -o -f "$$i.a" ]; then \ - if expr "$(PLATFORM)" : "Cygwin" >/dev/null; then \ - c=`echo $$i | sed 's/^lib\(.*\)\.dll\.a/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \ + case "$(PLATFORM)" in \ + Cygwin*) \ + c=`echo $$i | sed 's/^lib\(.*\)\.dll/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \ echo $(RM) $(DESTDIR)$(INSTALLTOP)/bin/$$c; \ $(RM) $(DESTDIR)$(INSTALLTOP)/bin/$$c; \ + echo $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.a; \ + $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.a; \ + ;; \ + mingw*) \ + arch=; \ + if expr $(PLATFORM) : mingw64 > /dev/null; then \ + arch=-x64; \ + fi; \ + m=`echo $$i | sed -e 's/\.dll$$/-$(SHLIB_MAJOR)_$(SHLIB_MINOR)'"$$arch"'.dll/'`; \ + echo $(RM) $(DESTDIR)$(INSTALLTOP)/bin/$$m; \ + $(RM) $(DESTDIR)$(INSTALLTOP)/bin/$$m; \ + echo $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.a; \ + $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.a; \ + ;; \ + *) \ echo $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i; \ $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i; \ - else \ - echo $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i; \ - $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i; \ - fi; \ - if expr $(PLATFORM) : 'mingw' > /dev/null; then \ - case $$i in \ - *crypto*) i=libeay32.dll;; \ - *ssl*) i=ssleay32.dll;; \ - esac; \ - echo $(RM) $(DESTDIR)$(INSTALLTOP)/bin/$$i; \ - $(RM) $(DESTDIR)$(INSTALLTOP)/bin/$$i; \ - fi; \ + ;; \ + esac; \ fi; \ done; \ fi |