-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmaths.gpr
58 lines (42 loc) · 1.75 KB
/
maths.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
with "config/maths_config.gpr";
project Maths is
type CPU_Type is ("X86", "X86_64", "AARCH64");
-- type Platform_Type is ("linux", "bsd", "windows", "macosx", "macos_homebrew", "macos_ports", "ios", "android");
CPU : CPU_Type := external ("MATHS_CPU", "X86_64");
-- Platform : Platform_Type := external ("MATHS_PLATFORM", "linux");
-- Source_Platform_Linker := "";
-- case Platform is
-- when "macosx" =>
-- Source_Platform_Linker := "src/link/macosx";
-- when others =>
-- Source_Platform_Linker := "src/link/nix";
-- end case;
for Library_Name use "Maths";
for Library_Version use Project'Library_Name & ".so." & Maths_Config.Crate_Version;
for Source_Dirs use ("src/", "src/vectors/", "src/matrices", "src/utils", "config/");
for Object_Dir use "obj/" & Maths_Config.Build_Profile;
for Create_Missing_Dirs use "True";
for Library_Dir use "lib";
type Library_Type_Type is ("relocatable", "static", "static-pic");
Library_Type : Library_Type_Type := external ("MATHS_LIBRARY_TYPE", external ("LIBRARY_TYPE", "static"));
for Library_Kind use Library_Type;
Maths_Options := ();
case CPU is
when "X86" | "X86_64" =>
Maths_Options := ("-mavx", "-msse4.1");
when others =>
null;
-- when "AARCH64" =>
-- Maths_Config := "-n"
end case;
package Compiler is
for Default_Switches ("Ada") use Maths_Config.Ada_Compiler_Switches & Maths_Options &
("-gnat2022", "-gnatyM120", "-gnata", "-gnaty-u", "-gnatwJ", "-gnatf");
end Compiler;
package Binder is
for Switches ("Ada") use ("-Es"); -- Symbolic traceback
end Binder;
package Install is
for Artifacts (".") use ("share");
end Install;
end Maths;