engine/Makefile: harmonize engine install rule for .dylib extension on MacOS X.
[openssl.git] / engines / ccgost / Makefile
index 737fad3754667d5f24c9cb800339019ab9355b37..dadb5230ecd4595923b3c58878d0330e06f23f18 100644 (file)
@@ -39,25 +39,27 @@ lib: $(LIBOBJ)
        fi
        @touch lib
 
        fi
        @touch lib
 
-install:       
+install:
        [ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
        if [ -n "$(SHARED_LIBS)" ]; then \
                set -e; \
                echo installing $(LIBNAME); \
        [ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
        if [ -n "$(SHARED_LIBS)" ]; then \
                set -e; \
                echo installing $(LIBNAME); \
+               pfx=lib; \
                if [ "$(PLATFORM)" != "Cygwin" ]; then \
                        case "$(CFLAGS)" in \
                if [ "$(PLATFORM)" != "Cygwin" ]; then \
                        case "$(CFLAGS)" in \
-                       *DSO_BEOS*) sfx="so";; \
-                       *DSO_DLFCN*) sfx="so";; \
-                       *DSO_DL*) sfx="sl";; \
-                       *) sfx="bad";; \
+                       *DSO_BEOS*) sfx=".so";; \
+                       *DSO_DLFCN*) sfx=`expr "$(SHLIB_EXT)" : '.*\(\.[a-z][a-z]*\)' \| ".so"`;; \
+                       *DSO_DL*) sfx=".sl";; \
+                       *DSO_WIN32*) sfx="eay32.dll"; pfx=;; \
+                       *) sfx=".bad";; \
                        esac; \
                        esac; \
-                       cp lib$(LIBNAME).$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$(LIBNAME).$$sfx.new; \
+                       cp $${pfx}$(LIBNAME)$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new; \
                else \
                else \
-                       sfx="so"; \
-                       cp cyg$(LIBNAME).dll $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$(LIBNAME).$$sfx.new; \
+                       sfx=".so"; \
+                       cp cyg$(LIBNAME).dll $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new; \
                fi; \
                fi; \
-               chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$(LIBNAME).$$sfx.new; \
-               mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$(LIBNAME).$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$(LIBNAME).$$sfx; \
+               chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new; \
+               mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx; \
        fi
 
 links:
        fi
 
 links: