forked from AdaCore/Ada_Drivers_Library
-
Notifications
You must be signed in to change notification settings - Fork 0
/
native.gpr
91 lines (79 loc) · 3.81 KB
/
native.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
-- This project file was generated by the Ada_Drivers_Library project wizard script
library project Native is
type Build_Type is ("Debug", "Production");
Build : Build_Type := external ("ADL_BUILD", "Debug");
type Build_Checks_Type is ("Disabled", "Enabled");
Build_Checks : Build_Checks_Type := external ("ADL_BUILD_CHECKS", "Disabled");
-- Target architecture
Target := Project'Target;
-- Callgraph info is not available on all architectures
Callgraph_Switch := ();
case Target is
when "riscv32-unknown-elf" => null;
when others => Callgraph_Switch := ("-fcallgraph-info=su");
end case;
Build_Checks_Switches := ();
case Build_Checks is
when "Disabled" => null;
when others =>
Build_Checks_Switches :=
("-gnaty", "-gnatyM120", "-gnatyO", -- Style checks
"-gnatwe"); -- Warnings as errors
end case;
package Compiler is
case Build is
when "Production" =>
for Default_Switches ("Ada") use
("-O3", -- Optimization
"-gnatp", -- Supress checks
"-gnatn"); -- Enable inlining
when "Debug" =>
for Default_Switches ("Ada") use
("-O0", -- No optimization
"-gnata") -- Enable assertions
& Callgraph_Switch;
end case;
for Default_Switches ("ada") use Compiler'Default_Switches ("Ada") &
Callgraph_Switch &
Build_Checks_Switches &
("-g", -- Debug info
"-gnatwa", -- All warnings
"-gnatw_A", -- Turn off warnings for anonymous allocators
"-gnatQ", -- Don't quit. Generate ALI and tree files even if illegalities
"-gnatw.X", -- Disable warnings for No_Exception_Propagation
"-ffunction-sections", -- Create a linker section for each function
"-fdata-sections"); -- Create a linker section for each data
end Compiler;
for Languages use ("Ada");
for Create_Missing_Dirs use "True";
for Object_Dir use "obj_" & Build;
for Library_Dir use "obj_lib_" & Build;
for Library_Kind use "static";
for Library_Name use "ada_drivers_library";
Linker_Switches := ();
Architecture := "Native"; -- From board definition
Board := "Native"; -- From command line
Has_Ravenscar_Full_Runtime := "False"; -- From default value
Has_Ravenscar_SFP_Runtime := "False"; -- From default value
Has_ZFP_Runtime := "False"; -- From default value
Max_Mount_Name_Length := "128"; -- From default value
Max_Mount_Points := "2"; -- From default value
Max_Path_Length := "1024"; -- From default value
Use_Startup_Gen := "False"; -- From command line
-- Project source directories
Src_Dirs_Root := "../..";
for Source_Dirs use (
Src_Dirs_Root & "/hal/src/", -- From HAL config
Src_Dirs_Root & "/boards/native/src/", -- From board definition
Src_Dirs_Root & "/middleware/src/filesystem", -- From middleware config
Src_Dirs_Root & "/middleware/src/BLE", -- From middleware config
Src_Dirs_Root & "/middleware/src/utils", -- From middleware config
Src_Dirs_Root & "/middleware/src/audio", -- From middleware config
Src_Dirs_Root & "/middleware/src/monitor", -- From middleware config
Src_Dirs_Root & "/middleware/src/bitmap", -- From middleware config
Src_Dirs_Root & "/middleware/src/command_line", -- From middleware config
Src_Dirs_Root & "/middleware/src/sdmmc", -- From middleware config
Src_Dirs_Root & "/middleware/src/neopixel", -- From middleware config
Src_Dirs_Root & "/components/src/**", -- From components config
"config_src/");
end Native;