OSSL_STORE: Add reference docs for the built-in Windows store implementation
[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         unistd          => "<unistd.h>",
18         shared_target   => "",
19         shared_cflag    => "",
20         shared_defines  => [],
21         shared_ldflag   => "",
22         shared_rcflag   => "",
23
24         #### Defaults for the benefit of the config targets who don't inherit
25         #### a BASE and assume Unix defaults
26         #### THESE WILL DISAPPEAR IN OpenSSL 1.2
27         build_scheme    => [ "unified", "unix" ],
28         build_file      => "Makefile",
29
30         AR              => "ar",
31         ARFLAGS         => "r",
32         CC              => "cc",
33         HASHBANGPERL    => "/usr/bin/env perl",
34         RANLIB          => sub { which("$config{cross_compile_prefix}ranlib")
35                                      ? "ranlib" : "" },
36         RC              => "windres",
37
38         #### THESE WILL BE ENABLED IN OpenSSL 1.2
39         #HASHBANGPERL   => "PERL", # Only Unix actually cares
40     },
41
42     BASE_common => {
43         template        => 1,
44
45         enable          => [],
46         disable         => [],
47
48         defines         =>
49             sub {
50                 my @defs = ();
51                 push @defs, "ZLIB" unless $disabled{zlib};
52                 push @defs, "ZLIB_SHARED" unless $disabled{"zlib-dynamic"};
53                 return [ @defs ];
54             },
55         includes        =>
56             sub {
57                 my @incs = ();
58                 push @incs, $withargs{zlib_include}
59                     if !$disabled{zlib} && $withargs{zlib_include};
60                 return [ @incs ];
61             },
62     },
63
64     BASE_unix => {
65         inherit_from    => [ "BASE_common" ],
66         template        => 1,
67
68         AR              => "ar",
69         ARFLAGS         => "r",
70         CC              => "cc",
71         lflags          =>
72             sub { $withargs{zlib_lib} ? "-L".$withargs{zlib_lib} : () },
73         ex_libs         =>
74             sub { !defined($disabled{zlib})
75                   && defined($disabled{"zlib-dynamic"})
76                   ? "-lz" : () },
77         HASHBANGPERL    => "/usr/bin/env perl", # Only Unix actually cares
78         RANLIB          => sub { which("$config{cross_compile_prefix}ranlib")
79                                      ? "ranlib" : "" },
80         RC              => "windres",
81
82         build_scheme    => [ "unified", "unix" ],
83         build_file      => "Makefile",
84
85         perl_platform   => 'Unix',
86     },
87
88     BASE_Windows => {
89         inherit_from    => [ "BASE_common" ],
90         template        => 1,
91
92         lib_defines      =>
93             sub {
94                 my @defs = ();
95                 unless ($disabled{"zlib-dynamic"}) {
96                     my $zlib = $withargs{zlib_lib} // "ZLIB1";
97                     push @defs, 'LIBZ=' . (quotify("perl", $zlib))[0];
98                 }
99                 return [ @defs ];
100             },
101         ex_libs         =>
102             sub {
103                 unless ($disabled{zlib}) {
104                     if (defined($disabled{"zlib-dynamic"})) {
105                         return $withargs{zlib_lib} // "ZLIB1";
106                     }
107                 }
108                 return ();
109             },
110
111         LD              => "link",
112         LDFLAGS         => "/nologo",
113         ldoutflag       => "/out:",
114         AR              => "lib",
115         ARFLAGS         => "/nologo",
116         aroutflag       => "/out:",
117         RC               => "rc",
118         rcoutflag        => "/fo",
119         MT              => "mt",
120         MTFLAGS         => "-nologo",
121         mtinflag        => "-manifest ",
122         mtoutflag       => "-outputresource:",
123
124         build_file      => "makefile",
125         build_scheme    => [ "unified", "windows" ],
126
127         perl_platform   => 'Windows',
128     },
129
130     BASE_VMS => {
131         inherit_from    => [ "BASE_common" ],
132         template        => 1,
133
134         includes        =>
135             add(sub {
136                     my @incs = ();
137                     # GNV$ZLIB_INCLUDE is the standard logical name for later
138                     # zlib incarnations.
139                     push @incs, 'GNV$ZLIB_INCLUDE:'
140                         if !$disabled{zlib} && !$withargs{zlib_include};
141                     return [ @incs ];
142                 }),
143
144         build_file       => "descrip.mms",
145         build_scheme     => [ "unified", "VMS" ],
146
147         perl_platform    => 'VMS',
148     },
149 );