This repository has been archived by the owner on Aug 13, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathhunter.gpr
101 lines (89 loc) · 2.78 KB
/
hunter.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
with "tashy";
with "xmlada";
with "ncursesada";
project hunter is
type UI_Type is ("graphical", "console");
UI : UI_Type := external ("UI", "graphical");
for Main use ("hunter.adb");
case UI is
when "graphical" =>
for Source_Dirs use ("src", "src/gui");
when "console" =>
for Source_Dirs use ("src", "src/tui");
end case;
for Object_Dir use "obj";
for Exec_Dir use "bin";
for Create_Missing_Dirs use "True";
type Mode_Type is ("debug", "release", "analyze");
Mode : Mode_Type := external ("Mode", "debug");
package Builder is
case Mode is
when "release" =>
for Default_Switches("ada") use ("-j0", "-gnat2012");
when others =>
for Default_Switches("ada") use ("-j0", "-gnat2012", "-g");
for Global_Configuration_Pragmas use "debug.adc";
end case;
end Builder;
package Binder is
case Mode is
when "debug" | "analyze" =>
for Default_Switches("ada") use ("-E", "-shared");
when "release" =>
for Default_Switches("ada") use ("-static");
end case;
end Binder;
package Compiler is
case Mode is
when "debug" =>
for Default_Switches ("ada") use ("-gnatwa",
"-fstack-check",
"-gnatVa",
"-gnatU",
"-gnatf",
"-gnateE",
"-gnaty3aAbCdefhIklnOprSux",
"-gnatwe");
when "release" =>
for Default_Switches ("ada") use ("-O2",
"-ffunction-sections",
"-fdata-sections",
"-s",
"-flto");
when "analyze" =>
for Default_Switches ("ada") use ("-pg",
"-fprofile-arcs",
"-ftest-coverage");
end case;
end Compiler;
package Linker is
case Mode is
when "debug" =>
for Default_Switches ("ada") use ("-no-pie", "-lmagic");
when "release" =>
for Default_Switches ("ada") use ("-Wl,--gc-sections",
"-lmagic",
"-Wl,-rpath,$ORIGIN/../lib",
"-s",
"-O2",
"-flto");
when "analyze" =>
for Default_Switches ("ada") use ("-no-pie",
"-pg",
"-fprofile-arcs",
"-lmagic");
end case;
end Linker;
package Pretty_Printer is
for Default_Switches("ada") use ("--RM-style-spacing",
"--no-separate-loop-then",
"--no-separate-is",
"-rnb",
"-c0");
end Pretty_Printer;
package GnatTest is
for Tests_Dir use "../tests";
for Harness_Dir use "../tests/driver";
for GnatTest_Switches use ("--omit-sloc", "--test-case-only");
end GnatTest;
end hunter;