project Shared is
   Version := "@XMLADA_MAJOR_VERSION@.@XMLADA_MINOR_VERSION@";

   type Library_Type_Type is ("relocatable", "static");
   Library_Type : Library_Type_Type := external ("LIBRARY_TYPE", "relocatable");

   for Source_Dirs use ();

   type Mode_Type is ("distrib", "debug", "optimize", "profile");
   Mode : Mode_Type := external ("MODE", "debug");

   package Builder is
       case Mode is
          when "debug" => 
             for Default_Switches ("Ada") use ("-g");
             --  for Default_Switches ("Ada") use ("-g", "-gnatVa");
--  , "-fstack-check");
--             for Global_Configuration_Pragmas use "gnat.adc";
          when "optimize" =>
             for Global_Configuration_Pragmas use "gnat_optimize.adc";
          when others =>
             for Default_Switches ("Ada") use ("-g");
       end case;
   end Builder;

   package compiler is
      warnings := ("-gnatwua", "-gnaty", "-gnatQ", "-gnatg");

      case Mode is
         when "distrib" =>
            for Default_Switches ("Ada") use ("-O2", "-gnatn");

         when "debug" =>
            for Default_Switches ("Ada") use warnings
               & ("-g", "-gnata");
               --  & ("-g", "-gnata", "-gnatVaMI");

         when "optimize" =>
            for Default_Switches ("Ada") use warnings
               & ("-O2", "-gnatn", "-gnatp");

         when "profile" =>
            for Default_Switches ("Ada") use warnings & ("-g", "-pg");
      end case;
   end compiler;

   package binder is
      case Mode is
         when "debug" =>
            for Default_Switches ("Ada") use ("-E");
         when "distrib" | "optimize" | "profile" =>
      end case;
   end binder;

   package linker is
      case Mode is
         when "profile" =>
            for Default_Switches ("Ada") use ("-pg");

         when "debug" =>
--           for Default_Switches ("Ada") use ("-lgmem");

         when "distrib" =>
            for Default_Switches ("Ada") use ("-s");

         when "optimize" =>
      end case;
   end linker;        

   package Ide is
      for VCS_Kind use "cvs";
   end Ide;
 
end Shared;
