engine/Makefile: harmonize engine install rule for .dylib extension on MacOS X.
[openssl.git] / engines / ccgost / Makefile
index e2a2fda..dadb523 100644 (file)
@@ -25,7 +25,7 @@ tags:
        ctags $(SRC)
 
 errors:
-       $(PERL) ../../util/mkerr.pl -conf gost.ec -nostatic -debug -write $(SRC)
+       $(PERL) ../../util/mkerr.pl -conf gost.ec -nostatic -write $(SRC)
 
 lib: $(LIBOBJ)
        if [ -n "$(SHARED_LIBS)" ]; then \
@@ -39,25 +39,27 @@ lib: $(LIBOBJ)
        fi
        @touch lib
 
-install:       
+install:
        [ -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 \
-                       *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; \
-                       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 \
-                       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; \
-               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:
@@ -144,8 +146,9 @@ gost_ameth.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
 gost_ameth.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
 gost_ameth.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
 gost_ameth.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h
-gost_ameth.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
-gost_ameth.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
+gost_ameth.o: ../../include/openssl/err.h ../../include/openssl/evp.h
+gost_ameth.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
+gost_ameth.o: ../../include/openssl/objects.h
 gost_ameth.o: ../../include/openssl/opensslconf.h
 gost_ameth.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
 gost_ameth.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
@@ -189,9 +192,9 @@ gost_ctl.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
 gost_ctl.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
 gost_ctl.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
 gost_ctl.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h
-gost_ctl.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
-gost_ctl.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
-gost_ctl.o: ../../include/openssl/opensslconf.h
+gost_ctl.o: ../../include/openssl/err.h ../../include/openssl/evp.h
+gost_ctl.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
+gost_ctl.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
 gost_ctl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
 gost_ctl.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
 gost_ctl.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
@@ -204,9 +207,9 @@ gost_eng.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
 gost_eng.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
 gost_eng.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
 gost_eng.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h
-gost_eng.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
-gost_eng.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
-gost_eng.o: ../../include/openssl/opensslconf.h
+gost_eng.o: ../../include/openssl/err.h ../../include/openssl/evp.h
+gost_eng.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
+gost_eng.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
 gost_eng.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
 gost_eng.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
 gost_eng.o: ../../include/openssl/sha.h ../../include/openssl/stack.h