-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlibtcod_ada.gpr
47 lines (34 loc) · 1.33 KB
/
libtcod_ada.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
with "third_party/libtcod/libtcod.gpr";
project Libtcod_Ada is
type Platform_Type is ("macos", "windows", "linux");
type Build_Mode_Type is ("optimize", "normal");
for Languages use ("Ada");
Platform : Platform_Type := external ("Platform");
Build_Mode : Build_Mode_Type := external ("Build_Mode", "normal");
Linker_Flag_List := ("-lsdl2", "-lz");
Compiler_Flag_List := ("-gnat12", "-gnatwa", "-gnatwK", "-gnatwF");
for Object_Dir use "obj";
for Source_Dirs use ("src", "src/generated", "demo", "demo/tutorial");
for Main use ("tutorial.adb", "keys.adb");
package Linker is
case Platform is
when "macos" =>
for Switches ("ada") use ("-L/usr/local/lib", "-ld_classic") & Linker_Flag_List;
when "windows" =>
for Switches ("ada") use Linker_Flag_List;
when "linux" =>
for Switches ("ada") use Linker_Flag_List;
end case;
end Linker;
package Compiler is
case Build_Mode is
when "normal" =>
for Switches ("ada") use Compiler_Flag_List & ("-gnata");
when "optimize" =>
for Switches ("ada") use Compiler_Flag_List & ("-flto", "-O3", "-gnatn", "-funroll-loops");
end case;
end Compiler;
package Builder is
for Switches ("ada") use ("-j0", "-s");
end Builder;
end Libtcod_Ada;