Apps: divide the modules in direct command modules, support library and init
[openssl.git] / Configurations / 00-base-templates.conf
index 1a2964520ab3b17b7ed790c41b3d441b444e98a7..0d0f8b8a7f4a403d23a0e7a766e87d4a31aaf0a3 100644 (file)
@@ -11,6 +11,7 @@ my %targets=(
        thread_defines  => [],
 
        apps_aux_src    => "",
+       apps_init_src   => "",
        cpuid_asm_src   => "mem_clr.c",
        uplink_aux_src  => "",
        bn_asm_src      => "bn_asm.c",
@@ -38,8 +39,22 @@ my %targets=(
        shared_rcflag   => "",
        shared_extension        => "",
 
-        build_scheme    => [ "unified", "unix" ],
-        build_file      => "Makefile",
+       #### Defaults for the benefit of the config targets who don't inherit
+       #### a BASE and assume Unixly defaults
+       #### THESE WILL DISAPPEAR IN OpenSSL 1.2
+       build_scheme    => [ "unified", "unix" ],
+       build_file      => "Makefile",
+
+       ar              => "ar",
+       arflags         => "r",
+       cc              => "cc",
+       hashbangperl    => "/usr/bin/env perl",
+       ranlib          => sub { which("$config{cross_compile_prefix}ranlib") ?
+                                    "\$(CROSS_COMPILE)ranlib" : "true"; },
+       rc              => "windres",
+
+       #### THESE WILL BE ENABLED IN OpenSSL 1.2
+       #hashbangperl   => "PERL", # Only Unix actually cares
     },
 
     BASE_common => {
@@ -61,12 +76,19 @@ my %targets=(
         inherit_from    => [ "BASE_common" ],
         template        => 1,
 
+        ar              => "ar",
+        arflags         => "r",
+        cc              => "cc",
         lflags          =>
             sub { $withargs{zlib_lib} ? "-L".$withargs{zlib_lib} : () },
         ex_libs         =>
             sub { !defined($disabled{zlib})
                   && defined($disabled{"zlib-dynamic"})
                   ? "-lz" : () },
+        hashbangperl    => "/usr/bin/env perl", # Only Unix actually cares
+        ranlib          => sub { which("$config{cross_compile_prefix}ranlib") ?
+                                     "\$(CROSS_COMPILE)ranlib" : "true"; },
+        rc              => "windres",
 
         build_scheme    => [ "unified", "unix" ],
         build_file      => "Makefile",
@@ -113,7 +135,7 @@ my %targets=(
 
     uplink_common => {
        template        => 1,
-       apps_aux_src    => add("../ms/applink.c"),
+       apps_init_src   => add("../ms/applink.c"),
        uplink_aux_src  => add("../ms/uplink.c"),
        defines         => add("OPENSSL_USE_APPLINK"),
     },