abstract project RxAda_Common is

   type Build_Type is ("debug", "release");
   Build : Build_Type := external ("build", "debug");

   package Ide is
      for Vcs_Kind use "git";
      for Documentation_Dir use "doc/";
   end Ide;

   package Builder is
      case Build is
         when "debug" =>
            for Default_Switches ("ada") use ("-j0", "-s", "-g");
         when "release" =>
            for Default_Switches ("ada") use ("-j0", "-s");
      end case;
   end Builder;

   package Compiler is
      case Build is
         when "debug" =>
            for Default_Switches ("ada") use ("-gnatwal.f",
                                              "-gnatVd", -- use Va for even more checks

                                              "-g", "-Og",
                                              "-gnato", "-fstack-check", "-gnata",
                                              "-gnatf", "-gnat12",

                                              "-gnatyO");
         when "release" =>
            for Default_Switches ("ada") use ("-O3", "-gnatn", "-gnat12");
      end case;
   end Compiler;

   package Binder is
      case Build is
         when "debug" =>
            for Default_Switches ("ada") use ("-E", "-Es");
         when "release" =>
            null;
      end case;
   end Binder;

   package Gnattest is
      for Tests_Dir use "../aunit";
      for Stubs_Default use "pass";
   end Gnattest;

end RxAda_Common;
