Configure - get rid of the special debug_ and release_ settings
[openssl.git] / Configurations / 99-personal-levitte.conf
index 9db343e..d1ddf2e 100644 (file)
@@ -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",
     },