Make bn2dec work on "SIXTY_FOUR_BIT" platforms.
[openssl.git] / engines / Makefile
index b8fb1e9a0a386babd89299fa83e45192281f0aac..7796cb53511a1aa8cfbe7c121c891756577c5235 100644 (file)
@@ -1,5 +1,5 @@
 #
-# SSLeay/engines/Makefile
+# OpenSSL/engines/Makefile
 #
 
 DIR=   engines
@@ -9,6 +9,12 @@ INCLUDES= -I../include
 CFLAG=-g
 MAKEFILE=      Makefile
 AR=            ar r
+EDIRS= ccgost
+
+RECURSIVE_MAKE=        [ -n "$(EDIRS)" ] && for i in $(EDIRS) ; do \
+                   (cd $$i && echo "making $$target in $(DIR)/$$i..." && \
+                   $(MAKE) -e TOP=../.. DIR=$$i $$target ) || exit 1; \
+               done;
 
 PEX_LIBS=
 EX_LIBS=
@@ -20,7 +26,7 @@ TEST=
 APPS=
 
 LIB=$(TOP)/libcrypto.a
-LIBNAMES= 4758cca aep atalla cswift gmp chil nuron sureware ubsec
+LIBNAMES= 4758cca aep atalla cswift gmp chil nuron sureware ubsec padlock
 
 LIBSRC=        e_4758cca.c \
        e_aep.c \
@@ -30,7 +36,8 @@ LIBSRC=       e_4758cca.c \
        e_chil.c \
        e_nuron.c \
        e_sureware.c \
-       e_ubsec.c
+       e_ubsec.c \
+       e_padlock.c
 LIBOBJ= e_4758cca.o \
        e_aep.o \
        e_atalla.o \
@@ -39,7 +46,8 @@ LIBOBJ= e_4758cca.o \
        e_chil.o \
        e_nuron.o \
        e_sureware.o \
-       e_ubsec.o
+       e_ubsec.o \
+       e_padlock.o
 
 SRC= $(LIBSRC)
 
@@ -59,7 +67,7 @@ ALL=    $(GENERAL) $(SRC) $(HEADER)
 top:
        (cd ..; $(MAKE) DIRS=$(DIR) all)
 
-all:   lib
+all:   lib subdirs
 
 lib:   $(LIBOBJ)
        @if [ -n "$(SHARED_LIBS)" ]; then \
@@ -76,14 +84,21 @@ lib:        $(LIBOBJ)
        fi; \
        touch lib
 
+subdirs:
+       echo $(EDIRS)
+       @target=all; $(RECURSIVE_MAKE)
+
 files:
        $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
+       @target=files; $(RECURSIVE_MAKE)
 
 links:
+       @target=links; $(RECURSIVE_MAKE)
 
 # XXXXX This currently only works on systems that use .so as suffix
 # for shared libraries as well as for Cygwin which uses the
 # dlfcn_name_converter and therefore stores the engines with .so suffix, too.
+# XXXXX This was extended to HP-UX dl targets, which use .sl suffix.
 install:
        @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
        @if [ -n "$(SHARED_LIBS)" ]; then \
@@ -91,14 +106,22 @@ install:
                for l in $(LIBNAMES); do \
                        ( echo installing $$l; \
                          if [ "$(PLATFORM)" != "Cygwin" ]; then \
-                                 cp lib$$l.so $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.so.new; \
+                               case "$(CFLAGS)" in \
+                               *DSO_BEOS*)     sfx="so";;      \
+                               *DSO_DLFCN*)    sfx="so";;      \
+                               *DSO_DL*)       sfx="sl";;      \
+                               *)              sfx="bad";;     \
+                               esac; \
+                               cp lib$$l.$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.$$sfx.new; \
                          else \
-                                 cp cyg$$l.dll $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.so.new; \
+                               sfx="so"; \
+                               cp cyg$$l.dll $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.$$sfx.new; \
                          fi; \
-                         chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.so.new; \
-                         mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.so.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.so ); \
+                         chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.$$sfx.new; \
+                         mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.$$sfx ); \
                done; \
        fi
+       @target=install; $(RECURSIVE_MAKE)
 
 tags:
        ctags $(SRC)
@@ -108,25 +131,29 @@ errors:
                $(PERL) ../util/mkerr.pl -conf e_$$l.ec \
                        -nostatic -staticloader -write e_$$l.c; \
        done
+       (cd ccgost; $(MAKE) PERL=$(PERL) errors)
 
 tests:
 
 lint:
        lint -DLINT $(INCLUDES) $(SRC)>fluff
+       @target=lint; $(RECURSIVE_MAKE)
 
 depend:
        @if [ -z "$(THIS)" ]; then \
            $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; \
-       else \
-           $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC); \
        fi
+       @[ -z "$(THIS)" ] || $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
+       @[ -z "$(THIS)" ] || (set -e; target=depend; $(RECURSIVE_MAKE) )
 
 dclean:
        $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
        mv -f Makefile.new $(MAKEFILE)
+       @target=dclean; $(RECURSIVE_MAKE)
 
 clean:
        rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
+       @target=clean; $(RECURSIVE_MAKE)
 
 # DO NOT DELETE THIS LINE -- make depend depends on it.
 
@@ -211,6 +238,16 @@ e_nuron.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
 e_nuron.o: ../include/openssl/ossl_typ.h ../include/openssl/rsa.h
 e_nuron.o: ../include/openssl/safestack.h ../include/openssl/stack.h
 e_nuron.o: ../include/openssl/symhacks.h e_nuron.c e_nuron_err.c e_nuron_err.h
+e_padlock.o: ../include/openssl/aes.h ../include/openssl/asn1.h
+e_padlock.o: ../include/openssl/bio.h ../include/openssl/crypto.h
+e_padlock.o: ../include/openssl/dso.h ../include/openssl/e_os2.h
+e_padlock.o: ../include/openssl/engine.h ../include/openssl/err.h
+e_padlock.o: ../include/openssl/evp.h ../include/openssl/lhash.h
+e_padlock.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
+e_padlock.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+e_padlock.o: ../include/openssl/ossl_typ.h ../include/openssl/rand.h
+e_padlock.o: ../include/openssl/safestack.h ../include/openssl/stack.h
+e_padlock.o: ../include/openssl/symhacks.h e_padlock.c
 e_sureware.o: ../include/openssl/asn1.h ../include/openssl/bio.h
 e_sureware.o: ../include/openssl/bn.h ../include/openssl/buffer.h
 e_sureware.o: ../include/openssl/crypto.h ../include/openssl/dh.h