--  GNAT Project file that builds the ASIS library.
--  Copyright (c) 2005, 2006, 2008, 2009 Ludovic Brenta <ludovic@ludovic-brenta.org>
--  Copyright (c) 2013      Nicolas Boulenguez <nicolas@debian.org>

--  This program is free software; you can redistribute it and/or modify
--  it under the terms of the GNU 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 General Public License for more details.
with "gnatvsn.gpr";
project Install_ASIS is
   type Library_Kind is ("dynamic", "static");
   Kind : Library_Kind := External ("KIND");

   for Library_Name use "asis";
   for Library_Dir use Project'Name & "_lib_" & Kind;
   for Object_Dir use Project'Name & "_obj_" & Kind;
   for Library_Kind use Kind;
   case Kind is
      when "dynamic" =>
         for Library_Version use "libasis.so." & External ("soversion");
         for Library_Options use External_As_List ("LDFLAGS", " ");
      when "static" =>
         null;
   end case;
   for Source_Dirs use ("../asis");
   package Compiler is
      for Default_Switches ("Ada") use External_As_List ("ADAFLAGS", " ");
      -- Work around compiler bug #642980
      for Switches ("asis-text.adb") use External_As_List ("ADAFLAGS_no_opt", " ");
   end Compiler;
end Install_ASIS;
