]> git.ipfire.org Git - thirdparty/openssl.git/blob - Configurations/00-base-templates.conf
Move ec_asm_src file information to build.info files
[thirdparty/openssl.git] / Configurations / 00-base-templates.conf
1 # -*- Mode: perl -*-
2 my %targets=(
3 DEFAULTS => {
4 template => 1,
5
6 cflags => "",
7 cppflags => "",
8 lflags => "",
9 defines => [],
10 includes => [],
11 lib_cflags => "",
12 lib_cppflags => "",
13 lib_defines => [],
14 thread_scheme => "(unknown)", # Assume we don't know
15 thread_defines => [],
16
17 des_asm_src => "des_enc.c fcrypt_b.c",
18 aes_asm_src => "aes_core.c aes_cbc.c",
19 bf_asm_src => "bf_enc.c",
20 md5_asm_src => "",
21 cast_asm_src => "c_enc.c",
22 rc4_asm_src => "rc4_enc.c rc4_skey.c",
23 rmd160_asm_src => "",
24 rc5_asm_src => "rc5_enc.c",
25 wp_asm_src => "wp_block.c",
26 cmll_asm_src => "camellia.c cmll_misc.c cmll_cbc.c",
27 modes_asm_src => "",
28 padlock_asm_src => "",
29 chacha_asm_src => "chacha_enc.c",
30 poly1305_asm_src => "",
31 keccak1600_asm_src => "keccak1600.c",
32
33 unistd => "<unistd.h>",
34 shared_target => "",
35 shared_cflag => "",
36 shared_defines => [],
37 shared_ldflag => "",
38 shared_rcflag => "",
39
40 #### Defaults for the benefit of the config targets who don't inherit
41 #### a BASE and assume Unix defaults
42 #### THESE WILL DISAPPEAR IN OpenSSL 1.2
43 build_scheme => [ "unified", "unix" ],
44 build_file => "Makefile",
45
46 AR => "ar",
47 ARFLAGS => "r",
48 CC => "cc",
49 HASHBANGPERL => "/usr/bin/env perl",
50 RANLIB => sub { which("$config{cross_compile_prefix}ranlib")
51 ? "ranlib" : "" },
52 RC => "windres",
53
54 #### THESE WILL BE ENABLED IN OpenSSL 1.2
55 #HASHBANGPERL => "PERL", # Only Unix actually cares
56 },
57
58 BASE_common => {
59 template => 1,
60
61 enable => [],
62 disable => [],
63
64 defines =>
65 sub {
66 my @defs = ();
67 push @defs, "ZLIB" unless $disabled{zlib};
68 push @defs, "ZLIB_SHARED" unless $disabled{"zlib-dynamic"};
69 return [ @defs ];
70 },
71 includes =>
72 sub {
73 my @incs = ();
74 push @incs, $withargs{zlib_include}
75 if !$disabled{zlib} && $withargs{zlib_include};
76 return [ @incs ];
77 },
78 },
79
80 BASE_unix => {
81 inherit_from => [ "BASE_common" ],
82 template => 1,
83
84 AR => "ar",
85 ARFLAGS => "r",
86 CC => "cc",
87 lflags =>
88 sub { $withargs{zlib_lib} ? "-L".$withargs{zlib_lib} : () },
89 ex_libs =>
90 sub { !defined($disabled{zlib})
91 && defined($disabled{"zlib-dynamic"})
92 ? "-lz" : () },
93 HASHBANGPERL => "/usr/bin/env perl", # Only Unix actually cares
94 RANLIB => sub { which("$config{cross_compile_prefix}ranlib")
95 ? "ranlib" : "" },
96 RC => "windres",
97
98 build_scheme => [ "unified", "unix" ],
99 build_file => "Makefile",
100
101 perl_platform => 'Unix',
102 },
103
104 BASE_Windows => {
105 inherit_from => [ "BASE_common" ],
106 template => 1,
107
108 lib_defines =>
109 sub {
110 my @defs = ();
111 unless ($disabled{"zlib-dynamic"}) {
112 my $zlib = $withargs{zlib_lib} // "ZLIB1";
113 push @defs, 'LIBZ=' . (quotify("perl", $zlib))[0];
114 }
115 return [ @defs ];
116 },
117 ex_libs =>
118 sub {
119 unless ($disabled{zlib}) {
120 if (defined($disabled{"zlib-dynamic"})) {
121 return $withargs{zlib_lib} // "ZLIB1";
122 }
123 }
124 return ();
125 },
126
127 LD => "link",
128 LDFLAGS => "/nologo",
129 ldoutflag => "/out:",
130 AR => "lib",
131 ARFLAGS => "/nologo",
132 aroutflag => "/out:",
133 RC => "rc",
134 rcoutflag => "/fo",
135 MT => "mt",
136 MTFLAGS => "-nologo",
137 mtinflag => "-manifest ",
138 mtoutflag => "-outputresource:",
139
140 build_file => "makefile",
141 build_scheme => [ "unified", "windows" ],
142
143 perl_platform => 'Windows',
144 },
145
146 BASE_VMS => {
147 inherit_from => [ "BASE_common" ],
148 template => 1,
149
150 includes =>
151 add(sub {
152 my @incs = ();
153 # GNV$ZLIB_INCLUDE is the standard logical name for later
154 # zlib incarnations.
155 push @incs, 'GNV$ZLIB_INCLUDE:'
156 if !$disabled{zlib} && !$withargs{zlib_include};
157 return [ @incs ];
158 }),
159
160 build_file => "descrip.mms",
161 build_scheme => [ "unified", "VMS" ],
162
163 perl_platform => 'VMS',
164 },
165
166 x86_asm => {
167 template => 1,
168 des_asm_src => "des-586.s crypt586.s",
169 aes_asm_src => "aes-586.s vpaes-x86.s aesni-x86.s",
170 bf_asm_src => "bf-586.s",
171 md5_asm_src => "md5-586.s",
172 cast_asm_src => "cast-586.s",
173 sha1_asm_src => "sha1-586.s sha256-586.s sha512-586.s",
174 rc4_asm_src => "rc4-586.s",
175 rmd160_asm_src => "rmd-586.s",
176 rc5_asm_src => "rc5-586.s",
177 wp_asm_src => "wp_block.c wp-mmx.s",
178 cmll_asm_src => "cmll-x86.s",
179 modes_asm_src => "ghash-x86.s",
180 padlock_asm_src => "e_padlock-x86.s",
181 chacha_asm_src => "chacha-x86.s",
182 poly1305_asm_src=> "poly1305-x86.s",
183 },
184 x86_elf_asm => {
185 template => 1,
186 inherit_from => [ "x86_asm" ],
187 },
188 x86_64_asm => {
189 template => 1,
190 aes_asm_src => "aes-x86_64.s vpaes-x86_64.s bsaes-x86_64.s aesni-x86_64.s aesni-sha1-x86_64.s aesni-sha256-x86_64.s aesni-mb-x86_64.s",
191 md5_asm_src => "md5-x86_64.s",
192 sha1_asm_src => "sha1-x86_64.s sha256-x86_64.s sha512-x86_64.s sha1-mb-x86_64.s sha256-mb-x86_64.s",
193 rc4_asm_src => "rc4-x86_64.s rc4-md5-x86_64.s",
194 wp_asm_src => "wp-x86_64.s",
195 cmll_asm_src => "cmll-x86_64.s cmll_misc.c",
196 modes_asm_src => "ghash-x86_64.s aesni-gcm-x86_64.s",
197 padlock_asm_src => "e_padlock-x86_64.s",
198 chacha_asm_src => "chacha-x86_64.s",
199 poly1305_asm_src=> "poly1305-x86_64.s",
200 keccak1600_asm_src => "keccak1600-x86_64.s",
201 },
202 ia64_asm => {
203 template => 1,
204 aes_asm_src => "aes_core.c aes_cbc.c aes-ia64.s",
205 sha1_asm_src => "sha1-ia64.s sha256-ia64.s sha512-ia64.s",
206 modes_asm_src => "ghash-ia64.s",
207 chacha_asm_src => "chacha-ia64.S",
208 poly1305_asm_src=> "asm/poly1305-ia64.S",
209 },
210 sparcv9_asm => {
211 template => 1,
212 des_asm_src => "des_enc-sparc.S fcrypt_b.c dest4-sparcv9.S",
213 aes_asm_src => "aes_core.c aes_cbc.c aes-sparcv9.S aest4-sparcv9.S aesfx-sparcv9.S",
214 md5_asm_src => "md5-sparcv9.S",
215 sha1_asm_src => "sha1-sparcv9.S sha256-sparcv9.S sha512-sparcv9.S",
216 cmll_asm_src => "camellia.c cmll_misc.c cmll_cbc.c cmllt4-sparcv9.S",
217 modes_asm_src => "ghash-sparcv9.S",
218 poly1305_asm_src=> "poly1305-sparcv9.S",
219 },
220 sparcv8_asm => {
221 template => 1,
222 des_asm_src => "des_enc-sparc.S fcrypt_b.c",
223 },
224 alpha_asm => {
225 template => 1,
226 sha1_asm_src => "sha1-alpha.S",
227 modes_asm_src => "ghash-alpha.S",
228 },
229 mips32_asm => {
230 template => 1,
231 aes_asm_src => "aes_cbc.c aes-mips.S",
232 sha1_asm_src => "sha1-mips.S sha256-mips.S",
233 },
234 mips64_asm => {
235 inherit_from => [ "mips32_asm" ],
236 template => 1,
237 sha1_asm_src => add("sha512-mips.S"),
238 poly1305_asm_src=> "poly1305-mips.S",
239 },
240 s390x_asm => {
241 template => 1,
242 aes_asm_src => "aes-s390x.S aes-ctr.fake aes-xts.fake",
243 sha1_asm_src => "sha1-s390x.S sha256-s390x.S sha512-s390x.S",
244 rc4_asm_src => "rc4-s390x.s",
245 modes_asm_src => "ghash-s390x.S",
246 chacha_asm_src => "chacha-s390x.S",
247 poly1305_asm_src=> "poly1305-s390x.S",
248 keccak1600_asm_src => "keccak1600-s390x.S",
249 },
250 armv4_asm => {
251 template => 1,
252 aes_asm_src => "aes_cbc.c aes-armv4.S bsaes-armv7.S aesv8-armx.S",
253 sha1_asm_src => "sha1-armv4-large.S sha256-armv4.S sha512-armv4.S",
254 modes_asm_src => "ghash-armv4.S ghashv8-armx.S",
255 chacha_asm_src => "chacha-armv4.S",
256 poly1305_asm_src=> "poly1305-armv4.S",
257 keccak1600_asm_src => "keccak1600-armv4.S",
258 },
259 aarch64_asm => {
260 template => 1,
261 aes_asm_src => "aes_core.c aes_cbc.c aesv8-armx.S vpaes-armv8.S",
262 sha1_asm_src => "sha1-armv8.S sha256-armv8.S sha512-armv8.S",
263 modes_asm_src => "ghashv8-armx.S",
264 chacha_asm_src => "chacha-armv8.S",
265 poly1305_asm_src=> "poly1305-armv8.S",
266 keccak1600_asm_src => "keccak1600-armv8.S",
267 },
268 parisc11_asm => {
269 template => 1,
270 aes_asm_src => "aes_core.c aes_cbc.c aes-parisc.s",
271 sha1_asm_src => "sha1-parisc.s sha256-parisc.s sha512-parisc.s",
272 rc4_asm_src => "rc4-parisc.s",
273 modes_asm_src => "ghash-parisc.s",
274 },
275 parisc20_64_asm => {
276 template => 1,
277 inherit_from => [ "parisc11_asm" ],
278 },
279 ppc32_asm => {
280 template => 1,
281 aes_asm_src => "aes_core.c aes_cbc.c aes-ppc.s vpaes-ppc.s aesp8-ppc.s",
282 sha1_asm_src => "sha1-ppc.s sha256-ppc.s sha512-ppc.s sha256p8-ppc.s sha512p8-ppc.s",
283 modes_asm_src => "ghashp8-ppc.s",
284 chacha_asm_src => "chacha-ppc.s",
285 poly1305_asm_src=> "poly1305-ppc.s poly1305-ppcfp.s",
286 },
287 ppc64_asm => {
288 inherit_from => [ "ppc32_asm" ],
289 template => 1,
290 keccak1600_asm_src => "keccak1600-ppc64.s",
291 },
292 );