1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
|
project Shared is
Version := "0.8";
for Source_Dirs use ();
type Mode_Type is ("distrib", "debug", "optimize", "profile");
Mode : Mode_Type := external ("MODE", "optimize");
package Builder is
case Mode is
when "debug" =>
for Default_Switches ("Ada") use ("-g");
when others =>
for Default_Switches ("Ada") use ("-O2");
end case;
end Builder;
package compiler is
warnings := ("-gnatwua", "-gnaty");
case Mode is
when "distrib" =>
for Default_Switches ("Ada") use ("-O2", "-gnatN");
when "debug" =>
for Default_Switches ("Ada") use warnings
& ("-gnata", "-gnatVaMI");
when "optimize" =>
for Default_Switches ("Ada") use warnings
& ("-O2", "-gnatN", "-gnatp");
when "profile" =>
for Default_Switches ("Ada") use warnings & ("-pg");
end case;
end compiler;
package binder is
case Mode is
when "debug" =>
for Default_Switches ("Ada") use ("-E");
end case;
end binder;
package linker is
case Mode is
when "profile" =>
for Default_Switches ("Ada") use ("-pg");
when "distrib" =>
for Default_Switches ("Ada") use ("-s");
end case;
end linker;
end Shared;
|