-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gpr
36 lines (29 loc) · 1011 Bytes
/
build.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
--- @summary Book program
project Build is
-- project level attributes
type Mode_Type is ("debug", "release");
Mode : Mode_Type := external ("mode", "debug");
TargetDir := "target";
for Languages use ("Ada");
for Source_Dirs use ("src/main/ada");
for Main use ("main.adb");
for Exec_Dir use TargetDir;
for Object_Dir use TargetDir & "/obj";
for Create_Missing_Dirs use "True";
package Builder is
for Executable ("main.adb") use "Book";
end Builder;
package Compiler is
case Mode is
when "debug" =>
for Switches ("Ada") use ("-g");
when "release" =>
for Switches ("Ada") use ("-O2");
end case;
end Compiler;
-- https://docs.adacore.com/live/wave/gps/html/gnatdoc-doc/gnatdoc.html#configuration
package Documentation is
for Documentation_Dir use TargetDir & "/docs";
-- for Image_Dir use TargetDir & "/docs/images";
end Documentation;
end Build;