diff options
author | Richard Levitte <levitte@openssl.org> | 2016-03-02 19:13:26 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2016-03-02 19:15:42 +0100 |
commit | 8864f0de7b491b4c7f724f58200d843700c82e98 (patch) | |
tree | 90e42ddd86fd58db18bca590b01cf0f44abff884 /Configurations/99-personal-levitte.conf | |
parent | 940a09bad42c673b0dccd725ae590025c9749735 (diff) |
Configure - get rid of the special debug_ and release_ settings
Instead, make the build type ("debug" or "release") available through
$config{build_type} and let the configs themselves figure out what the
usual settings (such as "cflags", "lflags" and so on) should be
accordingly.
The benefit with this is that we can now have debug and release
variants of any setting, not just those Configure supports, and may
also involve other factors (the MSVC flags /MD[d] and /MT[d] involve
both build type and whether threading is enabled or not)
Reviewed-by: Andy Polyakov <appro@openssl.org>
Diffstat (limited to 'Configurations/99-personal-levitte.conf')
-rw-r--r-- | Configurations/99-personal-levitte.conf | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/Configurations/99-personal-levitte.conf b/Configurations/99-personal-levitte.conf index 9db343e816..d1ddf2ef54 100644 --- a/Configurations/99-personal-levitte.conf +++ b/Configurations/99-personal-levitte.conf @@ -1,18 +1,26 @@ ## -*- mode: perl; -*- ## Personal configuration targets +sub picker { + my %opts = @_; + return sub { add($opts{default} || (), + $opts{$config{build_type}} || ())->(); } +} + %targets = ( "levitte-linux-elf" => { inherit_from => [ "linux-elf" ], - debug_cflags => add("-ggdb -g3"), - debug_defines => add("LEVITTE_DEBUG", { separator => undef }), + cflags => add(picker(debug => "-ggdb -g3")), + defines => add(picker(debug => "LEVITTE_DEBUG"), + { separator => undef }), build_scheme => [ "unified", "unix" ], build_file => "Makefile", }, "levitte-linux-x86_64" => { inherit_from => [ "linux-x86_64" ], - debug_cflags => add("-ggdb -g3"), - debug_defines => add("LEVITTE_DEBUG", { separator => undef }), + cflags => add(picker(debug => "-ggdb -g3")), + defines => add(picker(debug => "LEVITTE_DEBUG"), + { separator => undef }), build_scheme => [ "unified", "unix" ], build_file => "Makefile", }, |