Fix file permissions
[diouzhtu.git] / shared.gpr
blobb7418f80d6c811a8d52c907bb1901a9bf837c738
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
42       case Build is
44          when "Release" | "Debug" =>
45             for Default_Switches ("ada") use ("-m", "-s");
47          when "Profile" =>
48             for Default_Switches ("ada") use
49               ("-m", "-s", "-fprofile-arcs", "-ftest-coverage");
50       end case;
51    end Builder;
53    --------------
54    -- Compiler --
55    --------------
57    Common_Options  :=
58      ("-gnat05", "-gnatwa", "-gnaty3Aabcdefhiklmnoprstux", "-Wall");
59    --  Common options used for the Debug and Release modes
61    Debug_Options   :=
62      ("-g", "-gnata", "-gnatVa", "-gnatQ", "-gnato", "-gnatwe");
64    Release_Options :=
65      ("-O2", "-gnatn");
67    package Compiler is
68       case Build is
69          when "Debug" | "Profile" =>
70             for Default_Switches ("Ada") use Common_Options & Debug_Options;
72          when "Release" =>
73             for Default_Switches ("Ada") use Common_Options & Release_Options;
74       end case;
75    end Compiler;
77    ------------
78    -- Binder --
79    ------------
81    package Binder is
82       case Build is
83          when "Debug" | "Profile" =>
84             for Default_Switches ("Ada") use ("-E", "-s", "-g");
86          when "Release" =>
87             for Default_Switches ("Ada") use ("-E", "-s");
88       end case;
89    end Binder;
91    ------------
92    -- Linker --
93    ------------
95    package Linker is
96       case Build is
97          when "Debug" =>
98             for Default_Switches ("Ada") use ("-g");
100          when "Profile" =>
101             for Default_Switches ("Ada") use ("-g", "-lgmem");
103          when "Release" =>
104             null;
105       end case;
106    end Linker;
108    ---------
109    -- Ide --
110    ---------
112    package Ide is
113       for Vcs_Kind use "Subversion";
114    end Ide;
116 end Shared;