Debian Codegraph @

lzma/gnatcoll_lzma.gpr

raw ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 ------------------------------------------------------------------------------
2 -- G N A T C O L L --
3 -- --
4 -- Copyright (C) 2019-2020, AdaCore --
5 -- --
6 -- This library is free software; you can redistribute it and/or modify it --
7 -- under terms of the GNU General Public License as published by the Free --
8 -- Software Foundation; either version 3, or (at your option) any later --
9 -- version. This library is distributed in the hope that it will be useful, --
10 -- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- --
11 -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. --
12 -- --
13 -- As a special exception under Section 7 of GPL version 3, you are granted --
14 -- additional permissions described in the GCC Runtime Library Exception, --
15 -- version 3.1, as published by the Free Software Foundation. --
16 -- --
17 -- You should have received a copy of the GNU General Public License and --
18 -- a copy of the GCC Runtime Library Exception along with this program; --
19 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
20 -- <http://www.gnu.org/licenses/>. --
21 -- --
22 ------------------------------------------------------------------------------
23
24 with "gnatcoll_core";
25
26 library project GnatColl_LZMA is
27
28 Version := External ("GNATCOLL_VERSION", "0.0");
29 Name := "gnatcoll_lzma";
30
31 type Build_Type is ("DEBUG", "PROD");
32 Build : Build_Type :=
33 External ("GNATCOLL_BUILD_MODE", External ("BUILD", "PROD"));
34
35 type Library_Type_Type is ("relocatable", "static", "static-pic");
36 Library_Type : Library_Type_Type := External ("LIBRARY_TYPE", "static");
37
38 for Source_Dirs use (".");
39 for Library_Kind use Library_Type;
40 for Object_Dir
41 use "obj/" & Project'Library_Kind;
42 for Library_Dir
43 use "lib/" & Project'Library_Kind;
44 for Library_Name use Name;
45
46 Link_Opt := "-llzma";
47
48 case Library_Type is
49 when "relocatable" =>
50 for Library_Version use "lib" & Name & Gnatcoll_Core.So_Ext & "." & Version;
51 for Leading_Library_Options use External_As_List ("LDFLAGS", " ");
52 for Library_Options use (Link_Opt);
53 when others =>
54 null;
55 end case;
56
57 for Languages use ("Ada");
58
59 package Compiler is
60 case Build is
61 when "DEBUG" =>
62 for Switches ("Ada") use
63 ("-g", "-O0", "-gnata", "-gnatVa", "-gnatQ", "-gnaty", "-gnateE",
64 "-gnatwaCJe", "-fstack-check");
65
66 when "PROD" =>
67 -- Do not use -gnatwe for production mode
68 for Switches ("Ada") use ("-O2", "-gnatn", "-gnatwaCJ");
69 end case;
70
71 for Switches ("Ada") use Compiler'Switches ("Ada")
72 & External_As_List ("ADAFLAGS", " ");
73 end Compiler;
74
75 package Binder is
76 case Build is
77 when "DEBUG" =>
78 for Switches ("Ada") use ("-E");
79 when "PROD" =>
80 null;
81 end case;
82 end Binder;
83
84 package Builder is
85 case Build is
86 when "DEBUG" =>
87 for Global_Configuration_Pragmas use "../gnat_debug.adc";
88 when "PROD" =>
89 null;
90 end case;
91 end Builder;
92
93 package Linker is
94 for Linker_Options use (Link_Opt);
95 end Linker;
96
97 package Ide is
98 for VCS_Kind use "Git";
99 end Ide;
100
101 end GnatColl_LZMA;