| 1 |
library project Florist is |
| 2 |
|
| 3 |
for Library_Name use "florist"; |
| 4 |
for Languages use ("C", "Ada"); |
| 5 |
|
| 6 |
type Boolean is ("False", "True"); |
| 7 |
Threads : Boolean := external ("THREADS", "True"); |
| 8 |
|
| 9 |
Common_Source_Dirs := ("libsrc", "gensrc", "confsrc"); |
| 10 |
Threads_Source_Dirs := ("libsrc/threads", "gensrc/threads"); |
| 11 |
case Threads is |
| 12 |
when "False" => |
| 13 |
for Source_Dirs use Common_Source_Dirs; |
| 14 |
when "True" => |
| 15 |
for Source_Dirs use Common_Source_Dirs & Threads_Source_Dirs; |
| 16 |
end case; |
| 17 |
|
| 18 |
for Object_Dir use "obj"; |
| 19 |
for Library_Dir use "lib"; |
| 20 |
|
| 21 |
Version := "1"; |
| 22 |
for Library_version use "libflorist.so." & Version; |
| 23 |
|
| 24 |
type Library_Type_Type is ("relocatable", "static"); |
| 25 |
Library_Type : Library_Type_Type := external ("LIBRARY_TYPE", "static"); |
| 26 |
for Library_Kind use Library_Type; |
| 27 |
|
| 28 |
type Build_Type is ("Debug", "Production"); |
| 29 |
Build : Build_Type := External ("Build", "Production"); |
| 30 |
|
| 31 |
package Compiler is |
| 32 |
|
| 33 |
Ada_Flags := ("-O2", "-gnatp", "-gnat95"); |
| 34 |
GNAT_Flags := Ada_Flags & ("-gnatg"); |
| 35 |
|
| 36 |
case Build is |
| 37 |
when "Production" => |
| 38 |
-- Use above defaults |
| 39 |
when "Debug" => |
| 40 |
Ada_Flags := ("-g", "-O2", "-gnatwae", "-gnatyg", "-gnatw.Z"); |
| 41 |
GNAT_Flags := ("-g", "-O2", "-gnatpg"); |
| 42 |
end case; |
| 43 |
|
| 44 |
for Switches ("posix-signals.adb") use GNAT_Flags; |
| 45 |
for Switches ("posix-implementation.adb") use GNAT_Flags; |
| 46 |
for Switches ("posix-supplement_to_ada_io.adb") use GNAT_Flags; |
| 47 |
for Switches ("posix-unsafe_process_primitives.adb") use GNAT_Flags; |
| 48 |
for Default_Switches ("Ada") use Ada_Flags; |
| 49 |
|
| 50 |
end Compiler; |
| 51 |
|
| 52 |
end Florist; |