Minor reformatting, add missing header.
[gnadelite.git] / gnadelite.gpr
blobfd7cc2b02e4e35720814fdc24df9f85190c18fb7
1 ------------------------------------------------------------------------------
2 --                                GnadeLite                                 --
3 --                                                                          --
4 --                         Copyright (C) 2006-2008                          --
5 --                      Pascal Obry - 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 with "morzhol";
23 with "gpr/sqlite3";
25 project GnadeLite is
27    type Build_Type is ("Debug", "Release", "Profile");
28    Build : Build_Type := external ("PRJ_BUILD", "Debug");
31    for Source_Dirs use ("src");
32    for Object_Dir use "obj";
34    for Library_Dir use "lib";
35    for Library_Name use "gnadelite";
36    for Library_Kind use "dynamic";
37    for Library_Version use "libgnadelite.so.1.0";
38    for Library_Options use ("-lsqlite3");
40    --------------
41    -- Compiler --
42    --------------
44    Common_Options  := ("-Wall", "-fno-strict-aliasing", "-gnat05");
45    --  Common options used for the Debug and Release modes
47    Debug_Options   :=
48      ("-g", "-gnata", "-gnatVa", "-gnatQ", "-gnato", "-gnaty");
50    Release_Options :=
51      ("-O2");
53    case Build is
54       when "Debug" =>
55          for Object_Dir use ".build/debug/obj";
56          for Library_Dir use ".build/debug/lib";
57       when "Profile" =>
58          for Object_Dir use ".build/profile/obj";
59          for Library_Dir use ".build/profile/lib";
60          for Library_Options use Project'Library_Options & ("-fprofile-arcs");
61       when "Release" =>
62          for Object_Dir use ".build/release/obj";
63          for Library_Dir use ".build/release/lib";
64    end case;
66    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;
76    end Compiler;
78 end GnadeLite;