diff --git a/conf/airframes/microjet_example.xml b/conf/airframes/microjet_example.xml index 0744357615..cddee43f50 100644 --- a/conf/airframes/microjet_example.xml +++ b/conf/airframes/microjet_example.xml @@ -1,4 +1,4 @@ - + + BOARD_CFG = \"tiny_1_1.h\" diff --git a/conf/autopilot/fixed_wings.makefile b/conf/autopilot/fixed_wings.makefile new file mode 100644 index 0000000000..c7f0af065a --- /dev/null +++ b/conf/autopilot/fixed_wings.makefile @@ -0,0 +1,4 @@ +# +# fixed_wings.makefile +# +# diff --git a/conf/boards/tiny_2.11.makefile b/conf/boards/tiny_2.11.makefile new file mode 100644 index 0000000000..888152483a --- /dev/null +++ b/conf/boards/tiny_2.11.makefile @@ -0,0 +1,3 @@ +# +# tiny_2.11.makefile +# \ No newline at end of file diff --git a/sw/tools/gen_aircraft.ml b/sw/tools/gen_aircraft.ml index cb8447ca97..407e85188a 100644 --- a/sw/tools/gen_aircraft.ml +++ b/sw/tools/gen_aircraft.ml @@ -94,6 +94,23 @@ let extract_makefile = fun airframe_file makefile_ac -> end) (Xml.children xml); + (** Search and dump target sections *) + List.iter (fun x -> + if ExtXml.tag_is x "target" then begin + begin try + fprintf f "\n# makefile target '%s' board '%s'\n\n" (Xml.attrib x "name") (Xml.attrib x "board"); + fprintf f "include $(PAPARAZZI_SRC)/conf/autopilot/%s.makefile\n" (Xml.attrib x "name"); + fprintf f "include $(PAPARAZZI_SRC)/conf/boards/%s.makefile\n" (Xml.attrib x "board"); + with _ -> () end; + (** + match Xml.children x with + [Xml.PCData s] -> fprintf f "%s\n" s + | _ -> failwith (sprintf "Warning: wrong makefile section in '%s': %s\n" airframe_file (Xml.to_string_fmt x)) + **) + + end) + (Xml.children xml); + (** Look for modules *) let files = ref [] in List.iter (fun x ->