summaryrefslogtreecommitdiff
path: root/lib/libcrypto
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2014-05-06 19:55:07 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2014-05-06 19:55:07 +0000
commit99a15ef6952ed1940353861fdf4ba69e6f378d8e (patch)
tree27ed6aa43f065fde4c21687e2b81640b0118e36b /lib/libcrypto
parent74f63d120ed255e6b461e757758a5615966ba04c (diff)
Sort CFLAGS, SRC and SSLASM stanzas by the directories they apply to, to make
these files similar in layout to the other md Makefile.inc; no functional change.
Diffstat (limited to 'lib/libcrypto')
-rw-r--r--lib/libcrypto/arch/amd64/Makefile.inc84
-rw-r--r--lib/libcrypto/arch/i386/Makefile.inc67
2 files changed, 83 insertions, 68 deletions
diff --git a/lib/libcrypto/arch/amd64/Makefile.inc b/lib/libcrypto/arch/amd64/Makefile.inc
index a408186a03a..24f16d0a812 100644
--- a/lib/libcrypto/arch/amd64/Makefile.inc
+++ b/lib/libcrypto/arch/amd64/Makefile.inc
@@ -1,42 +1,57 @@
-# $OpenBSD: Makefile.inc,v 1.1 2014/04/17 18:11:47 miod Exp $
+# $OpenBSD: Makefile.inc,v 1.2 2014/05/06 19:55:06 miod Exp $
# amd64-specific libcrypto build rules
-SRCS+= bf_enc.c des_enc.c fcrypt_b.c
-SRCS+= x86_64-gcc.c
-
-CFLAGS+= -DOPENSSL_BN_ASM_GF2m
-CFLAGS+= -DOPENSSL_BN_ASM_MONT
-CFLAGS+= -DOPENSSL_BN_ASM_MONT5
-CFLAGS+= -DOPENSSL_CPUID_OBJ
-CFLAGS+= -DOPENSSL_IA32_SSE2
-
+# aes
CFLAGS+= -DAES_ASM
+SSLASM+= aes aes-x86_64
CFLAGS+= -DBSAES_ASM
-CFLAGS+= -DGHASH_ASM
+SSLASM+= aes bsaes-x86_64
+CFLAGS+= -DVPAES_ASM
+SSLASM+= aes vpaes-x86_64
+SSLASM+= aes aesni-x86_64
+SSLASM+= aes aesni-sha1-x86_64
+# bf
+SRCS+= bf_enc.c
+# bn
+CFLAGS+= -DOPENSSL_IA32_SSE2
+SSLASM+= bn modexp512-x86_64
+CFLAGS+= -DOPENSSL_BN_ASM_MONT
+SSLASM+= bn x86_64-mont
+CFLAGS+= -DOPENSSL_BN_ASM_MONT5
+SSLASM+= bn x86_64-mont5
+CFLAGS+= -DOPENSSL_BN_ASM_GF2m
+SSLASM+= bn x86_64-gf2m
+# des
+SRCS+= des_enc.c fcrypt_b.c
+# md5
CFLAGS+= -DMD5_ASM
+SSLASM+= md5 md5-x86_64
+# modes
+CFLAGS+= -DGHASH_ASM
+SSLASM+= modes ghash-x86_64
+# rc4
+SSLASM+= rc4 rc4-x86_64
+SSLASM+= rc4 rc4-md5-x86_64
+# ripemd
+# sha
CFLAGS+= -DSHA1_ASM
+SSLASM+= sha sha1-x86_64
CFLAGS+= -DSHA256_ASM
+SRCS+= sha256-x86_64.S
+GENERATED+= sha256-x86_64.S
+sha256-x86_64.S: ${LCRYPTO_SRC}/sha/asm/sha512-x86_64.pl
+ cd ${LCRYPTO_SRC}/sha/asm ; \
+ /usr/bin/perl ./sha512-x86_64.pl ${.OBJDIR}/${.TARGET}
CFLAGS+= -DSHA512_ASM
-CFLAGS+= -DVPAES_ASM
+SRCS+= sha512-x86_64.S
+GENERATED+= sha512-x86_64.S
+sha512-x86_64.S: ${LCRYPTO_SRC}/sha/asm/sha512-x86_64.pl
+ cd ${LCRYPTO_SRC}/sha/asm ; \
+ /usr/bin/perl ./sha512-x86_64.pl ${.OBJDIR}/${.TARGET}
+# whrlpool
CFLAGS+= -DWHIRLPOOL_ASM
-
-SSLASM=\
- aes aes-x86_64 \
- aes aesni-x86_64 \
- aes aesni-sha1-x86_64 \
- aes bsaes-x86_64 \
- aes vpaes-x86_64 \
- bn x86_64-mont \
- bn x86_64-mont5 \
- bn x86_64-gf2m \
- bn modexp512-x86_64 \
- md5 md5-x86_64 \
- modes ghash-x86_64 \
- rc4 rc4-x86_64 \
- rc4 rc4-md5-x86_64 \
- sha sha1-x86_64 \
- whrlpool wp-x86_64
+SSLASM+= whrlpool wp-x86_64
.for dir f in ${SSLASM}
SRCS+= ${f}.S
@@ -46,15 +61,10 @@ ${f}.S: ${LCRYPTO_SRC}/${dir}/asm/${f}.pl
/usr/bin/perl ./asm/${f}.pl openbsd-elf) > ${.TARGET}
.endfor
-SRCS+= x86_64cpuid.S sha256-x86_64.S sha512-x86_64.S
-GENERATED+=x86_64cpuid.S sha256-x86_64.S sha512-x86_64.S
+CFLAGS+= -DOPENSSL_CPUID_OBJ
+SRCS+= x86_64cpuid.S x86_64-gcc.c
+GENERATED+=x86_64cpuid.S
x86_64cpuid.S: ${LCRYPTO_SRC}/x86_64cpuid.pl
(cd ${LCRYPTO_SRC}/${dir} ; \
/usr/bin/perl ./x86_64cpuid.pl) > ${.TARGET}
-sha256-x86_64.S: ${LCRYPTO_SRC}/sha/asm/sha512-x86_64.pl
- cd ${LCRYPTO_SRC}/sha/asm ; \
- /usr/bin/perl ./sha512-x86_64.pl ${.OBJDIR}/${.TARGET}
-sha512-x86_64.S: ${LCRYPTO_SRC}/sha/asm/sha512-x86_64.pl
- cd ${LCRYPTO_SRC}/sha/asm ; \
- /usr/bin/perl ./sha512-x86_64.pl ${.OBJDIR}/${.TARGET}
diff --git a/lib/libcrypto/arch/i386/Makefile.inc b/lib/libcrypto/arch/i386/Makefile.inc
index 13f20d249dc..a4b8c46ef35 100644
--- a/lib/libcrypto/arch/i386/Makefile.inc
+++ b/lib/libcrypto/arch/i386/Makefile.inc
@@ -1,45 +1,49 @@
-# $OpenBSD: Makefile.inc,v 1.1 2014/04/17 18:11:47 miod Exp $
+# $OpenBSD: Makefile.inc,v 1.2 2014/05/06 19:55:06 miod Exp $
# i386-specific libcrypto build rules
-SRCS+= wp_block.c
+# aes
+CFLAGS+= -DAES_ASM
+SSLASM+= aes aes-586
+CFLAGS+= -DVPAES_ASM
+SSLASM+= aes vpaes-x86
+SSLASM+= aes aesni-x86
+# bf
SRCS+= bf_cbc.c
-
-CFLAGS+= -DOPENSSL_BN_ASM_GF2m
-CFLAGS+= -DOPENSSL_BN_ASM_MONT
-CFLAGS+= -DOPENSSL_BN_ASM_PART_WORDS
-CFLAGS+= -DOPENSSL_CPUID_OBJ
+SSLASM+= bf bf-586
+# bn
CFLAGS+= -DOPENSSL_IA32_SSE2
-
-CFLAGS+= -DAES_ASM
-CFLAGS+= -DGHASH_ASM
+CFLAGS+= -DOPENSSL_BN_ASM_PART_WORDS
+SSLASM+= bn bn-586
+SSLASM+= bn co-586
+CFLAGS+= -DOPENSSL_BN_ASM_MONT
+SSLASM+= bn x86-mont
+CFLAGS+= -DOPENSSL_BN_ASM_GF2m
+SSLASM+= bn x86-gf2m
+# des
+SSLASM+= des des-586
+# md5
CFLAGS+= -DMD5_ASM
+SSLASM+= md5 md5-586
+# modes
+CFLAGS+= -DGHASH_ASM
+SSLASM+= modes ghash-x86
+# rc4
+SSLASM+= rc4 rc4-586
+# ripemd
CFLAGS+= -DRMD160_ASM
+SSLASM+= ripemd rmd-586
+# sha
CFLAGS+= -DSHA1_ASM
+SSLASM+= sha sha1-586
CFLAGS+= -DSHA256_ASM
+SSLASM+= sha sha256-586
CFLAGS+= -DSHA512_ASM
-CFLAGS+= -DVPAES_ASM
+SSLASM+= sha sha512-586
+# whrlpool
+SRCS+= wp_block.c
CFLAGS+= -DWHIRLPOOL_ASM
-
-SSLASM=\
- aes aes-586 \
- aes vpaes-x86 \
- aes aesni-x86 \
- bf bf-586 \
- bn bn-586 \
- bn co-586 \
- bn x86-mont \
- bn x86-gf2m \
- des crypt586 \
- des des-586 \
- md5 md5-586 \
- modes ghash-x86 \
- rc4 rc4-586 \
- ripemd rmd-586 \
- sha sha1-586 \
- sha sha256-586 \
- sha sha512-586 \
- whrlpool wp-mmx
+SSLASM+= whrlpool wp-mmx
.for dir f in ${SSLASM}
SRCS+= ${f}.S
@@ -50,6 +54,7 @@ ${f}.S: ${LCRYPTO_SRC}/${dir}/asm/${f}.pl ${LCRYPTO_SRC}/perlasm/x86gas.pl
openbsd-elf ${CFLAGS} 386 ${PICFLAG} > ${.TARGET}
.endfor
+CFLAGS+= -DOPENSSL_CPUID_OBJ
SRCS+= x86cpuid.S
GENERATED+=x86cpuid.S