2016-01-30 06:33:10 +08:00
|
|
|
LIBS=../../libcrypto
|
2019-05-30 00:31:22 +08:00
|
|
|
|
2019-06-16 22:56:25 +08:00
|
|
|
$BNASM=bn_asm.c
|
|
|
|
IF[{- !$disabled{asm} -}]
|
|
|
|
# Define source files and macros per asm architecture
|
|
|
|
# Known macros are:
|
|
|
|
#
|
|
|
|
# OPENSSL_BN_ASM_PART_WORDS For any collection with /-586/ file names
|
|
|
|
# OPENSSL_BN_ASM_MONT For any collection with /-mont/ file names
|
|
|
|
# OPENSSL_BN_ASM_MONT5 For any collection with /-mont5/ file names
|
|
|
|
# OPENSSL_BN_ASM_GF2m For any collection with /-gf2m/ file names
|
|
|
|
# OPENSSL_IA32_SSE2 For any collection with /86/ file names
|
|
|
|
# when sse2 is enabled
|
|
|
|
# BN_DIV3W For any collection with /-div3w/ file names
|
|
|
|
#
|
|
|
|
# All variables are named in such a way that they can be "indexed" with
|
|
|
|
# $target{asm_arch}
|
|
|
|
|
|
|
|
$BNASM_x86=bn-586.s co-586.s x86-mont.s x86-gf2m.s
|
|
|
|
# bn-586 is the only one implementing bn_*_part_words
|
|
|
|
# => OPENSSL_BN_ASM_PART_WORDS
|
|
|
|
$BNDEF_x86=OPENSSL_BN_ASM_PART_WORDS OPENSSL_BN_ASM_MONT OPENSSL_BN_ASM_GF2m
|
|
|
|
$BNDEF_x86_sse2=OPENSSL_IA32_SSE2
|
|
|
|
|
|
|
|
$BNASM_x86_64=\
|
|
|
|
x86_64-mont.s x86_64-mont5.s x86_64-gf2m.s rsaz_exp.c rsaz-x86_64.s \
|
|
|
|
rsaz-avx2.s
|
|
|
|
IF[{- $config{target} !~ /^VC/ -}]
|
|
|
|
$BNASM_x86_64=asm/x86_64-gcc.c $BNASM_x86_64
|
|
|
|
ELSE
|
|
|
|
$BNASM_x86_64=bn_asm.c $BNASM_x86_64
|
|
|
|
ENDIF
|
|
|
|
$BNDEF_x86_64=OPENSSL_BN_ASM_MONT OPENSSL_BN_ASM_MONT5 OPENSSL_BN_ASM_GF2m
|
|
|
|
$BNDEF_x86_64_sse2=OPENSSL_IA32_SSE2
|
|
|
|
|
|
|
|
IF[{- $config{target} !~ /^VC/ -}]
|
|
|
|
$BNASM_ia64=bn-ia64.s ia64-mont.s
|
|
|
|
ELSE
|
|
|
|
$BNASM_ia64=bn_asm.c ia64-mont.s
|
|
|
|
ENDIF
|
|
|
|
|
|
|
|
$BNASM_sparcv9=asm/sparcv8plus.S sparcv9-mont.S sparcv9a-mont.S vis3-mont.S \
|
|
|
|
sparct4-mont.S
|
|
|
|
$BNDEF_sparcv9=OPENSSL_BN_ASM_MONT
|
|
|
|
$BNASM_sparcv9_ec2m=sparcv9-gf2m.S
|
|
|
|
$BNDEF_sparcv9_ec2m=OPENSSL_BN_ASM_GF2m
|
|
|
|
|
|
|
|
$BNASM_sparcv8=asm/sparcv8.S
|
|
|
|
|
|
|
|
$BNASM_alpha=bn_asm.c alpha-mont.S
|
|
|
|
$BNDEF_alpha=OPENSSL_BN_ASM_MONT
|
|
|
|
|
|
|
|
$BNASM_mips32=bn-mips.S mips-mont.S
|
|
|
|
$BNDEF_mips32=OPENSSL_BN_ASM_MONT
|
|
|
|
$BNASM_mips64=$BNASM_mips32
|
|
|
|
$BNDEF_mips64=$BNDEF_mips32
|
|
|
|
|
|
|
|
IF[{- ($target{perlasm_scheme} // '') eq '31' -}]
|
|
|
|
$BNASM_s390x=bn_asm.c s390x-mont.S
|
|
|
|
ELSE
|
|
|
|
$BNASM_s390x=asm/s390x.S s390x-mont.S
|
|
|
|
ENDIF
|
|
|
|
$BNDEF_s390x=OPENSSL_BN_ASM_MONT
|
|
|
|
$BNASM_s390x_ec2m=s390x-gf2m.s
|
|
|
|
$BNDEF_s390x_ec2m=OPENSSL_BN_ASM_GF2m
|
|
|
|
|
|
|
|
$BNASM_armv4=bn_asm.c armv4-mont.S
|
|
|
|
$BNDEF_armv4=OPENSSL_BN_ASM_MONT
|
|
|
|
$BNASM_armv4_ec2m=armv4-gf2m.S
|
|
|
|
$BNDEF_armv4_ec2m=OPENSSL_BN_ASM_GF2m
|
|
|
|
|
|
|
|
$BNASM_aarch64=bn_asm.c armv8-mont.S
|
|
|
|
$BNDEF_aarch64=OPENSSL_BN_ASM_MONT
|
|
|
|
|
|
|
|
$BNASM_parisc11=bn_asm.c parisc-mont.s
|
|
|
|
$BNDEF_parisc11=OPENSSL_BN_ASM_MONT
|
|
|
|
$BNASM_parisc20_64=$BNASM_parisc11
|
|
|
|
$BNDEF_parisc20_64=$BNDEF_parisc11
|
|
|
|
|
|
|
|
$BNASM_ppc32=bn-ppc.s ppc-mont.s
|
|
|
|
$BNDEF_ppc32=OPENSSL_BN_ASM_MONT
|
|
|
|
$BNASM_ppc64=$BNASM_ppc32
|
|
|
|
$BNDEF_ppc64=$BNDEF_ppc32
|
|
|
|
|
|
|
|
$BNASM_c64xplus=asm/bn-c64xplus.asm
|
|
|
|
$BNASM_c64xplus_ec2m=c64xplus-gf2m.s
|
|
|
|
$BNDEF_c64xplus_ec2m=OPENSSL_BN_ASM_GF2m
|
|
|
|
|
|
|
|
# Now that we have defined all the arch specific variables, use the
|
|
|
|
# appropriate ones, and define the appropriate macros
|
|
|
|
IF[$BNASM_{- $target{asm_arch} -}]
|
|
|
|
$BNASM=$BNASM_{- $target{asm_arch} -}
|
|
|
|
$BNDEF=$BNDEF_{- $target{asm_arch} -}
|
|
|
|
IF[{- !$disabled{ec2m} -}]
|
|
|
|
$BNASM=$BNASM $BNASM_{- $target{asm_arch} -}_ec2m
|
|
|
|
$BNDEF=$BNDEF $BNDEF_{- $target{asm_arch} -}_ec2m
|
|
|
|
ENDIF
|
|
|
|
IF[{- !$disabled{sse2} -}]
|
2019-09-12 19:27:52 +08:00
|
|
|
$BNDEF=$BNDEF $BNDEF_{- $target{asm_arch} -}_sse2
|
2019-06-16 22:56:25 +08:00
|
|
|
ENDIF
|
|
|
|
ENDIF
|
|
|
|
ENDIF
|
|
|
|
|
2019-06-12 18:10:00 +08:00
|
|
|
$COMMON=bn_add.c bn_div.c bn_exp.c bn_lib.c bn_ctx.c bn_mul.c \
|
|
|
|
bn_mod.c bn_conv.c bn_rand.c bn_shift.c bn_word.c bn_blind.c \
|
|
|
|
bn_kron.c bn_sqrt.c bn_gcd.c bn_prime.c bn_sqr.c \
|
|
|
|
bn_recp.c bn_mont.c bn_mpi.c bn_exp2.c bn_gf2m.c bn_nist.c \
|
|
|
|
bn_const.c bn_x931p.c bn_intern.c bn_dh.c \
|
2019-06-16 22:56:25 +08:00
|
|
|
bn_rsa_fips186_4.c $BNASM
|
2019-06-12 18:10:00 +08:00
|
|
|
SOURCE[../../libcrypto]=$COMMON bn_print.c bn_err.c bn_depr.c bn_srp.c
|
2019-06-16 22:56:25 +08:00
|
|
|
DEFINE[../../libcrypto]=$BNDEF
|
2019-10-04 07:38:17 +08:00
|
|
|
SOURCE[../../providers/libfips.a]=$COMMON
|
|
|
|
DEFINE[../../providers/libfips.a]=$BNDEF
|
2019-05-30 00:31:22 +08:00
|
|
|
|
2016-06-30 04:59:50 +08:00
|
|
|
INCLUDE[../../libcrypto]=../../crypto/include
|
2016-01-30 10:25:40 +08:00
|
|
|
|
2016-03-11 19:04:15 +08:00
|
|
|
INCLUDE[bn_exp.o]=..
|
|
|
|
|
2019-09-13 06:05:26 +08:00
|
|
|
GENERATE[bn-586.s]=asm/bn-586.pl
|
2016-03-07 22:41:33 +08:00
|
|
|
DEPEND[bn-586.s]=../perlasm/x86asm.pl
|
2019-09-13 06:05:26 +08:00
|
|
|
GENERATE[co-586.s]=asm/co-586.pl
|
2016-03-07 22:41:33 +08:00
|
|
|
DEPEND[co-586.s]=../perlasm/x86asm.pl
|
2019-09-13 06:05:26 +08:00
|
|
|
GENERATE[x86-mont.s]=asm/x86-mont.pl
|
2016-03-07 22:41:33 +08:00
|
|
|
DEPEND[x86-mont.s]=../perlasm/x86asm.pl
|
2019-09-13 06:05:26 +08:00
|
|
|
GENERATE[x86-gf2m.s]=asm/x86-gf2m.pl
|
2016-03-07 22:41:33 +08:00
|
|
|
DEPEND[x86-gf2m.s]=../perlasm/x86asm.pl
|
|
|
|
|
2019-09-13 06:05:26 +08:00
|
|
|
GENERATE[sparcv9a-mont.S]=asm/sparcv9a-mont.pl
|
2016-03-11 03:05:52 +08:00
|
|
|
INCLUDE[sparcv9a-mont.o]=..
|
2019-09-13 06:05:26 +08:00
|
|
|
GENERATE[sparcv9-mont.S]=asm/sparcv9-mont.pl
|
2016-03-11 03:05:52 +08:00
|
|
|
INCLUDE[sparcv9-mont.o]=..
|
2019-09-13 06:05:26 +08:00
|
|
|
GENERATE[vis3-mont.S]=asm/vis3-mont.pl
|
2016-03-11 03:05:52 +08:00
|
|
|
INCLUDE[vis3-mont.o]=..
|
2019-09-13 06:05:26 +08:00
|
|
|
GENERATE[sparct4-mont.S]=asm/sparct4-mont.pl
|
2016-03-11 03:05:52 +08:00
|
|
|
INCLUDE[sparct4-mont.o]=..
|
2019-09-13 06:05:26 +08:00
|
|
|
GENERATE[sparcv9-gf2m.S]=asm/sparcv9-gf2m.pl
|
2016-03-11 19:04:15 +08:00
|
|
|
INCLUDE[sparcv9-gf2m.o]=..
|
2016-03-07 22:41:33 +08:00
|
|
|
|
2019-09-13 06:05:26 +08:00
|
|
|
GENERATE[bn-mips.S]=asm/mips.pl
|
2016-09-01 16:39:15 +08:00
|
|
|
INCLUDE[bn-mips.o]=..
|
2019-09-13 06:05:26 +08:00
|
|
|
GENERATE[mips-mont.S]=asm/mips-mont.pl
|
2016-09-01 16:39:15 +08:00
|
|
|
INCLUDE[mips-mont.o]=..
|
2016-03-07 22:41:33 +08:00
|
|
|
|
2019-09-13 06:05:26 +08:00
|
|
|
GENERATE[s390x-mont.S]=asm/s390x-mont.pl
|
|
|
|
GENERATE[s390x-gf2m.s]=asm/s390x-gf2m.pl
|
2016-03-07 22:41:33 +08:00
|
|
|
|
2019-09-13 06:05:26 +08:00
|
|
|
GENERATE[x86_64-mont.s]=asm/x86_64-mont.pl
|
|
|
|
GENERATE[x86_64-mont5.s]=asm/x86_64-mont5.pl
|
|
|
|
GENERATE[x86_64-gf2m.s]=asm/x86_64-gf2m.pl
|
|
|
|
GENERATE[rsaz-x86_64.s]=asm/rsaz-x86_64.pl
|
|
|
|
GENERATE[rsaz-avx2.s]=asm/rsaz-avx2.pl
|
2016-03-07 22:41:33 +08:00
|
|
|
|
|
|
|
GENERATE[bn-ia64.s]=asm/ia64.S
|
2019-09-13 06:05:26 +08:00
|
|
|
GENERATE[ia64-mont.s]=asm/ia64-mont.pl
|
2016-03-07 22:41:33 +08:00
|
|
|
|
2019-09-13 06:05:26 +08:00
|
|
|
GENERATE[parisc-mont.s]=asm/parisc-mont.pl
|
2016-03-07 22:41:33 +08:00
|
|
|
|
|
|
|
# ppc - AIX, Linux, MacOS X...
|
2019-09-13 06:05:26 +08:00
|
|
|
GENERATE[bn-ppc.s]=asm/ppc.pl
|
|
|
|
GENERATE[ppc-mont.s]=asm/ppc-mont.pl
|
|
|
|
GENERATE[ppc64-mont.s]=asm/ppc64-mont.pl
|
2016-03-07 22:41:33 +08:00
|
|
|
|
2019-09-13 06:05:26 +08:00
|
|
|
GENERATE[alpha-mont.S]=asm/alpha-mont.pl
|
2016-01-30 10:25:40 +08:00
|
|
|
|
2019-09-13 06:05:26 +08:00
|
|
|
GENERATE[armv4-mont.S]=asm/armv4-mont.pl
|
2016-03-11 03:05:52 +08:00
|
|
|
INCLUDE[armv4-mont.o]=..
|
2019-09-13 06:05:26 +08:00
|
|
|
GENERATE[armv4-gf2m.S]=asm/armv4-gf2m.pl
|
2016-03-11 03:05:52 +08:00
|
|
|
INCLUDE[armv4-gf2m.o]=..
|
2019-09-13 06:05:26 +08:00
|
|
|
GENERATE[armv8-mont.S]=asm/armv8-mont.pl
|