with "bfdada_config";

library project Bfdada is
   Version := "@BFDADA_VERSION@";
   Library_Dir := "lib";
   Library_Type : Bfdada_Config.Library_Type_Type := external ("BFDADA_LIBRARY_TYPE", "@DEFAULT_LIBRARY_TYPE@");

   for Languages use ("Ada", "C");

   for Source_Dirs use ("src");

   for Library_Name use "bfdada";
   for Library_Kind use Library_Type;
   for Library_Version use "lib" & Project'Library_Name & ".so." & Version;

   for Library_Dir use "lib/bfdada" & Project'Library_Kind;
   for Object_Dir use "obj/bfdada/" & Project'Library_Kind;

   case Library_Type is
      when "relocatable" =>
        for Library_Options use ("-lbfd", "-lopcodes");

      when others =>
        null;
   end case;

   package Builder  renames Bfdada_Config.Builder;
   package Compiler renames Bfdada_Config.Compiler;
   package Ide      renames Bfdada_Config.Ide;
   package Binder is
       for Default_Switches ("Ada") use Bfdada_Config.Binder'Default_Switches ("Ada") & ("-a");
   end Binder;

end Bfdada;
