summaryrefslogtreecommitdiff
path: root/examples/make.mk
diff options
context:
space:
mode:
authorhathach <[email protected]>2021-01-25 23:40:52 +0700
committerhathach <[email protected]>2021-01-25 23:40:52 +0700
commit0e585570a38d4bd04bc907386ef7012f6e9222a9 (patch)
tree4f9038d56ba849e4b948c1eeb85ebb7ee866f2d9 /examples/make.mk
parent045674745afa59028fbeed6dac5cb5a9c4a6033e (diff)
rename build output
Diffstat (limited to 'examples/make.mk')
-rw-r--r--examples/make.mk10
1 files changed, 9 insertions, 1 deletions
diff --git a/examples/make.mk b/examples/make.mk
index da0f60d2f..556b0c41a 100644
--- a/examples/make.mk
+++ b/examples/make.mk
@@ -3,7 +3,7 @@
# ---------------------------------------
# Build directory
-BUILD = _build/build-$(BOARD)
+BUILD = _build/$(BOARD)
# Handy check parameter function
check_defined = \
@@ -13,6 +13,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 +51,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-