update makefile

This commit is contained in:
hathach 2018-08-11 11:25:13 +07:00
parent b47927f95c
commit b1f3772364

View File

@ -352,23 +352,21 @@ endif
# default target to build # default target to build
all: $(BUILD)/$(OUTPUT_FILENAME).out size all: $(BUILD)/$(OUTPUT_FILENAME).out size
# TODO auto rule using BOARD_LIST # Rule using BOARD_LIST, nl is newline
_make_board = $(MAKE) -s -f $(MAKEFILE_LIST) -e BOARD=$1 $2 define nl
_make_all_board = $(call _make_board,pca10056,clean all)
endef
_make_board = $(MAKE) -s -f $(MAKEFILE_LIST) -e BOARD=$1 $2 $(nl)
_make_all_board = $(foreach b,$(BOARD_LIST), $(call _make_board,$b,$1))
# build all the boards # build all the boards
all-board: all-board:
$(_make_all_board) $(call _make_all_board,clean all)
# $(MAKE) -s -f $(MAKEFILE_LIST) -e BOARD=feather52832 clean all
# $(MAKE) -s -f $(MAKEFILE_LIST) -e BOARD=feather52840 clean all
# $(MAKE) -s -f $(MAKEFILE_LIST) -e BOARD=pca10056 clean all
all-release: all-release:
$(MAKE) -s -f $(MAKEFILE_LIST) -e BOARD=feather52832 clean all release $(call _make_all_board,clean all release)
$(MAKE) -s -f $(MAKEFILE_LIST) -e BOARD=feather52840 clean all release
$(MAKE) -s -f $(MAKEFILE_LIST) -e BOARD=pca10056 clean all release
#******************* Flash target ******************* #******************* Flash target *******************