Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
62 lines (45 sloc) 1.66 KB
with "aunit";
with "gnatcoll";
with "florist";
project Sting is
-- Only two ways to build sting, as a debug build or a release build
type Mode_Type is ("debug", "release", "test");
-- If the mode is set in the environment, we'll use that, otherwise we'll
-- just build a debug build by default
Mode : Mode_Type := external ("mode", "debug");
for Object_Dir use "obj/" & Mode;
for Exec_Dir use "bin";
for Main use ("main.adb", "test_runner.adb");
for Source_Dirs use ("src", "test/**", "contrib/alog/src/**");
package Builder is
for Executable ("main.adb") use "stingd";
for Default_Switches ("Ada") use ("-m", "-j2");
end Builder;
package Binder is
for Default_Switches ("Ada") use ("-E", "-v");
end Binder;
package Compiler is
Switches := ("-Wall", "-gnateS", "-gnatv", "-gnat2012");
case Mode is
when "test" =>
for Switches ("Ada") use ("-g",
"-fprofile-arcs",
"-ftest-coverage",
"-largs",
"-fprofile-arcs") & Switches;
when "debug" =>
for Switches ("Ada") use ("-g") & Switches;
when "release" =>
for Switches ("Ada") use ("-O2") & Switches;
end case;
end Compiler;
package Linker is
case Mode is
when "debug" | "test" =>
for Switches ("Ada") use ("-fprofile-arcs");
when "release" =>
null;
end case;
end Linker;
end Sting;
-- vim: ft=ada ts=4 sw=4 et