diff options
| -rw-r--r-- | ports/esp32/Makefile | 7 | ||||
| -rw-r--r-- | ports/rp2/Makefile | 8 | ||||
| -rw-r--r-- | ports/stm32/Makefile | 7 |
3 files changed, 19 insertions, 3 deletions
diff --git a/ports/esp32/Makefile b/ports/esp32/Makefile index 239618c6f..9d57ee4c2 100644 --- a/ports/esp32/Makefile +++ b/ports/esp32/Makefile @@ -17,8 +17,13 @@ ifeq ($(wildcard $(BOARD_DIR)/.),) $(error Invalid BOARD specified: $(BOARD_DIR)) endif -# If the build directory is not given, make it reflect the board name. +# If the build directory is not given, make it reflect the board name (and +# optionally the board variant). +ifneq ($(BOARD_VARIANT),) +BUILD ?= build-$(BOARD)-$(BOARD_VARIANT) +else BUILD ?= build-$(BOARD) +endif # Device serial settings. PORT ?= /dev/ttyUSB0 diff --git a/ports/rp2/Makefile b/ports/rp2/Makefile index ccfc1ac7d..fdca11d11 100644 --- a/ports/rp2/Makefile +++ b/ports/rp2/Makefile @@ -16,8 +16,14 @@ endif ifeq ($(wildcard $(BOARD_DIR)/.),) $(error Invalid BOARD specified: $(BOARD_DIR)) endif - + +# If the build directory is not given, make it reflect the board name (and +# optionally the board variant). +ifneq ($(BOARD_VARIANT),) +BUILD ?= build-$(BOARD)-$(BOARD_VARIANT) +else BUILD ?= build-$(BOARD) +endif $(VERBOSE)MAKESILENT = -s diff --git a/ports/stm32/Makefile b/ports/stm32/Makefile index 705139897..475d8f100 100644 --- a/ports/stm32/Makefile +++ b/ports/stm32/Makefile @@ -13,8 +13,13 @@ ifeq ($(wildcard $(BOARD_DIR)/.),) $(error Invalid BOARD specified: $(BOARD_DIR)) endif -# If the build directory is not given, make it reflect the board name. +# If the build directory is not given, make it reflect the board name (and +# optionally the board variant). +ifneq ($(BOARD_VARIANT),) +BUILD ?= build-$(BOARD)-$(BOARD_VARIANT) +else BUILD ?= build-$(BOARD) +endif include ../../py/mkenv.mk -include mpconfigport.mk |
