-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
zipada_lib.gpr
98 lines (80 loc) · 3.26 KB
/
zipada_lib.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
-- This is a GNAT, GCC or GNAT Studio project file
-- for the Zip-Ada library project:
--
-- Home page: http://unzip-ada.sf.net/
-- Project page: http://sf.net/projects/unzip-ada/
-- Mirror: https://github.com/zertovitch/zip-ada
-- Alire crate: https://alire.ada.dev/crates/zipada
--
-- Build me with "gprbuild -P zipada_lib", or "gnatmake -P zipada_lib",
-- or open me with GNAT Studio.
--
-- Important:
-- For building tests, see the zipada_test.gpr project file.
-- For building standalone tools, see the zipada.gpr project file.
--
library project ZipAda_Lib is
for Source_Dirs use ("zip_lib");
for Object_Dir use "obj_lib";
for Create_Missing_Dirs use "true"; -- Flips by default the "-p" switch
for Library_Dir use "lib";
for Library_Name use "zipada";
for Library_Interface use
("lz77",
"lzma", "lzma.decoding", "lzma.encoding",
"unzip", "unzip.streams",
"zip", "zip.crc_crypto", "zip.create", "zip.compress", "zip.headers",
"zip_streams");
for Library_Standalone use "standard";
for Library_Auto_Init use "true";
for Library_Symbol_Policy use "restricted";
type Library_Type is
("static",
"static-pic",
"dynamic",
"relocatable");
Library_Mode : Library_Type := external ("Library_Mode", "dynamic");
for Library_Kind use Library_Mode;
Common_Compiler_Options :=
("-gnatwa", -- Warnings switches (a:turn on all info/warnings marked with +)
"-gnatwh", -- Warnings switches (h:turn on warnings for hiding declarations)
"-gnatwcijkmopruvz.c.p.t.w.x", -- Warnings switches (run "gnatmake" for full list)
"-gnatf", -- Full errors. Verbose details, all undefined references
"-gnatq", -- Don't quit, try semantics, even if parse errors
"-gnatQ", -- Don't quit, write ali/tree file even if compile errors
"-g"); -- Generate debugging information
Fast_Compiler_Options_Inlining_Neutral := Common_Compiler_Options & ("-Ofast");
Fast_Compiler_Options :=
Fast_Compiler_Options_Inlining_Neutral &
("-gnatn"); -- Cross-unit inlining
type Zip_OS_Kind is
("Win32", "Win64", "Linux", "MacOSX", "Any");
Zip_OS : Zip_OS_Kind := external ("Zip_OS", "Any");
package Compiler is
case Zip_OS is
when "Win32" | "Win64" =>
for Default_Switches ("ada") use
Fast_Compiler_Options & ("-mfpmath=sse", "-msse3");
when others =>
for Default_Switches ("ada") use Fast_Compiler_Options;
end case;
end Compiler;
package Binder is
-- -Es: Store tracebacks in exception occurrences, and enable symbolic tracebacks
for Default_Switches ("ada") use ("-Es");
end Binder;
package Builder is
-- "If -j0 is used, then the maximum number of simultaneous compilation
-- jobs is the number of core processors on the platform."
for Default_Switches ("ada") use ("-j0");
end Builder;
package Ide is
for Default_Switches ("adacontrol") use ("-f", "tools/verif.aru", "-r");
for Vcs_Kind use "Subversion";
end Ide;
package Pretty_Printer is
for Default_Switches ("Ada") use (
"--indentation=2"
);
end Pretty_Printer;
end ZipAda_Lib;