-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
steamsky.gpr
94 lines (83 loc) · 2.73 KB
/
steamsky.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
with "tashy";
project steamsky is
for Main use ("steamsky.adb");
for Source_Dirs use ("src/**", "nim/obj/**");
for Object_Dir use "obj";
for Exec_Dir use "bin";
for Languages use ("ada", "c");
for Create_Missing_Dirs use "True";
type Mode_Type is ("debug", "release", "analyze");
Mode : Mode_Type := external ("Mode", "debug");
type OS_Type is ("Windows", "Unix");
OS : OS_Type := external ("OS", "Unix");
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 "gnat.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;
for Default_Switches("c") use ("-Inim/obj/",
"-I/nim-2.0.8/lib/");
end Compiler;
package Linker is
Release_Switches := ("-Wl,--gc-sections", "-s", "-O2", "-flto", "-lm");
case Mode is
when "debug" =>
for Default_Switches ("ada") use ("-no-pie", "-lm");
when "release" =>
case OS is
when "Windows" =>
for Default_Switches ("ada") use Release_Switches &
"-mwindows";
when "Unix" =>
for Default_Switches ("ada") use Release_Switches &
"-Wl,-rpath,$ORIGIN/libs";
end case;
when "analyze" =>
for Default_Switches ("ada") use ("-no-pie",
"-pg",
"-fprofile-arcs",
"-lm");
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;
end steamsky;