2013-02-21 00:43:25 -04:00
|
|
|
default: all
|
|
|
|
|
|
|
|
# convenient targets for our supported boards
|
|
|
|
sitl: HAL_BOARD = HAL_BOARD_AVR_SITL
|
|
|
|
sitl: TOOLCHAIN = NATIVE
|
|
|
|
sitl: all
|
|
|
|
|
|
|
|
apm1: HAL_BOARD = HAL_BOARD_APM1
|
|
|
|
apm1: TOOLCHAIN = AVR
|
|
|
|
apm1: all
|
|
|
|
|
2013-03-11 22:45:49 -03:00
|
|
|
apm1-1280: HAL_BOARD = HAL_BOARD_APM1
|
|
|
|
apm1-1280: TOOLCHAIN = AVR
|
|
|
|
apm1-1280: all
|
|
|
|
|
2013-02-21 00:43:25 -04:00
|
|
|
apm2: HAL_BOARD = HAL_BOARD_APM2
|
|
|
|
apm2: TOOLCHAIN = AVR
|
|
|
|
apm2: all
|
|
|
|
|
2013-09-23 00:01:42 -03:00
|
|
|
flymaple: HAL_BOARD = HAL_BOARD_FLYMAPLE
|
|
|
|
flymaple: TOOLCHAIN = ARM
|
|
|
|
flymaple: all
|
2013-12-01 20:17:29 -04:00
|
|
|
flymaple-hil: EXTRAFLAGS += "-DHIL_MODE=HIL_MODE_ATTITUDE "
|
|
|
|
flymaple-hil: flymaple
|
2013-09-23 00:01:42 -03:00
|
|
|
|
2013-09-22 03:04:08 -03:00
|
|
|
linux: HAL_BOARD = HAL_BOARD_LINUX
|
|
|
|
linux: TOOLCHAIN = NATIVE
|
|
|
|
linux: all
|
|
|
|
|
2014-07-06 23:04:54 -03:00
|
|
|
erle: HAL_BOARD = HAL_BOARD_LINUX
|
|
|
|
erle: TOOLCHAIN = BBONE
|
2014-07-13 19:52:43 -03:00
|
|
|
erle: all
|
|
|
|
|
2014-11-13 19:18:14 -04:00
|
|
|
zynq: HAL_BOARD = HAL_BOARD_LINUX
|
|
|
|
zynq: TOOLCHAIN = ZYNQ
|
|
|
|
zynq: all
|
|
|
|
zynq-hil: EXTRAFLAGS += "-DHILMODE=HIL_MODE_ATTITUDE -DHIL_MODE=HIL_MODE_SENSORS "
|
|
|
|
zynq-hil : zynq
|
|
|
|
|
2014-07-06 23:04:54 -03:00
|
|
|
pxf: HAL_BOARD = HAL_BOARD_LINUX
|
|
|
|
pxf: TOOLCHAIN = BBONE
|
|
|
|
pxf: all
|
2014-07-06 20:37:27 -03:00
|
|
|
|
2014-07-23 07:13:55 -03:00
|
|
|
navio: HAL_BOARD = HAL_BOARD_LINUX
|
|
|
|
navio: TOOLCHAIN = RPI
|
|
|
|
navio: all
|
|
|
|
|
2015-01-10 19:21:52 -04:00
|
|
|
bbbmini: HAL_BOARD = HAL_BOARD_LINUX
|
|
|
|
bbbmini: TOOLCHAIN = BBONE
|
|
|
|
bbbmini: all
|
|
|
|
|
2013-02-21 00:43:25 -04:00
|
|
|
empty: HAL_BOARD = HAL_BOARD_EMPTY
|
|
|
|
empty: TOOLCHAIN = AVR
|
|
|
|
empty: all
|
|
|
|
|
2013-11-12 18:06:20 -04:00
|
|
|
# cope with HIL targets
|
2014-01-02 01:29:36 -04:00
|
|
|
%-hil: EXTRAFLAGS += "-DHIL_MODE=HIL_MODE_SENSORS "
|
2013-11-12 18:06:20 -04:00
|
|
|
%-hilsensors: EXTRAFLAGS += "-DHIL_MODE=HIL_MODE_SENSORS "
|
|
|
|
|
2014-04-06 18:28:50 -03:00
|
|
|
# cope with OBC targets
|
|
|
|
%-obc: EXTRAFLAGS += "-DOBC_FAILSAFE=ENABLED "
|
|
|
|
|
2015-01-16 17:45:02 -04:00
|
|
|
# cope with -nologging
|
|
|
|
%-nologging: EXTRAFLAGS += "-DLOGGING_ENABLED=DISABLED "
|
|
|
|
|
2013-11-12 18:06:20 -04:00
|
|
|
# cope with copter and hil targets
|
2015-01-16 17:45:02 -04:00
|
|
|
FRAMES = quad tri hexa y6 octa octa-quad heli single obc nologging
|
2015-01-10 19:21:52 -04:00
|
|
|
BOARDS = apm1 apm2 apm2beta apm1-1280 px4 px4-v1 px4-v2 sitl flymaple linux vrbrain vrbrain-v40 vrbrain-v45 vrbrainv-50 vrbrain-v51 vrubrain-v51 vrhero-v10 erle pxf navio bbbmini
|
2013-11-12 18:06:20 -04:00
|
|
|
|
|
|
|
define frame_template
|
|
|
|
$(1)-$(2) : EXTRAFLAGS += "-DFRAME_CONFIG=$(shell echo $(2) | tr a-z A-Z | sed s/-/_/g)_FRAME "
|
|
|
|
$(1)-$(2) : $(1)
|
|
|
|
$(1)-$(2)-hil : $(1)-$(2)
|
|
|
|
$(1)-$(2)-hilsensors : $(1)-$(2)
|
2014-07-31 17:54:03 -03:00
|
|
|
$(1)-$(2)-upload : $(1)-$(2)
|
|
|
|
$(1)-$(2)-upload : $(1)-upload
|
2013-11-12 18:06:20 -04:00
|
|
|
$(1)-hil : $(1)
|
|
|
|
$(1)-hilsensors : $(1)
|
|
|
|
endef
|
|
|
|
|
|
|
|
# generate targets of the form BOARD-FRAME and BOARD-FRAME-HIL
|
|
|
|
$(foreach board,$(BOARDS),$(foreach frame,$(FRAMES),$(eval $(call frame_template,$(board),$(frame)))))
|
2012-12-18 17:53:44 -04:00
|
|
|
|
|
|
|
apm2beta: EXTRAFLAGS += "-DAPM2_BETA_HARDWARE "
|
|
|
|
apm2beta: apm2
|
|
|
|
|
2012-12-18 20:33:23 -04:00
|
|
|
sitl-mount: EXTRAFLAGS += "-DMOUNT=ENABLED"
|
|
|
|
sitl-mount: sitl
|
|
|
|
|
2013-01-09 15:27:59 -04:00
|
|
|
.PHONY: etags
|
2012-12-18 17:53:44 -04:00
|
|
|
etags:
|
2013-02-10 22:52:37 -04:00
|
|
|
cd .. && etags -f ArduCopter/TAGS --lang=c++ $$(git ls-files ArduCopter libraries)
|
|
|
|
cd .. && etags -f ArduPlane/TAGS --lang=c++ $$(git ls-files ArduPlane libraries)
|
|
|
|
cd .. && etags -f APMrover2/TAGS --lang=c++ $$(git ls-files APMrover2 libraries)
|
2013-02-21 00:43:25 -04:00
|
|
|
|
|
|
|
clean:
|
|
|
|
@rm -fr $(BUILDROOT)
|