Fix Constraint_Error
[diouzhtu.git] / shared.gpr
blob2e821da23584b89f5fe2b164fff73fe635985a04
1 ------------------------------------------------------------------------------
2 --                                Diouzhtu                                  --
3 --                                                                          --
4 --                           Copyright (C) 2007                             --
5 --                            Olivier Ramonat                               --
6 --                                                                          --
7 --  This library is free software; you can redistribute it and/or modify    --
8 --  it under the terms of the GNU General Public License as published by    --
9 --  the Free Software Foundation; either version 2 of the License, or (at   --
10 --  your option) any later version.                                         --
11 --                                                                          --
12 --  This library is distributed in the hope that it will be useful, but     --
13 --  WITHOUT ANY WARRANTY; without even the implied warranty of              --
14 --  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU       --
15 --  General Public License for more details.                                --
16 --                                                                          --
17 --  You should have received a copy of the GNU General Public License       --
18 --  along with this library; if not, write to the Free Software Foundation, --
19 --  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.       --
20 ------------------------------------------------------------------------------
22 project Shared is
24    for Source_Dirs use ();
25    --  No sources for this project
27    type Build_Type is ("Debug", "Release", "Profile");
28    Build : Build_Type := external ("PRJ_BUILD", "Debug");
30    type OS_Type is ("UNIX", "Windows_NT");
31    OS : OS_Type := external ("OS", "UNIX");
33    type Lib_Type is ("Static", "Dynamic");
34    Lib_Kind : Lib_Type := External ("PRJ_LIB_KIND", "Dynamic");
36    -------------
37    -- Builder --
38    -------------
40    package Builder is
41       case Build is
42          when "Release" | "Debug" =>
43             for Default_Switches ("ada") use ("-m", "-s");
45          when "Profile" =>
46             for Default_Switches ("ada") use
47               ("-m", "-s", "-fprofile-arcs", "-ftest-coverage");
48       end case;
49    end Builder;
51    --------------
52    -- Compiler --
53    --------------
55    Common_Options  :=
56      ("-gnat05", "-gnatwa", "-gnaty3Aabcdefhiklmnoprstux", "-Wall");
57    --  Common options used for the Debug and Release modes
59    Debug_Options   :=
60      ("-g", "-gnata", "-gnatVa", "-gnatQ", "-gnato", "-gnatwe");
62    Release_Options :=
63      ("-O2", "-gnatn");
65    package Compiler is
66       case Build is
67          when "Debug" | "Profile" =>
68             for Default_Switches ("Ada") use Common_Options & Debug_Options;
70          when "Release" =>
71             for Default_Switches ("Ada") use Common_Options & Release_Options;
72       end case;
73    end Compiler;
75    ------------
76    -- Binder --
77    ------------
79    package Binder is
80       case Build is
81          when "Debug" | "Profile" =>
82             for Default_Switches ("Ada") use ("-E", "-s", "-g");
84          when "Release" =>
85             for Default_Switches ("Ada") use ("-E", "-s");
86       end case;
87    end Binder;
89    ------------
90    -- Linker --
91    ------------
93    package Linker is
94       case Build is
95          when "Debug" =>
96             for Default_Switches ("Ada") use ("-g");
98          when "Profile" =>
99             for Default_Switches ("Ada") use ("-g", "-lgmem");
101          when "Release" =>
102             null;
103       end case;
104    end Linker;
106    ---------
107    -- Ide --
108    ---------
110    package Ide is
111       for Vcs_Kind use "Git";
112    end Ide;
114 end Shared;