diff options
author | Damien George <damien.p.george@gmail.com> | 2014-05-03 17:39:07 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-05-03 17:39:07 +0100 |
commit | 51315614e1998b837079a1b256d0ca38220d619d (patch) | |
tree | c12d644f7029367e86d19e0f20894b80da1684fd | |
parent | ae8feac598980d965c3eca9ab4f2903e51f955a5 (diff) | |
download | micropython-51315614e1998b837079a1b256d0ca38220d619d.tar.gz micropython-51315614e1998b837079a1b256d0ca38220d619d.zip |
stmhal: Default build directory now includes board name.
BUILD is build-$(BOARD) by default.
-rw-r--r-- | stmhal/Makefile | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/stmhal/Makefile b/stmhal/Makefile index 09c03d71e4..26f15cfcd3 100644 --- a/stmhal/Makefile +++ b/stmhal/Makefile @@ -1,3 +1,13 @@ +# Select the board to build for: if not given on the command line, +# then default to PYBV10. +BOARD ?= PYBV10 +ifeq ($(wildcard boards/$(BOARD)/.),) +$(error Invalid BOARD specified) +endif + +# If the build directory is not given, make it reflect the board name. +BUILD ?= build-$(BOARD) + include ../py/mkenv.mk # qstr definitions (must come before including py.mk) @@ -32,10 +42,6 @@ INC += -I$(CC3K_DIR) CFLAGS_CORTEX_M4 = -mthumb -mtune=cortex-m4 -mabi=aapcs-linux -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -fsingle-precision-constant -Wdouble-promotion CFLAGS = $(INC) -Wall -Werror -ansi -std=gnu99 $(CFLAGS_CORTEX_M4) $(COPT) -BOARD ?= PYBV10 -ifeq ($(wildcard boards/$(BOARD)/.),) -$(error Invalid BOARD specified) -endif CFLAGS += -Iboards/$(BOARD) #Debugging/Optimization |