diff --git a/Makefile b/Makefile index da30e7fd1..cb91bfaf5 100644 --- a/Makefile +++ b/Makefile @@ -270,12 +270,12 @@ pipxtreme_%: uavobjects_flight sim_posix: sim_posix_elf sim_posix_%: uavobjects_flight - mkdir -p $(BUILD_DIR)/simulation - $(MAKE) OUTDIR="$(BUILD_DIR)/simulation" -C $(ROOT_DIR)/flight/OpenPilot --file=$(ROOT_DIR)/flight/OpenPilot/Makefile.posix $* + mkdir -p $(BUILD_DIR)/flight/sitl_posix + $(MAKE) -C $(ROOT_DIR)/flight/OpenPilot --file=$(ROOT_DIR)/flight/OpenPilot/Makefile.posix $* .PHONY: sim_win32 sim_win32: sim_win32_exe sim_win32_%: uavobjects_flight - mkdir -p $(BUILD_DIR)/simulation - $(MAKE) OUTDIR="$(BUILD_DIR)/simulation" -C $(ROOT_DIR)/flight/OpenPilot --file=$(ROOT_DIR)/flight/OpenPilot/Makefile.win32 $* + mkdir -p $(BUILD_DIR)/flight/sitl_win32 + $(MAKE) -C $(ROOT_DIR)/flight/OpenPilot --file=$(ROOT_DIR)/flight/OpenPilot/Makefile.win32 $* diff --git a/flight/OpenPilot/Makefile.posix b/flight/OpenPilot/Makefile.posix index 8c21cd895..397853ac7 100644 --- a/flight/OpenPilot/Makefile.posix +++ b/flight/OpenPilot/Makefile.posix @@ -77,7 +77,7 @@ BOOT_MODEL = $(MODEL)_NB endif # Directory for output files (lst, obj, dep, elf, sym, map, hex, bin etc.) -OUTDIR = Build.posix +OUTDIR = ../../build/flight/sitl_posix # Target file name (without extension). TARGET = OpenPilot diff --git a/flight/OpenPilot/Makefile.win32 b/flight/OpenPilot/Makefile.win32 index c018bd92f..101be1bba 100644 --- a/flight/OpenPilot/Makefile.win32 +++ b/flight/OpenPilot/Makefile.win32 @@ -76,7 +76,7 @@ MODEL = HD_NB endif # Directory for output files (lst, obj, dep, elf, sym, map, hex, bin etc.) -OUTDIR = Build.win32 +OUTDIR = ../../build/flight/sitl_win32 # Target file name (without extension). TARGET = OpenPilot @@ -117,6 +117,15 @@ FLIGHTPLANS = $(OPMODULEDIR)/FlightPlan/flightplans MODNAMES = $(notdir ${MODULES}) ifndef TESTAPP + +## PyMite files +SRC += $(OUTDIR)/pmlib_img.c +SRC += $(OUTDIR)/pmlib_nat.c +SRC += $(OUTDIR)/pmlibusr_img.c +SRC += $(OUTDIR)/pmlibusr_nat.c +SRC += $(wildcard ${PYMITEVM}/*.c) +SRC += $(wildcard ${PYMITEPLAT}/*.c) + ## MODULES SRC += ${foreach MOD, ${MODULES}, ${wildcard ${OPMODULEDIR}/${MOD}/*.c}} SRC += ${OUTDIR}/InitMods.c @@ -203,15 +212,6 @@ SRC += $(RTOSSRCDIR)/tasks.c SRC += $(RTOSSRCDIR)/portable/GCC/Win32/port.c SRC += $(RTOSSRCDIR)/portable/MemMang/heap_3.c -## PyMite files -SRC += $(wildcard ${PYMITEVM}/*.c) -SRC += $(wildcard ${PYMITEPLAT}/*.c) -SRC += $(OUTDIR)/pmlib_img.c -SRC += $(OUTDIR)/pmlib_nat.c -SRC += $(OUTDIR)/pmlibusr_img.c -SRC += $(OUTDIR)/pmlibusr_nat.c - - # List C source files here which must be compiled in ARM-Mode (no -mthumb). # use file-extension c for "c-only"-files