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