Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
83 lines (73 sloc) 3.29 KB
-------------------------------------------------------------------------------
-- XReq -- Behaviour Driven Developpement tool for compiled languages --
-- Copyright (c) 2010, SOGILIS <http://sogilis.com> --
-- --
-- This program is free software: you can redistribute it and/or modify --
-- it under the terms of the GNU Affero General Public License as --
-- published by the Free Software Foundation, either version 3 of the --
-- License, or (at your option) any later version. --
-- --
-- This program is distributed in the hope that it will be useful, --
-- but WITHOUT ANY WARRANTY; without even the implied warranty of --
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --
-- GNU Affero General Public License for more details. --
-- --
-- You should have received a copy of the GNU Affero General Public License --
-- along with this program. If not, see <http://www.gnu.org/licenses/>. --
-- --
-------------------------------------------------------------------------------
-- kate: hl Ada; indent-width 3;
with "config.gpr";
with "xreqlib.gpr";
project XReq is
for Languages use ("Ada");
for Main use ("main");
for Source_Dirs use ("src");
for Object_Dir use "obj/" & Config.Mode;
for Exec_Dir use "bin";
Extra_Linker_Flags := ();
-- case Config.Lib_Kind is
-- when "static" => Extra_Linker_Flags := ("-static");
-- when "dynamic" => Extra_Linker_Flags := ();
-- end case;
package Builder is
case Config.Mode is
when "debug" =>
for Executable ("main.adb") use "xreq.dbg";
when "release" =>
for Executable ("main.adb") use "xreq.rel";
when "coverage" =>
for Executable ("main.adb") use "xreq.cov";
end case;
end Builder;
package Compiler is
case Config.Mode is
when "debug" =>
for Default_Switches ("Ada") use Config.Ada_Switches_Debug;
when "release" =>
for Default_Switches ("Ada") use Config.Ada_Switches_Release;
when "coverage" =>
for Default_Switches ("Ada") use Config.Ada_Switches_Coverage;
end case;
end Compiler;
package Binder is
case Config.Mode is
when "debug" =>
for Default_Switches ("Ada") use Config.Ada_Switches_Binder_Debug;
when "coverage" =>
for Default_Switches ("Ada") use Config.Ada_Switches_Binder_Coverage;
when others =>
null;
end case;
end Binder;
package Linker is
case Config.Mode is
when "debug" =>
for Default_Switches ("Ada") use Config.Ada_Switches_Linker_Debug & Extra_Linker_Flags;
when "coverage" =>
for Default_Switches ("Ada") use Config.Ada_Switches_Linker_Coverage & Extra_Linker_Flags;
when others =>
for Default_Switches ("Ada") use Extra_Linker_Flags;
end case;
end Linker;
end XReq;