Commit d2b2221a authored by Richard Levitte's avatar Richard Levitte
Browse files

Configure - Rename BASE to DEFAULTS and add a few inheritable BASEs



These BASE templates are intended to hold values that are common for
all configuration variants for whole families of configurations.

So far, three "families" are identified: Unix, Windows and VMS, mostly
characterised by the build system they currently use.

Reviewed-by: default avatarAndy Polyakov <appro@openssl.org>
parent b0b92a5b
Loading
Loading
Loading
Loading
+29 −2
Original line number Diff line number Diff line
# -*- Mode: perl -*-
%targets=(
    BASE => {
    DEFAULTS => {
	template	=> 1,

	cflags		=> "",
@@ -39,10 +39,37 @@
	shared_ldflag	=> "",
	shared_rcflag	=> "",
	shared_extension	=> "",

	build_scheme	=> "unixmake",
	build_file	=> "Makefile",
    },

    BASE_common => {
    },

    BASE_unix => {
        inherit_from    => [ "BASE_common" ],
        template        => 1,

        build_scheme    => "unixmake",
        build_file      => "Makefile",
    },

    BASE_Windows => {
        inherit_from    => [ "BASE_common" ],
        template        => 1,

        build_scheme    => [ "mk1mf" ],
    },

    BASE_VMS => {
        inherit_from    => [ "BASE_common" ],
        template        => 1,

        build_file       => "descrip.mms",
        build_scheme     => [ "unified", "VMS" ],
    },

    uplink_common => {
	template	=> 1,
	apps_aux_src	=> add("../ms/applink.c"),
+84 −43

File changed.

Preview size limit exceeded, changes collapsed.

+4 −7
Original line number Diff line number Diff line
@@ -136,7 +136,6 @@ my $apitable = {
    "0.9.8" => "0x00908000L",
};

my $base_target = "BASE";   # The template that all other inherit from
our %table = ();
our %config = ();

@@ -835,13 +834,11 @@ if ($d) {
    }
}
$config{target} = $target;
delete $table{$base_target}->{template}; # or the next test will fail.
my %target = resolve_config($target);

&usage if (!%target || $target{template});

# Set up defaults
my %target = ( %{$table{$base_target}}, %target );
%target = ( %{$table{DEFAULTS}}, %target );

$target{exe_extension}="";
$target{exe_extension}=".exe" if ($config{target} eq "DJGPP"
@@ -1047,7 +1044,7 @@ if ($target{sys_id} ne "")
	}

unless ($disabled{asm}) {
    $target{cpuid_asm_src}=$table{BASE}->{cpuid_asm_src} if ($config{processor} eq "386");
    $target{cpuid_asm_src}=$table{DEFAULTS}->{cpuid_asm_src} if ($config{processor} eq "386");
    $target{bn_asm_src} =~ s/\w+-gf2m.c// if (defined($disabled{ec2m}));

    # bn-586 is the only one implementing bn_*_part_words
@@ -1070,7 +1067,7 @@ unless ($disabled{asm}) {
    if ($target{md5_asm_src}) {
	push @{$config{defines}}, "MD5_ASM";
    }
    $target{cast_asm_src}=$table{BASE}->{cast_asm_src} unless $disabled{pic}; # CAST assembler is not PIC
    $target{cast_asm_src}=$table{DEFAULTS}->{cast_asm_src} unless $disabled{pic}; # CAST assembler is not PIC
    if ($target{rmd160_asm_src}) {
	push @{$config{defines}}, "RMD160_ASM";
    }
@@ -1087,7 +1084,7 @@ unless ($disabled{asm}) {
    }
    if ($target{wp_asm_src} =~ /mmx/) {
        if ($config{processor} eq "386") {
	    $target{wp_asm_src}=$table{BASE}->{wp_asm_src};
	    $target{wp_asm_src}=$table{DEFAULTS}->{wp_asm_src};
	} elsif (!$disabled{"whirlpool"}) {
	    $config{cflags}.=" -DWHIRLPOOL_ASM";
	}