Changes to make shared library building and use work better with Cygwin
authorRichard Levitte <levitte@openssl.org>
Fri, 15 Nov 2002 16:49:34 +0000 (16:49 +0000)
committerRichard Levitte <levitte@openssl.org>
Fri, 15 Nov 2002 16:49:34 +0000 (16:49 +0000)
CHANGES
Makefile.org
apps/Makefile.ssl
test/Makefile.ssl

diff --git a/CHANGES b/CHANGES
index ef62eaf0b2235b96ba8b3327c565f7787e0033d3..8a1e5270fe41624fb77d478cb12235b9ec823c7a 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -4,6 +4,11 @@
 
  Changes between 0.9.6h and 0.9.7  [XX xxx 2002]
 
+  *) Change the DLL names for Cygwin to cygcrypto-x.y.z.dll and
+     cygssl-x.y.z.dll, where x, y and z are the major, minor and
+     edit numbers of the version.
+     [Corinna Vinschen <vinschen@redhat.com> and Richard Levitte]
+
   *) Introduce safe string copy and catenation functions
      (BUF_strlcpy() and BUF_strlcat()).
      [Ben Laurie (CHATS) and Richard Levitte]
index 2fee4ceab700cb48ec4fbf2f9ca862631c920925..9c0c08eeaebe5b87ff211abf66a5b523ef41305f 100644 (file)
@@ -242,7 +242,7 @@ clean-shared:
                fi; \
                ( set -x; rm -f lib$$i$(SHLIB_EXT) ); \
                if [ "$(PLATFORM)" = "Cygwin" ]; then \
-                       ( set -x; rm -f cyg$$i$(SHLIB_EXT) lib$$i$(SHLIB_EXT).a ); \
+                       ( set -x; rm -f cyg$$i-$(SHLIB_VERSION_NUMBER)$(SHLIB_EXT) lib$$i$(SHLIB_EXT).a ); \
                fi; \
        done
 
@@ -292,7 +292,7 @@ do_darwin-shared:
 
 do_cygwin-shared:
        libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
-       ( set -x; ${CC}  -shared -o cyg$$i.dll \
+       ( set -x; ${CC}  -shared -o cyg$$i-$(SHLIB_VERSION_NUMBER).dll \
                -Wl,-Bsymbolic \
                -Wl,--whole-archive lib$$i.a \
                -Wl,--out-implib,lib$$i.dll.a \
@@ -597,7 +597,8 @@ rehash.time: certs
        @(OPENSSL="`pwd`/apps/openssl"; OPENSSL_DEBUG_MEMORY=on; \
                export OPENSSL OPENSSL_DEBUG_MEMORY; \
                LD_LIBRARY_PATH="`pwd`"; DYLD_LIBRARY_PATH="`pwd`"; SHLIB_PATH="`pwd`"; LIBPATH="`pwd`"; \
-               export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH; \
+               if [ "$(PLATFORM)" != "Cygwin" ]; then PATH="`pwd`:$$PATH"; fi; \
+               export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH PATH; \
                $(PERL) tools/c_rehash certs)
        touch rehash.time
 
@@ -607,7 +608,8 @@ tests: rehash
        @(cd test && echo "testing..." && \
        $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' TESTS='${TESTS}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' TESTS='${TESTS}' OPENSSL_DEBUG_MEMORY=on tests );
        @LD_LIBRARY_PATH="`pwd`"; DYLD_LIBRARY_PATH="`pwd`"; SHLIB_PATH="`pwd`"; LIBPATH="`pwd`"; \
-               export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH; \
+               if [ "$(PLATFORM)" != "Cygwin" ]; then PATH="`pwd`:$$PATH"; fi; \
+               export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH PATH; \
                apps/openssl version -a
 
 report:
@@ -741,7 +743,7 @@ install: all install_docs
                                        chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
                                        mv $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
                                else \
-                                       c=`echo $$i | sed 's/^lib/cyg/'`; \
+                                       c=`echo $$i | sed 's/^lib\(.*\)/cyg\1-$(SHLIB_VERSION_NUMBER)/'`; \
                                        cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
                                        chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
                                        mv $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
index eed77eea938f4b74b30b6e4b7da38265013549f3..8871a98415be27f592797060b14c31b867d318dc 100644 (file)
@@ -148,7 +148,8 @@ $(PROGRAM): progs.h $(E_OBJ) $(PROGRAM).o $(DLIBCRYPTO) $(DLIBSSL)
        fi
        -(cd ..; OPENSSL="`pwd`/apps/openssl"; export OPENSSL; \
                LIBPATH="`pwd`"; LD_LIBRARY_PATH="`pwd`"; DYLD_LIBRARY_PATH="`pwd`"; SHLIB_PATH="`pwd`"; \
-               export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH; \
+               if [ "$(PLATFORM)" != "Cygwin" ]; then PATH="`pwd`:$$PATH"; fi; \
+               export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH PATH; \
                $(PERL) tools/c_rehash certs)
 
 progs.h: progs.pl
index 64d87707ddbec4e03575e102d634899bfd202985..8fdfe4321b4d0564de3afc29621e49747697c555 100644 (file)
@@ -118,8 +118,9 @@ tests:      exe apps $(TESTS)
 apps:
        @(cd ..; $(MAKE) DIRS=apps all)
 
-SET_SO_PATHS=LIBPATH="`cd ..; pwd`"; LD_LIBRARY_PATH=$$LIBPATH; DYLD_LIBRARY_PATH=$$LIBPATH; SHLIB_PATH=$$LIBPATH; \
-               export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH
+SET_SO_PATHS=LIBPATH="`cd ..; pwd`"; LD_LIBRARY_PATH="$$LIBPATH"; DYLD_LIBRARY_PATH="$$LIBPATH"; SHLIB_PATH="$$LIBPATH"; \
+               if [ "$(PLATFORM)" != "Cygwin" ]; then PATH="$$LIBPATH:$$PATH"; fi; \
+               export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH PATH
 
 alltests: \
        test_des test_idea test_sha test_md4 test_md5 test_hmac \