bc3fb9b05b0fc580e68daa4035a9bdbeb5ff2fcc
[openssl.git] / crypto / bn / build.info
1 LIBS=../../libcrypto
2
3 $BNASM=bn_asm.c
4 IF[{- !$disabled{asm} -}]
5   # Define source files and macros per asm architecture
6   # Known macros are:
7   #
8   # OPENSSL_BN_ASM_PART_WORDS     For any collection with /-586/ file names
9   # OPENSSL_BN_ASM_MONT           For any collection with /-mont/ file names
10   # OPENSSL_BN_ASM_MONT5          For any collection with /-mont5/ file names
11   # OPENSSL_BN_ASM_GF2m           For any collection with /-gf2m/ file names
12   # OPENSSL_IA32_SSE2             For any collection with /86/ file names
13   #                               when sse2 is enabled
14   # BN_DIV3W                      For any collection with /-div3w/ file names
15   #
16   # All variables are named in such a way that they can be "indexed" with
17   # $target{asm_arch}
18
19   $BNASM_x86=bn-586.s co-586.s x86-mont.s x86-gf2m.s
20   # bn-586 is the only one implementing bn_*_part_words
21   # => OPENSSL_BN_ASM_PART_WORDS
22   $BNDEF_x86=OPENSSL_BN_ASM_PART_WORDS OPENSSL_BN_ASM_MONT OPENSSL_BN_ASM_GF2m
23   $BNDEF_x86_sse2=OPENSSL_IA32_SSE2
24
25   $BNASM_x86_64=\
26           x86_64-mont.s x86_64-mont5.s x86_64-gf2m.s rsaz_exp.c rsaz-x86_64.s \
27           rsaz-avx2.s
28   IF[{- $config{target} !~ /^VC/ -}]
29     $BNASM_x86_64=asm/x86_64-gcc.c $BNASM_x86_64
30   ELSE
31     $BNASM_x86_64=bn_asm.c $BNASM_x86_64
32   ENDIF
33   $BNDEF_x86_64=OPENSSL_BN_ASM_MONT OPENSSL_BN_ASM_MONT5 OPENSSL_BN_ASM_GF2m
34   $BNDEF_x86_64_sse2=OPENSSL_IA32_SSE2
35
36   IF[{- $config{target} !~ /^VC/ -}]
37     $BNASM_ia64=bn-ia64.s ia64-mont.s
38   ELSE
39     $BNASM_ia64=bn_asm.c ia64-mont.s
40   ENDIF
41
42   $BNASM_sparcv9=asm/sparcv8plus.S sparcv9-mont.S sparcv9a-mont.S vis3-mont.S \
43           sparct4-mont.S
44   $BNDEF_sparcv9=OPENSSL_BN_ASM_MONT
45   $BNASM_sparcv9_ec2m=sparcv9-gf2m.S
46   $BNDEF_sparcv9_ec2m=OPENSSL_BN_ASM_GF2m
47
48   $BNASM_sparcv8=asm/sparcv8.S
49
50   $BNASM_alpha=bn_asm.c alpha-mont.S
51   $BNDEF_alpha=OPENSSL_BN_ASM_MONT
52
53   $BNASM_mips32=bn-mips.S mips-mont.S
54   $BNDEF_mips32=OPENSSL_BN_ASM_MONT
55   $BNASM_mips64=$BNASM_mips32
56   $BNDEF_mips64=$BNDEF_mips32
57
58   IF[{- ($target{perlasm_scheme} // '') eq '31' -}]
59     $BNASM_s390x=bn_asm.c s390x-mont.S
60   ELSE
61     $BNASM_s390x=asm/s390x.S s390x-mont.S
62   ENDIF
63   $BNDEF_s390x=OPENSSL_BN_ASM_MONT
64   $BNASM_s390x_ec2m=s390x-gf2m.s
65   $BNDEF_s390x_ec2m=OPENSSL_BN_ASM_GF2m
66
67   $BNASM_armv4=bn_asm.c armv4-mont.S
68   $BNDEF_armv4=OPENSSL_BN_ASM_MONT
69   $BNASM_armv4_ec2m=armv4-gf2m.S
70   $BNDEF_armv4_ec2m=OPENSSL_BN_ASM_GF2m
71
72   $BNASM_aarch64=bn_asm.c armv8-mont.S
73   $BNDEF_aarch64=OPENSSL_BN_ASM_MONT
74
75   $BNASM_parisc11=bn_asm.c parisc-mont.s
76   $BNDEF_parisc11=OPENSSL_BN_ASM_MONT
77   $BNASM_parisc20_64=$BNASM_parisc11
78   $BNDEF_parisc20_64=$BNDEF_parisc11
79
80   $BNASM_ppc32=bn-ppc.s ppc-mont.s
81   $BNDEF_ppc32=OPENSSL_BN_ASM_MONT
82   $BNASM_ppc64=$BNASM_ppc32
83   $BNDEF_ppc64=$BNDEF_ppc32
84
85   $BNASM_c64xplus=asm/bn-c64xplus.asm
86   $BNASM_c64xplus_ec2m=c64xplus-gf2m.s
87   $BNDEF_c64xplus_ec2m=OPENSSL_BN_ASM_GF2m
88
89   # Now that we have defined all the arch specific variables, use the
90   # appropriate ones, and define the appropriate macros
91   IF[$BNASM_{- $target{asm_arch} -}]
92     $BNASM=$BNASM_{- $target{asm_arch} -}
93     $BNDEF=$BNDEF_{- $target{asm_arch} -}
94     IF[{- !$disabled{ec2m} -}]
95       $BNASM=$BNASM $BNASM_{- $target{asm_arch} -}_ec2m
96       $BNDEF=$BNDEF $BNDEF_{- $target{asm_arch} -}_ec2m
97     ENDIF
98     IF[{- !$disabled{sse2} -}]
99       $BNDEF=$BNDEF $BNDEF_{- $target{asm_arch} -}_sse2
100     ENDIF
101   ENDIF
102 ENDIF
103
104 IF[{- !$disabled{dh} -}]
105   $BNDH=bn_const.c
106 ELSE
107   $BNDH=
108 ENDIF
109
110 $COMMON=bn_add.c bn_div.c bn_exp.c bn_lib.c bn_ctx.c bn_mul.c \
111         bn_mod.c bn_conv.c bn_rand.c bn_shift.c bn_word.c bn_blind.c \
112         bn_kron.c bn_sqrt.c bn_gcd.c bn_prime.c bn_sqr.c \
113         bn_recp.c bn_mont.c bn_mpi.c bn_exp2.c bn_gf2m.c bn_nist.c \
114         bn_x931p.c bn_intern.c bn_dh.c \
115         bn_rsa_fips186_4.c $BNDH $BNASM
116 SOURCE[../../libcrypto]=$COMMON bn_print.c bn_err.c bn_depr.c bn_srp.c
117 SOURCE[../../providers/libfips.a]=$COMMON
118 # Implementations are now spread across several libraries, so the defines
119 # need to be applied to all affected libraries and modules.
120 DEFINE[../../libcrypto]=$BNDEF
121 DEFINE[../../providers/libfips.a]=$BNDEF
122 DEFINE[../../providers/libimplementations.a]=$BNDEF
123
124 INCLUDE[../../libcrypto]=../../crypto/include
125
126 INCLUDE[bn_exp.o]=..
127
128 GENERATE[bn-586.s]=asm/bn-586.pl
129 DEPEND[bn-586.s]=../perlasm/x86asm.pl
130 GENERATE[co-586.s]=asm/co-586.pl
131 DEPEND[co-586.s]=../perlasm/x86asm.pl
132 GENERATE[x86-mont.s]=asm/x86-mont.pl
133 DEPEND[x86-mont.s]=../perlasm/x86asm.pl
134 GENERATE[x86-gf2m.s]=asm/x86-gf2m.pl
135 DEPEND[x86-gf2m.s]=../perlasm/x86asm.pl
136
137 GENERATE[sparcv9a-mont.S]=asm/sparcv9a-mont.pl
138 INCLUDE[sparcv9a-mont.o]=..
139 GENERATE[sparcv9-mont.S]=asm/sparcv9-mont.pl
140 INCLUDE[sparcv9-mont.o]=..
141 GENERATE[vis3-mont.S]=asm/vis3-mont.pl
142 INCLUDE[vis3-mont.o]=..
143 GENERATE[sparct4-mont.S]=asm/sparct4-mont.pl
144 INCLUDE[sparct4-mont.o]=..
145 GENERATE[sparcv9-gf2m.S]=asm/sparcv9-gf2m.pl
146 INCLUDE[sparcv9-gf2m.o]=..
147
148 GENERATE[bn-mips.S]=asm/mips.pl
149 INCLUDE[bn-mips.o]=..
150 GENERATE[mips-mont.S]=asm/mips-mont.pl
151 INCLUDE[mips-mont.o]=..
152
153 GENERATE[s390x-mont.S]=asm/s390x-mont.pl
154 GENERATE[s390x-gf2m.s]=asm/s390x-gf2m.pl
155
156 GENERATE[x86_64-mont.s]=asm/x86_64-mont.pl
157 GENERATE[x86_64-mont5.s]=asm/x86_64-mont5.pl
158 GENERATE[x86_64-gf2m.s]=asm/x86_64-gf2m.pl
159 GENERATE[rsaz-x86_64.s]=asm/rsaz-x86_64.pl
160 GENERATE[rsaz-avx2.s]=asm/rsaz-avx2.pl
161
162 GENERATE[bn-ia64.s]=asm/ia64.S
163 GENERATE[ia64-mont.s]=asm/ia64-mont.pl
164
165 GENERATE[parisc-mont.s]=asm/parisc-mont.pl
166
167 # ppc - AIX, Linux, MacOS X...
168 GENERATE[bn-ppc.s]=asm/ppc.pl
169 GENERATE[ppc-mont.s]=asm/ppc-mont.pl
170 GENERATE[ppc64-mont.s]=asm/ppc64-mont.pl
171
172 GENERATE[alpha-mont.S]=asm/alpha-mont.pl
173
174 GENERATE[armv4-mont.S]=asm/armv4-mont.pl
175 INCLUDE[armv4-mont.o]=..
176 GENERATE[armv4-gf2m.S]=asm/armv4-gf2m.pl
177 INCLUDE[armv4-gf2m.o]=..
178 GENERATE[armv8-mont.S]=asm/armv8-mont.pl