10000 stmhal: Default build directory now includes board name. · hellcoderz/micropython@5131561 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5131561

Browse files
committed
stmhal: Default build directory now includes board name.
BUILD is build-$(BOARD) by default.
1 parent ae8feac commit 5131561

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

stmhal/Makefile

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
# Select the board to build for: if not given on the command line,
2+
# then default to PYBV10.
3+
BOARD ?= PYBV10
4+
ifeq ($(wildcard boards/$(BOARD)/.),)
5+
$(error Invalid BOARD specified)
6+
endif
7+
8+
# If the build directory is not given, make it reflect the board name.
9+
BUILD ?= build-$(BOARD)
10+
111
include ../py/mkenv.mk
212

313
# qstr definitions (must come before including py.mk)
@@ -32,10 +42,6 @@ INC += -I$(CC3K_DIR)
3242
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
3343
CFLAGS = $(INC) -Wall -Werror -ansi -std=gnu99 $(CFLAGS_CORTEX_M4) $(COPT)
3444

35-
BOARD ?= PYBV10
36-
ifeq ($(wildcard boards/$(BOARD)/.),)
37-
$(error Invalid BOARD specified)
38-
endif
3945
CFLAGS += -Iboards/$(BOARD)
4046

4147
#Debugging/Optimization

0 commit comments

Comments
 (0)
0