-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathplayer3_ada.gpr
86 lines (66 loc) · 2.79 KB
/
player3_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
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
project Player3_Ada is
type Yes_No is ("Yes", "No");
Lib_Name := "playerada";
Lib_Version := "3.0.1.0";
for Languages use ("Ada", "C");
type Build_Type is ("Debug", "Release");
type Linking_Type is ("Dependencies", "Static_Library", "Dynamic_Library");
Build : Build_Type := External ("Player3_Ada_Build", "Debug");
Link : Linking_Type := External ("Player3_Ada_Link", "Dependencies");
Prefix := External ("Player3_Ada_Prefix", "/usr");
package Ide is
for Vcs_Kind use "Subversion";
end Ide;
for Source_Dirs use ();
for Object_Dir use "obj";
for Exec_Dir use "obj";
case Link is
when "Dependencies" =>
null;
when "Static_Library" =>
for Library_Dir use "libstatic";
for Library_Name use Lib_Name;
for Library_Kind use "Static";
for Library_Version use Lib_Name & ".a." & Lib_Version;
when "Dynamic_Library" =>
for Library_Dir use "libdynamic";
for Library_Name use Lib_Name;
for Library_Kind use "Dynamic";
for Library_Version use Lib_Name & ".so." & Lib_Version;
end case;
Include_Base : Yes_No := External ("Player3_Ada_Include_Base", "Yes");
Include_Test : Yes_No := External ("Player3_Ada_Include_Test", "No");
case Include_Base is
when "Yes" => for Source_Dirs use project'Source_Dirs & (".");
when "No" => null;
end case;
case Include_Test is
when "Yes" => for Source_Dirs use project'Source_Dirs & ("tests");
when "No" => null;
end case;
package Compiler is
for Default_Switches ("c") use ("-g", "-Wall", "-O2", "-I" & Prefix & "/include/player-3.0");
for Default_Switches ("ada") use ("-g", "-gnatf", "-gnat05", "-gnatwcfjkmoruvz", "-gnatyacehikn", "-gnatqQ");
-- gnatqQ allow to write a failed .ali compilation.
-- So we don't lose symbols in the IDE
case Build is
when "Debug" =>
for Default_Switches ("ada") use Compiler'Default_Switches ("ada") &
("-O2", "-gnato", "-fstack-check", "-gnata");
when "Release" =>
for Default_Switches ("ada") use Compiler'Default_Switches ("ada") & ("-O3", "-gnatN");
end case;
end Compiler;
package Linker is
for Default_Switches ("c") use ("-g");
for Default_Switches ("ada") use ("-g", "-L" & prefix & "/lib");
end Linker;
package Naming is
for Specification_Suffix ("C") use ".h";
for Implementation_Suffix ("C") use ".c";
for Implementation_Suffix ("C++") use ".cpp";
for Specification_Suffix ("Changelog") use "changelog";
for Specification_Suffix ("Project file") use ".gpr";
for Specification_Suffix ("Python") use ".py";
end Naming;
end Player3_Ada;