Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
mosteo committed Feb 27, 2007
1 parent ab990a1 commit 3c9d0f0
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 9 deletions.
18 changes: 9 additions & 9 deletions agpl_include.gpr
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
-- Options to be shared by all agpl project files

project Agpl_Include extends "../skel-ada/template_include.gpr" is
project Agpl_Include extends "base" is

for Source_Dirs use (".", "mw", "xmlada");

Trace_Enabled : Template_Include.Enabled_Disabled := External ("Agpl_Trace", "Enabled");
Trace_Enabled : Base.Enabled_Disabled := External ("Agpl_Trace", "Enabled");

case Trace_Enabled is
when "Enabled" =>
Expand All @@ -13,16 +13,16 @@ project Agpl_Include extends "../skel-ada/template_include.gpr" is
for Source_Dirs use Project'Source_Dirs & ("trace_false");
end case;

for Languages use ("Ada", "C");
for Languages use ("Ada", "C");

-- Selective functionalities of Agpl

Include_Base : Template_Include.Yes_No := External ("Agpl_Include_Base", "Yes");
Include_Concorde : Template_Include.Yes_No := External ("Agpl_Include_Concorde", "No");
Include_Gtk : Template_Include.Yes_No := External ("Agpl_Include_Gtk", "No");
Include_Http : Template_Include.Yes_No := External ("Agpl_Include_Http", "No");
Include_Psql : Template_Include.Yes_No := External ("Agpl_Include_Psql", "No");
Include_Test : Template_Include.Yes_No := External ("Agpl_Include_Test", "No");
Include_Base : Base.Yes_No := External ("Agpl_Include_Base", "Yes");
Include_Concorde : Base.Yes_No := External ("Agpl_Include_Concorde", "No");
Include_Gtk : Base.Yes_No := External ("Agpl_Include_Gtk", "No");
Include_Http : Base.Yes_No := External ("Agpl_Include_Http", "No");
Include_Psql : Base.Yes_No := External ("Agpl_Include_Psql", "No");
Include_Test : Base.Yes_No := External ("Agpl_Include_Test", "No");

case Include_Base is
when "No" => for Source_Dirs use ();
Expand Down
91 changes: 91 additions & 0 deletions base.gpr
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
-- Its purpose is to be copied and used as base

project Base is

type Boolean is ("True", "False");
type Enabled_Disabled is ("Enabled", "Disabled");
type Yes_No is ("Yes", "No");

type Build_Type is ("Debug", "Release", "No_Options", "Profile");
Build : Build_Type := external ("Build", "Debug");

for Source_Dirs use ();

for Object_Dir use "obj";
for Exec_Dir use "obj";

for Languages use ("Ada");

for Main use ("main.adb");

package Ide is
for Vcs_Kind use "Subversion";
end Ide;

package Compiler is

for Default_Switches ("C") use ("-g", "-Wall", "-O2");
for Default_Switches ("C++") use ("-g", "-Wall", "-O2");
for Default_Switches ("Ada") use ("-g", "-gnatf", "-gnat05", "-gnatwcfjklmopruvz", "-gnatyacehikn", "-gnatqQ");

case Build is

when "Profile" =>
for Default_Switches ("Ada") use Compiler'Default_Switches ("Ada") &
("-O2", "-gnato", "-fstack-check", "-gnata", "-gnatpg");

when "Debug" =>

for Default_Switches ("Ada") use Compiler'Default_Switches ("Ada") &
("-O2", "-gnato", "-fstack-check", "-gnata");

when "Release" =>

for Default_Switches ("Ada") use Compiler'Default_Switches ("Ada") & ("-O3", "-gnatn", "-gnatN");
for Default_Switches ("C") use Compiler'Default_Switches ("C") & ("-O3");
for Default_Switches ("C++") use Compiler'Default_Switches ("C") & ("-O3");

when "No_Options" =>

for Default_Switches ("Ada") use ("-gnat05");
-- Deliberately override default switches not to have any!

end case;
end Compiler;

package Binder is

for Default_Switches ("Ada") use ("-E", "-g", "-r");

end Binder;

package Linker is

for Default_Switches ("Ada") use ("-g", "-Wl,--gc-sections");
for Default_Switches ("C") use ("-g");
for Default_Switches ("C++") use ("-g");

end Linker;

package Builder is

for Default_Switches ("Ada") use ("-g", "-j2");

end Builder;

package Pretty_Printer is
for Default_Switches ("Ada") use ("-A1", "-A2", "-A3", "-A4");
end Pretty_Printer;

package Naming is
for Specification_Suffix ("C") use ".h";
for Implementation_Suffix ("C") use ".c";
for Specification_Suffix ("C++") use ".hh";
for Implementation_Suffix ("C++") use ".cpp";
for Implementation_Suffix ("C++") use ".cc";
for Specification_Suffix ("Changelog") use "changelog";
for Specification_Suffix ("Project file") use ".gpr";
for Specification_Suffix ("Python") use ".py";
end Naming;

end Base;

0 comments on commit 3c9d0f0

Please sign in to comment.