-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmalef.gpr
76 lines (63 loc) · 2.29 KB
/
malef.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
with "config/malef_config.gpr";
project Malef is
type Operating_System is ("linux", "windows", "unix");
System : Operating_System := External ("MALEF_SYSTEM", "linux");
Default_Subsystem := "";
case System is
when "linux" => Default_Subsystem := "ansi";
when "windows" => Default_Subsystem := "cmd";
when "unix" => Default_Subsystem := "ansi";
end case;
Operating_System_Interface := "";
case System is
when "linux" | "unix" => Operating_System_Interface := "posix";
when "windows" => Operating_System_Interface := "win32";
end case;
type Subsystem_Name is ("ansi", "cmd");
Subsystem : Subsystem_Name := External ("MALEF_SUBSYSTEM", Default_Subsystem);
for Languages use ("Ada", "C");
for Library_Name use "Malef";
for Library_Version use Project'Library_Name & ".so." & Malef_Config.Crate_Version;
for Source_Dirs use (
"src/",
"config/",
"src/private",
"src/drawing",
"src/subsystems/",
"src/subsystems/" & Subsystem,
"src/subsystems/" & Subsystem & "/" & Operating_System_Interface,
"src/widgets");
for Object_Dir use "obj/" & System & "-" & Subsystem & "-" & Malef_Config.Build_Profile;
for Create_Missing_Dirs use "True";
for Library_Dir use "lib/" & System & "-" & Subsystem & "-" & Malef_Config.Build_Profile;
type Library_Type_Type is ("relocatable", "static", "static-pic");
Library_Type : Library_Type_Type :=
external ("MALEF_LIBRARY_TYPE", external ("LIBRARY_TYPE", "static"));
for Library_Kind use Library_Type;
package Compiler is
for Default_Switches ("Ada") use Malef_Config.Ada_Compiler_Switches &
("-gnatW8");
for Default_Switches ("C") use
( "--std=c18"
, "-Wall"
, "-Werror"
, "-Wextra"
, "-pedantic"
, "-O3"
, "-g"
, "-fdata-sections"
, "-ffunction-sections"
, "-fPIC"
);
end Compiler;
package Binder is
for Switches ("Ada") use ("-Es", "-W8"); -- Symbolic traceback
end Binder;
package Install is
for Artifacts (".") use ("share");
end Install;
package Documentation is
for Output_Dir ("html") use "obj/docs";
for Resources_Dir ("html") use "docs/resources";
end Documentation;
end Malef;