diff options
author | miod <> | 2014-04-17 18:11:47 +0000 |
---|---|---|
committer | miod <> | 2014-04-17 18:11:47 +0000 |
commit | d2037bc80eb83a1694b3e3458e6df04d0b9b29f1 (patch) | |
tree | 878e3428b7edc93672d78531a70dd734acc115bd /src/lib/libcrypto/arch | |
parent | 2e080839425d10a274e835d261a91b5303d3e3da (diff) | |
download | openbsd-d2037bc80eb83a1694b3e3458e6df04d0b9b29f1.tar.gz openbsd-d2037bc80eb83a1694b3e3458e6df04d0b9b29f1.tar.bz2 openbsd-d2037bc80eb83a1694b3e3458e6df04d0b9b29f1.zip |
Move the machine-specific parts of the libcrypto Makefile to per-arch makefile
fragments, to ease maintainance, and see through the fog of bugs.
"looks good" deraadt@
Diffstat (limited to 'src/lib/libcrypto/arch')
-rw-r--r-- | src/lib/libcrypto/arch/amd64/Makefile.inc | 60 | ||||
-rw-r--r-- | src/lib/libcrypto/arch/i386/Makefile.inc | 58 |
2 files changed, 118 insertions, 0 deletions
diff --git a/src/lib/libcrypto/arch/amd64/Makefile.inc b/src/lib/libcrypto/arch/amd64/Makefile.inc new file mode 100644 index 0000000000..a408186a03 --- /dev/null +++ b/src/lib/libcrypto/arch/amd64/Makefile.inc | |||
@@ -0,0 +1,60 @@ | |||
1 | # $OpenBSD: Makefile.inc,v 1.1 2014/04/17 18:11:47 miod Exp $ | ||
2 | |||
3 | # amd64-specific libcrypto build rules | ||
4 | |||
5 | SRCS+= bf_enc.c des_enc.c fcrypt_b.c | ||
6 | SRCS+= x86_64-gcc.c | ||
7 | |||
8 | CFLAGS+= -DOPENSSL_BN_ASM_GF2m | ||
9 | CFLAGS+= -DOPENSSL_BN_ASM_MONT | ||
10 | CFLAGS+= -DOPENSSL_BN_ASM_MONT5 | ||
11 | CFLAGS+= -DOPENSSL_CPUID_OBJ | ||
12 | CFLAGS+= -DOPENSSL_IA32_SSE2 | ||
13 | |||
14 | CFLAGS+= -DAES_ASM | ||
15 | CFLAGS+= -DBSAES_ASM | ||
16 | CFLAGS+= -DGHASH_ASM | ||
17 | CFLAGS+= -DMD5_ASM | ||
18 | CFLAGS+= -DSHA1_ASM | ||
19 | CFLAGS+= -DSHA256_ASM | ||
20 | CFLAGS+= -DSHA512_ASM | ||
21 | CFLAGS+= -DVPAES_ASM | ||
22 | CFLAGS+= -DWHIRLPOOL_ASM | ||
23 | |||
24 | SSLASM=\ | ||
25 | aes aes-x86_64 \ | ||
26 | aes aesni-x86_64 \ | ||
27 | aes aesni-sha1-x86_64 \ | ||
28 | aes bsaes-x86_64 \ | ||
29 | aes vpaes-x86_64 \ | ||
30 | bn x86_64-mont \ | ||
31 | bn x86_64-mont5 \ | ||
32 | bn x86_64-gf2m \ | ||
33 | bn modexp512-x86_64 \ | ||
34 | md5 md5-x86_64 \ | ||
35 | modes ghash-x86_64 \ | ||
36 | rc4 rc4-x86_64 \ | ||
37 | rc4 rc4-md5-x86_64 \ | ||
38 | sha sha1-x86_64 \ | ||
39 | whrlpool wp-x86_64 | ||
40 | |||
41 | .for dir f in ${SSLASM} | ||
42 | SRCS+= ${f}.S | ||
43 | GENERATED+=${f}.S | ||
44 | ${f}.S: ${LCRYPTO_SRC}/${dir}/asm/${f}.pl | ||
45 | (cd ${LCRYPTO_SRC}/${dir} ; \ | ||
46 | /usr/bin/perl ./asm/${f}.pl openbsd-elf) > ${.TARGET} | ||
47 | .endfor | ||
48 | |||
49 | SRCS+= x86_64cpuid.S sha256-x86_64.S sha512-x86_64.S | ||
50 | GENERATED+=x86_64cpuid.S sha256-x86_64.S sha512-x86_64.S | ||
51 | |||
52 | x86_64cpuid.S: ${LCRYPTO_SRC}/x86_64cpuid.pl | ||
53 | (cd ${LCRYPTO_SRC}/${dir} ; \ | ||
54 | /usr/bin/perl ./x86_64cpuid.pl) > ${.TARGET} | ||
55 | sha256-x86_64.S: ${LCRYPTO_SRC}/sha/asm/sha512-x86_64.pl | ||
56 | cd ${LCRYPTO_SRC}/sha/asm ; \ | ||
57 | /usr/bin/perl ./sha512-x86_64.pl ${.OBJDIR}/${.TARGET} | ||
58 | sha512-x86_64.S: ${LCRYPTO_SRC}/sha/asm/sha512-x86_64.pl | ||
59 | cd ${LCRYPTO_SRC}/sha/asm ; \ | ||
60 | /usr/bin/perl ./sha512-x86_64.pl ${.OBJDIR}/${.TARGET} | ||
diff --git a/src/lib/libcrypto/arch/i386/Makefile.inc b/src/lib/libcrypto/arch/i386/Makefile.inc new file mode 100644 index 0000000000..13f20d249d --- /dev/null +++ b/src/lib/libcrypto/arch/i386/Makefile.inc | |||
@@ -0,0 +1,58 @@ | |||
1 | # $OpenBSD: Makefile.inc,v 1.1 2014/04/17 18:11:47 miod Exp $ | ||
2 | |||
3 | # i386-specific libcrypto build rules | ||
4 | |||
5 | SRCS+= wp_block.c | ||
6 | SRCS+= bf_cbc.c | ||
7 | |||
8 | CFLAGS+= -DOPENSSL_BN_ASM_GF2m | ||
9 | CFLAGS+= -DOPENSSL_BN_ASM_MONT | ||
10 | CFLAGS+= -DOPENSSL_BN_ASM_PART_WORDS | ||
11 | CFLAGS+= -DOPENSSL_CPUID_OBJ | ||
12 | CFLAGS+= -DOPENSSL_IA32_SSE2 | ||
13 | |||
14 | CFLAGS+= -DAES_ASM | ||
15 | CFLAGS+= -DGHASH_ASM | ||
16 | CFLAGS+= -DMD5_ASM | ||
17 | CFLAGS+= -DRMD160_ASM | ||
18 | CFLAGS+= -DSHA1_ASM | ||
19 | CFLAGS+= -DSHA256_ASM | ||
20 | CFLAGS+= -DSHA512_ASM | ||
21 | CFLAGS+= -DVPAES_ASM | ||
22 | CFLAGS+= -DWHIRLPOOL_ASM | ||
23 | |||
24 | SSLASM=\ | ||
25 | aes aes-586 \ | ||
26 | aes vpaes-x86 \ | ||
27 | aes aesni-x86 \ | ||
28 | bf bf-586 \ | ||
29 | bn bn-586 \ | ||
30 | bn co-586 \ | ||
31 | bn x86-mont \ | ||
32 | bn x86-gf2m \ | ||
33 | des crypt586 \ | ||
34 | des des-586 \ | ||
35 | md5 md5-586 \ | ||
36 | modes ghash-x86 \ | ||
37 | rc4 rc4-586 \ | ||
38 | ripemd rmd-586 \ | ||
39 | sha sha1-586 \ | ||
40 | sha sha256-586 \ | ||
41 | sha sha512-586 \ | ||
42 | whrlpool wp-mmx | ||
43 | |||
44 | .for dir f in ${SSLASM} | ||
45 | SRCS+= ${f}.S | ||
46 | GENERATED+=${f}.S | ||
47 | ${f}.S: ${LCRYPTO_SRC}/${dir}/asm/${f}.pl ${LCRYPTO_SRC}/perlasm/x86gas.pl | ||
48 | /usr/bin/perl -I${LCRYPTO_SRC}/perlasm -I${LCRYPTO_SRC}/${dir}/asm \ | ||
49 | ${LCRYPTO_SRC}/${dir}/asm/${f}.pl \ | ||
50 | openbsd-elf ${CFLAGS} 386 ${PICFLAG} > ${.TARGET} | ||
51 | .endfor | ||
52 | |||
53 | SRCS+= x86cpuid.S | ||
54 | GENERATED+=x86cpuid.S | ||
55 | |||
56 | x86cpuid.S: ${LCRYPTO_SRC}/x86cpuid.pl ${LCRYPTO_SRC}/perlasm/x86gas.pl | ||
57 | /usr/bin/perl -I${LCRYPTO_SRC}/perlasm ${LCRYPTO_SRC}/x86cpuid.pl \ | ||
58 | openbsd-elf ${CFLAGS} 386 ${PICFLAG} > ${.TARGET} | ||