-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopenua.gpr
40 lines (33 loc) · 1.19 KB
/
openua.gpr
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
project OpenUA is
type Build_Modes is ("Release", "Debug");
Mode : Build_Modes := external ("mode", "Debug");
for Source_Dirs use ("src");
for Exec_Dir use ".";
for Main use ("test_types.adb");
case Mode is
when "Debug" => for Object_Dir use "obj_debug";
when "Release" => for Object_Dir use "obj_release";
end case;
package Compiler is
case Mode is
when "Debug" => for Default_Switches ("ada") use ("-gnato", "-gnatwa", "-gnatQ", "-gnat12");
when "Release" => for Default_Switches ("ada") use ("-gnatQ", "-O2", "-gnatn", "-gnat2012", "-flto", "-fdata-sections", "-ffunction-sections");
end case;
end Compiler;
package Builder is
case Mode is
when "Debug" => for Default_Switches ("ada") use ("-g");
when "Release" => for Default_Switches ("ada") use ();
end case;
end Builder;
package Linker is
case Mode is
when "Debug" => null;
when "Release" => for Default_Switches ("ada") use ("-Wl,--gc-sections", "-flto");
end case;
end Linker;
package Ide is
for Compiler_Command ("ada") use "gnatmake";
for Compiler_Command ("c") use "gcc";
end Ide;
end OpenUA;