-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
100 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |