project Add_Var2 is

   for Source_Dirs use (".");
   type A_B_Type is
      ("A1", "A2", "A3");
   A_B : A_B_Type := external ("A B");
   type C_Type is
      ("C1", "C2", "C3");
   C : C_Type := external ("C");

   case C is

      when "C3" =>
         for Object_Dir use ".";

      when "C2" =>
         for Object_Dir use ".";

      when "C1" =>

         case A_B is

            when "A3" =>
               for Object_Dir use ".";

            when "A2" =>
               for Object_Dir use ".";

            when "A1" =>
               for Object_Dir use "new_obj_dir";
         end case;
   end case;

end Add_Var2;

