-
Notifications
You must be signed in to change notification settings - Fork 4
/
keystoreada_config.gpr
78 lines (56 loc) · 2.13 KB
/
keystoreada_config.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
abstract project KeystoreAda_Config is
for Source_Dirs use ();
type Yes_No is ("yes", "no");
type Library_Type_Type is ("relocatable", "static", "static-pic");
type Build_Type is ("distrib", "debug", "optimize", "profile", "coverage");
Mode : Build_Type := external ("KEYSTORE_BUILD", "debug");
Processors := External ("PROCESSORS", "0");
package Builder is
for Switches (others) use ("-j" & Processors);
end Builder;
package compiler is
warnings := ("-gnatwua");
defaults := ("-gnat2012");
case Mode is
when "distrib" =>
for Default_Switches ("Ada") use defaults & ("-O2", "-gnatafno", "-gnatVa", "-gnatwa");
when "debug" =>
for Default_Switches ("Ada") use defaults & warnings
& ("-g", "-gnata", "-gnatVaMI", "-gnaty3abcefhiklmnprstxM99");
when "coverage" =>
for Default_Switches ("Ada") use defaults & warnings
& ("-g", "-O2", "-gnata", "-gnatVaMI", "-gnaty3abcefhiklmnprstxM99",
"-fprofile-arcs", "-ftest-coverage");
when "optimize" =>
for Default_Switches ("Ada") use defaults & warnings
& ("-O2", "-gnatn", "-gnatp", "-fdata-sections", "-ffunction-sections");
when "profile" =>
for Default_Switches ("Ada") use defaults & warnings & ("-pg");
end case;
end compiler;
package binder is
case Mode is
when "debug" =>
for Default_Switches ("Ada") use ("-E");
when others =>
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");
when "optimize" =>
for Default_Switches ("Ada") use ("-Wl,--gc-sections");
when "coverage" =>
for Default_Switches ("ada") use ("-fprofile-arcs");
when others =>
null;
end case;
end linker;
package Ide is
for VCS_Kind use "git";
end Ide;
end KeystoreAda_Config;