Engage bsaes-x86_64.pl, bit-sliced AES.
[openssl.git] / crypto / aes / Makefile
index 8c05e8ee2fe1170d15e89c6c070cc5a3ca2b19af..86e97f335ed82d36198bac436611023b59fd3502 100644 (file)
@@ -8,12 +8,10 @@ CC=   cc
 CPP=   $(CC) -E
 INCLUDES=
 CFLAG=-g
-MAKEDEPPROG=   makedepend
-MAKEDEPEND=    $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
 MAKEFILE=      Makefile
 AR=            ar r
 
-AES_ASM_OBJ=aes_core.o aes_cbc.o
+AES_ENC=aes_core.o aes_cbc.o
 
 CFLAGS= $(INCLUDES) $(CFLAG)
 ASFLAGS= $(INCLUDES) $(ASFLAG)
@@ -25,8 +23,10 @@ TEST=
 APPS=
 
 LIB=$(TOP)/libcrypto.a
-LIBSRC=aes_core.c aes_misc.c aes_ecb.c aes_cbc.c aes_cfb.c aes_ofb.c aes_ctr.c
-LIBOBJ=aes_misc.o aes_ecb.o aes_cfb.o aes_ofb.o aes_ctr.o $(AES_ASM_OBJ)
+LIBSRC=aes_core.c aes_misc.c aes_ecb.c aes_cbc.c aes_cfb.c aes_ofb.c \
+       aes_ige.c aes_wrap.c
+LIBOBJ=aes_misc.o aes_ecb.o aes_cfb.o aes_ofb.o aes_ige.o aes_wrap.o \
+       $(AES_ENC)
 
 SRC= $(LIBSRC)
 
@@ -41,21 +41,46 @@ top:
 all:   lib
 
 lib:   $(LIBOBJ)
-       $(AR) $(LIB) $(LIBOBJ)
+       $(ARX) $(LIB) $(LIBOBJ)
        $(RANLIB) $(LIB) || echo Never mind.
        @touch lib
 
-$(LIBOBJ): $(LIBSRC)
-
 aes-ia64.s: asm/aes-ia64.S
        $(CC) $(CFLAGS) -E asm/aes-ia64.S > $@
 
-ax86-elf.s: asm/aes-586.pl ../perlasm/x86asm.pl
-       (cd asm; $(PERL) aes-586.pl elf $(CFLAGS) $(PROCESSOR) > ../$@)
-ax86-cof.s: asm/aes-586.pl ../perlasm/x86asm.pl
-       (cd asm; $(PERL) aes-586.pl coff $(CFLAGS) $(PROCESSOR) > ../$@)
-ax86-out.s: asm/aes-586.pl ../perlasm/x86asm.pl
-       (cd asm; $(PERL) aes-586.pl a.out $(CFLAGS) $(PROCESSOR) > ../$@)
+aes-586.s:     asm/aes-586.pl ../perlasm/x86asm.pl
+       $(PERL) asm/aes-586.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
+vpaes-x86.s:   asm/vpaes-x86.pl ../perlasm/x86asm.pl
+       $(PERL) asm/vpaes-x86.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
+aesni-x86.s:   asm/aesni-x86.pl ../perlasm/x86asm.pl
+       $(PERL) asm/aesni-x86.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
+
+aes-x86_64.s: asm/aes-x86_64.pl
+       $(PERL) asm/aes-x86_64.pl $(PERLASM_SCHEME) > $@
+vpaes-x86_64.s:        asm/vpaes-x86_64.pl
+       $(PERL) asm/vpaes-x86_64.pl $(PERLASM_SCHEME) > $@
+bsaes-x86_64.s:        asm/bsaes-x86_64.pl
+       $(PERL) asm/bsaes-x86_64.pl $(PERLASM_SCHEME) > $@
+aesni-x86_64.s: asm/aesni-x86_64.pl
+       $(PERL) asm/aesni-x86_64.pl $(PERLASM_SCHEME) > $@
+aesni-sha1-x86_64.s:   asm/aesni-sha1-x86_64.pl
+       $(PERL) asm/aesni-sha1-x86_64.pl $(PERLASM_SCHEME) > $@
+
+aes-sparcv9.s: asm/aes-sparcv9.pl
+       $(PERL) asm/aes-sparcv9.pl $(CFLAGS) > $@
+
+aes-ppc.s:     asm/aes-ppc.pl
+       $(PERL) asm/aes-ppc.pl $(PERLASM_SCHEME) $@
+
+aes-parisc.s:  asm/aes-parisc.pl
+       $(PERL) asm/aes-parisc.pl $(PERLASM_SCHEME) $@
+
+aes-mips.s:    asm/aes-mips.pl
+       $(PERL) asm/aes-mips.pl $(PERLASM_SCHEME) $@
+
+# GNU make "catch all"
+aes-%.S:       asm/aes-%.pl;   $(PERL) $< $(PERLASM_SCHEME) $@
+aes-armv4.o:   aes-armv4.S
 
 files:
        $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
@@ -65,9 +90,7 @@ links:
        @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
        @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
 
-install: installs
-
-installs:
+install:
        @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
        @headerlist="$(EXHEADER)"; for i in $$headerlist ; \
        do  \
@@ -84,6 +107,7 @@ lint:
        lint -DLINT $(INCLUDES) $(SRC)>fluff
 
 depend:
+       @[ -n "$(MAKEDEPEND)" ] # should be set by upper Makefile...
        $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
 
 dclean:
@@ -95,19 +119,49 @@ clean:
 
 # DO NOT DELETE THIS LINE -- make depend depends on it.
 
-aes_cbc.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h
-aes_cbc.o: ../../include/openssl/opensslconf.h aes_cbc.c aes_locl.h
-aes_cfb.o: ../../e_os.h ../../include/openssl/aes.h
-aes_cfb.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
-aes_cfb.o: aes_cfb.c aes_locl.h
-aes_core.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h
-aes_core.o: ../../include/openssl/opensslconf.h aes_core.c aes_locl.h
-aes_ctr.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h
-aes_ctr.o: ../../include/openssl/opensslconf.h aes_ctr.c aes_locl.h
-aes_ecb.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h
-aes_ecb.o: ../../include/openssl/opensslconf.h aes_ecb.c aes_locl.h
+aes_cbc.o: ../../include/openssl/aes.h ../../include/openssl/crypto.h
+aes_cbc.o: ../../include/openssl/e_os2.h ../../include/openssl/modes.h
+aes_cbc.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
+aes_cbc.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
+aes_cbc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
+aes_cbc.o: aes_cbc.c
+aes_cfb.o: ../../include/openssl/aes.h ../../include/openssl/crypto.h
+aes_cfb.o: ../../include/openssl/e_os2.h ../../include/openssl/modes.h
+aes_cfb.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
+aes_cfb.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
+aes_cfb.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
+aes_cfb.o: aes_cfb.c
+aes_core.o: ../../include/openssl/aes.h ../../include/openssl/crypto.h
+aes_core.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
+aes_core.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
+aes_core.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
+aes_core.o: ../../include/openssl/symhacks.h aes_core.c aes_locl.h
+aes_ecb.o: ../../include/openssl/aes.h ../../include/openssl/crypto.h
+aes_ecb.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
+aes_ecb.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
+aes_ecb.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
+aes_ecb.o: ../../include/openssl/symhacks.h aes_ecb.c aes_locl.h
+aes_ige.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/bio.h
+aes_ige.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
+aes_ige.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
+aes_ige.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
+aes_ige.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
+aes_ige.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
+aes_ige.o: ../../include/openssl/symhacks.h ../cryptlib.h aes_ige.c aes_locl.h
 aes_misc.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h
 aes_misc.o: ../../include/openssl/opensslconf.h
 aes_misc.o: ../../include/openssl/opensslv.h aes_locl.h aes_misc.c
-aes_ofb.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h
-aes_ofb.o: ../../include/openssl/opensslconf.h aes_locl.h aes_ofb.c
+aes_ofb.o: ../../include/openssl/aes.h ../../include/openssl/crypto.h
+aes_ofb.o: ../../include/openssl/e_os2.h ../../include/openssl/modes.h
+aes_ofb.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
+aes_ofb.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
+aes_ofb.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
+aes_ofb.o: aes_ofb.c
+aes_wrap.o: ../../e_os.h ../../include/openssl/aes.h
+aes_wrap.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
+aes_wrap.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
+aes_wrap.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
+aes_wrap.o: ../../include/openssl/opensslconf.h
+aes_wrap.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
+aes_wrap.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
+aes_wrap.o: ../../include/openssl/symhacks.h ../cryptlib.h aes_wrap.c