diff options
| author | Ha Thach <[email protected]> | 2021-01-26 23:11:52 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-01-26 23:11:52 +0700 |
| commit | 40870f9037126b2ec63993963c2b1373974ed92c (patch) | |
| tree | 400e5ae1e6ff0f07bef2f6a4421776f6e07cb3d7 /examples/make.mk | |
| parent | 045674745afa59028fbeed6dac5cb5a9c4a6033e (diff) | |
| parent | f1867b3d2caeafccc5fc70b98601979a5fa75de9 (diff) | |
Merge pull request #606 from hathach/upload-binary-artifacts
Upload binary artifacts
Diffstat (limited to 'examples/make.mk')
| -rw-r--r-- | examples/make.mk | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/examples/make.mk b/examples/make.mk index da0f60d2f..e820989b7 100644 --- a/examples/make.mk +++ b/examples/make.mk @@ -3,7 +3,10 @@ # --------------------------------------- # Build directory -BUILD = _build/build-$(BOARD) +BUILD := _build/$(BOARD) + +PROJECT := $(BOARD)-$(notdir $(CURDIR)) +BIN := $(TOP)/_bin/$(BOARD)/$(notdir $(CURDIR)) # Handy check parameter function check_defined = \ @@ -13,6 +16,12 @@ __check_defined = \ $(if $(value $1),, \ $(error Undefined make flag: $1$(if $2, ($2)))) +# TODO Check if submodule haven't checkout yet +fetch_submodule_if_empty = \ + ifeq ($(wildcard $(TOP)/$1/*),) \ + $(info $(shell git -C $(TOP) submodule update --init)) \ + endif + #-------------- Select the board to build for. ------------ #BOARD_LIST = $(sort $(subst /.,,$(subst $(TOP)/hw/bsp/,,$(wildcard $(TOP)/hw/bsp/*/.)))) #ifeq ($(filter $(BOARD),$(BOARD_LIST)),) @@ -45,6 +54,8 @@ else SRC_C += $(subst $(TOP)/,,$(wildcard $(TOP)/$(FAMILY_PATH)/*.c)) endif +#TODO $(call fetch_submodule_if_empty,lib/sct_neopixel) + #-------------- Cross Compiler ------------ # Can be set by board, default to ARM GCC CROSS_COMPILE ?= arm-none-eabi- |
