-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconsole_utils.gpr
88 lines (72 loc) · 3.1 KB
/
console_utils.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
-- console_utils.gpr --- Project Manager File
-- Copyright 2019 cnngimenez
--
-- 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 utils.gpr
-- Add other projects for compiling using with:
--
-- with "matreshka_league.gpr";
-- with "gtkada.gpr";
library project
Console_Utils is
type Compilation_Type is ("relocatable", "dynamic", "static-pic", "static");
type Optimisation_Type is ("debug", "production");
Compilation : Compilation_Type := external ("LIBRARY_KIND", "dynamic");
Optimisation : Optimisation_Type := external ("OPTIMISATION", "production");
for Library_Name use "console_utils";
for Library_Dir use "lib";
-- for Library_Kind use "static";
-- for Library_Kind use "dynamic"; -- a.k.a. "relocatable"
for Library_Kind use Compilation;
for Source_Dirs use (
"src/libraries",
"src/libraries/console",
"src/libraries/unicode",
"src/libraries/widgets",
"src/libraries/processes",
"src/libraries/apagerlib"
);
-- for Source_Files use ("this-file.adb", "this-other.adb");
case Compilation is
when "dynamic" | "relocatable" =>
for Object_Dir use ".objs/library/relocatable";
when "static" =>
for Object_Dir use ".objs/library/static";
when "static-pic" =>
for Object_Dir use ".objs/library/static-pic";
end case;
for Languages use ("ada", "c");
package Compiler is
for Default_Switches ("Ada") use
(
-- "-gnatc", -- Semantic checking
-- 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"
);
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;
end Console_Utils;