1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
|
------------------------------------------------------------------------------
-- GtkAda - Ada95 binding for the Gimp Toolkit --
-- --
-- Copyright (C) 2015, AdaCore --
-- --
-- This library is free software; you can redistribute it and/or modify it --
-- under terms of the GNU General Public License as published by the Free --
-- Software Foundation; either version 3, or (at your option) any later --
-- version. This library is distributed in the hope that it will be useful, --
-- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- --
-- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- --
-- --
-- --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
------------------------------------------------------------------------------
with "gtk";
project Shared is
type Build_Type is ("Debug", "Production");
Build : Build_Type := external ("BUILD", "@BUILD_TYPE@");
type Boolean_Type is ("True", "False");
Build_Opengl : Boolean_Type := "@HAVE_OPENGL@";
type Yes_No is ("yes", "no");
Need_Objective_C : Yes_No := "@NEED_OBJECTIVE_C@";
for Source_Files use ();
type Library_Kinds is ("relocatable", "static", "static-pic");
Library_Kind : Library_Kinds := external ("LIBRARY_TYPE", "@DEFAULT_LIBRARY_TYPE@");
So_Ext := "@SO_EXT@";
Version := "@PACKAGE_VERSION@";
Gtk_Include := Gtk.Gtk_Default_Include & (@GTK_CFLAGS_GPR@);
Gtk_Libs := Gtk.Gtk_Default_Libs & (@GTK_LIBS_GPR@);
GL_Include := Gtk.GL_Default_Include & (@GL_CFLAGS_GPR@);
GL_Libs := Gtk.GL_Default_Libs & (@GL_LIBS_GPR@);
package Naming is
for Body_Suffix ("Objective-C") use ".m";
end Naming;
package Compiler is
for Driver ("Objective-C") use "@OBJC@";
for Leading_Required_Switches ("Objective-C") use ("-c");
for PIC_Option ("Objective-C") use ("-fPIC");
for PIC_Option ("C") use ("-fPIC");
case Build is
when "Debug" =>
for Switches ("Ada") use
("-gnatQ", "-gnatwae", "-gnatay", "-g", "-O0",
"-Werror=format-security");
for Switches ("C") use ("-g", "-O0");
when "Production" =>
for Switches ("Ada") use
("-gnatQ", "-O2", "-gnatn", "-gnatwa", "-gnaty",
"-Werror=format-security");
for Switches ("C") use ("-O2");
end case;
Adaflags := External_As_List ("ADAFLAGS", " ");
for Switches ("Ada") use Compiler'Switches ("Ada") & Adaflags;
Cppflags := External_As_List ("CPPFLAGS", " ");
Cflags := External_As_List ("CFLAGS", " ");
for Switches ("C") use Compiler'Switches ("C") & Cppflags & Cflags;
for Switches ("C") use Compiler'Switches ("C") & Gtk_Include;
for Switches ("Objective-C") use Compiler'Switches ("Objective-C") & Gtk_Include;
end Compiler;
package Builder is
for Switches ("Ada") use ("-m");
case Build is
when "Debug" =>
for Global_Configuration_Pragmas use Shared'Project_Dir & "src/gnat_debug.adc";
when "Production" =>
for Global_Configuration_Pragmas use Shared'Project_Dir & "src/gnat.adc";
end case;
end Builder;
package Binder is
case Build is
when "Debug" =>
for Default_Switches ("Ada") use ("-E");
when "Production" =>
null;
end case;
end Binder;
Ldflags := External_As_List ("LDFLAGS", " ");
package Linker is
for Leading_Switches ("Ada") use Ldflags;
end Linker;
package IDE is
for VCS_Kind use "auto";
end IDE;
package Documentation is
for Documentation_Dir use "html";
end Documentation;
end Shared;
|