blob: b03aad782fa29859d74d8e18e87c75d72cd454f2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
# $OpenBSD: Makefile.inc,v 1.38 2025/04/18 13:19:39 jsing Exp $
# amd64-specific libcrypto build rules
# all amd64 code generators use this
EXTRA_PL = ${LCRYPTO_SRC}/perlasm/x86_64-xlate.pl
SRCS += crypto_cpu_caps.c
# aes
CFLAGS+= -DAES_ASM
SSLASM+= aes aes-x86_64
SSLASM+= aes aesni-x86_64
# bn
CFLAGS+= -DOPENSSL_IA32_SSE2
CFLAGS+= -DRSA_ASM
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
# bn s2n-bignum
SRCS += bn_arch.c
SRCS += bignum_add.S
SRCS += bignum_cmadd.S
SRCS += bignum_cmul.S
SRCS += bignum_mul.S
SRCS += bignum_mul_4_8_alt.S
SRCS += bignum_mul_8_16_alt.S
SRCS += bignum_sqr.S
SRCS += bignum_sqr_4_8_alt.S
SRCS += bignum_sqr_8_16_alt.S
SRCS += bignum_sub.S
SRCS += word_clz.S
# md5
CFLAGS+= -DMD5_ASM
SRCS+= md5_amd64_generic.S
# modes
CFLAGS+= -DGHASH_ASM
SSLASM+= modes ghash-x86_64
# rc4
SSLASM+= rc4 rc4-x86_64
# ripemd
# sha
SRCS+= sha1_amd64.c
SRCS+= sha1_amd64_generic.S
SRCS+= sha1_amd64_shani.S
SRCS+= sha256_amd64.c
SRCS+= sha256_amd64_generic.S
SRCS+= sha256_amd64_shani.S
SRCS+= sha512_amd64.c
SRCS+= sha512_amd64_generic.S
.for dir f in ${SSLASM}
SRCS+= ${f}.S
GENERATED+=${f}.S
${f}.S: ${LCRYPTO_SRC}/${dir}/asm/${f}.pl ${EXTRA_PL}
(cd ${LCRYPTO_SRC}/${dir} ; \
/usr/bin/perl ./asm/${f}.pl openbsd) > ${.TARGET}
.endfor
CFLAGS+=-fret-clean
|