diff --git a/sw/tools/gen_aircraft.ml b/sw/tools/gen_aircraft.ml index 5c8df15422..c899f5aa2e 100644 --- a/sw/tools/gen_aircraft.ml +++ b/sw/tools/gen_aircraft.ml @@ -133,8 +133,12 @@ let dump_module_section = fun xml f -> fprintf f "\n# include modules directory for all targets\n"; (* get dir and target list *) let dir_list = get_modules_dir modules in +(** let target_list = union_of_lists (List.map (fun (m,_) -> get_targets_of_module m) modules) in List.iter (fun target -> fprintf f "%s.CFLAGS += -I modules -I arch/$(ARCH)/modules\n" target) target_list; +**) + (** include modules directory for ALL targets and not just the defined ones **) + fprintf f "$(TARGET).CFLAGS += -I modules -I arch/$(ARCH)/modules\n"; List.iter (fun dir -> let dir_name = (String.uppercase dir)^"_DIR" in fprintf f "%s = modules/%s\n" dir_name dir) dir_list; (* parse each module *) List.iter (fun (m, flags) ->