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