Fix typos, add more info in README
[gwiad.git] / shared.gpr
blob93eb15cad2d11e0ebb6bf20fc4a382f1651efa67
1 ------------------------------------------------------------------------------
2 --                                  Gwiad                                   --
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 ("Dynamic", "Static");
34    LT : Lib_Type := external ("LIB_TYPE", "Dynamic");
36    AdaCtrl_Rules_File := external ("PWD", "");
38    -------------
39    -- Builder --
40    -------------
42    package Builder is
43       case Build is
44          when "Debug" | "Release" =>
45             for Default_Switches ("Ada") use ("-m", "-s");
46          when "Profile" =>
47             for Default_Switches ("Ada") use
48               ("-m", "-s", "-fprofile-arcs", "-ftest-coverage");
49       end case;
50    end Builder;
52    --------------
53    -- Compiler --
54    --------------
56    Common_Options  :=
57      ("-gnat05", "-gnatwa", "-gnaty3Aabcdefhiklmnoprstux", "-Wall");
58    --  Common options used for the Debug and Release modes
60    Debug_Options   :=
61      ("-g", "-gnata", "-gnatVa", "-gnatQ", "-gnato");
63    Release_Options :=
64      ("-O2", "-gnatn");
66    package Compiler is
67       case Build is
68          when "Debug" | "Profile" =>
69             for Default_Switches ("Ada") use Common_Options & Debug_Options;
71          when "Release" =>
72             for Default_Switches ("Ada") use Common_Options & Release_Options;
73       end case;
74    end Compiler;
76    ------------
77    -- Binder --
78    ------------
80    package Binder is
81       case Build is
82          when "Debug" | "Profile" =>
83             for Default_Switches ("Ada") use ("-E", "-g");
85          when "Release" =>
86             for Default_Switches ("Ada") use ("-E");
87       end case;
88    end Binder;
90    ------------
91    -- Linker --
92    ------------
94    package Linker is
95       case Build is
96          when "Debug" =>
97             for Default_Switches ("Ada") use ("-g");
99          when "Profile" =>
100             for Default_Switches ("Ada") use ("-g", "-lgmem");
102          when "Release" =>
103             null;
104       end case;
105    end Linker;
107    ---------
108    -- Ide --
109    ---------
111    package Ide is
112       for Vcs_Kind use "Git";
113       case OS is
114          when "UNIX" =>
115             for Default_Switches ("adacontrol")
116               use ("-f", AdaCtrl_Rules_File & "/gwiad.aru", "-d", "-x");
117          when "Windows_NT" =>
118             for Default_Switches ("adacontrol")
119               use ("-f", AdaCtrl_Rules_File & "\gwiad.aru", "-d", "-x");
120       end case;
121    end Ide;
123 end Shared;