-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconsole_util_tools.gpr
114 lines (97 loc) · 3.79 KB
/
console_util_tools.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
-- console_util_tools.gpr --- Project Manager File
-- Copyright 2020 poo
--
-- Author: cnngimenez
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
-------------------------------------------------------------------------
-- Use this command to build: gnatmake -P util_tools.gpr
-- Add other projects for compiling using with:
--
-- with "matreshka/league.gpr";
-- with "gtkada.gpr";
with "console_utils.gpr";
project Console_Util_Tools is
type Linking_Type is ("shared", "static");
type Optimisation_Type is ("debug", "production");
Linking : Linking_Type := external ("LINKING_TYPE", "shared");
Optimisation : Optimisation_Type := external ("OPTIMISATION", "production");
for Source_Dirs use (
"src/tools"
);
-- for source_files use ("this-file.adb", "this-other.adb");
for Object_Dir use ".objs/bin";
for Exec_Dir use "bin";
for Main use (
"button_test.adb",
"console_test.adb",
"emoji_test.adb",
"emoji_test_read.adb",
"selector.adb",
"keys.adb",
"mouse_test.adb",
"countdown.adb",
"label.adb",
"alarm.adb",
"my_ps.adb",
"file_test.adb",
"idle_time.adb",
"apager.adb",
"apager_backend_test.adb",
"pages_test.adb"
);
-- for languages use ("ada", "c");
package Compiler is
for Default_Switches ("ada") use
(
"-g", -- with Debugging symbols
-- "-gnatc", -- Semantic checkeng
-- All warnings and style checkings!
"-Wall", "-gnatwa", "-gnatVa", "-gnatVoi", "-gnatyy", "-gnatyB",
"-gnatyd", "-gnatyI", "-gnatyo", "-gnatyO", "-gnatyS",
"-gnatyu", "-gnatyx", "-gnaty4", "-gnatw_c", "-gnatwi", "-gnatwu",
-- Requested by the linker to generate dynamic libraries.
"-fPIC",
-- Print full path
"-gnatef"
-- "-gnatw8" -- unicode support for source code
);
case Optimisation is
when "debug" =>
for Default_Switches ("Ada") use Compiler'Default_Switches ("Ada")
& ("-g"); -- with Debugging symbols
when "production" =>
for Default_Switches ("Ada") use Compiler'Default_Switches ("Ada")
& ("-O2");
end case;
end Compiler;
package Binder is
case Linking is
when "shared" =>
for Default_Switches ("Ada") use Binder'Default_Switches ("Ada")
& ("-shared");
when "static" =>
for Default_Switches ("Ada") use Binder'Default_Switches ("Ada")
& ("-static");
end case;
end Binder;
package Linker is
case Linking is
when "shared" =>
for Default_Switches ("Ada") use Linker'Default_Switches ("Ada")
& ("-lX11", "-lXss");
when "static" =>
for Default_Switches ("Ada") use Linker'Default_Switches ("Ada")
& ("-static", "-Bstatic", "-lX11", "-lXss");
-- "-static-libgcc");
end case;
end Linker;
end Console_Util_Tools;