Merge pull request #20 from berdan/better_makefile
Update Makefile to conditionally require BOARD and DISPLAY only for non-clean targets
This commit is contained in:
commit
3ade4f766b
4
Makefile
4
Makefile
@ -25,6 +25,8 @@ define n
|
|||||||
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
# Only require BOARD and DISPLAY for non-clean targets
|
||||||
|
ifeq (,$(filter clean,$(MAKECMDGOALS)))
|
||||||
ifndef BOARD
|
ifndef BOARD
|
||||||
$(error Build failed: BOARD not defined. Use one of the four options below, depending on your hardware:$n$n make BOARD=sensorwatch_red DISPLAY=display_type$n make BOARD=sensorwatch_blue DISPLAY=display_type$n make BOARD=sensorwatch_pro DISPLAY=display_type$n$n)
|
$(error Build failed: BOARD not defined. Use one of the four options below, depending on your hardware:$n$n make BOARD=sensorwatch_red DISPLAY=display_type$n make BOARD=sensorwatch_blue DISPLAY=display_type$n make BOARD=sensorwatch_pro DISPLAY=display_type$n$n)
|
||||||
endif
|
endif
|
||||||
@ -42,6 +44,7 @@ else
|
|||||||
$(error Build failed: invalid DISPLAY type. Use one of the options below, depending on your hardware:$n$n make BOARD=board_type DISPLAY=classic$n make BOARD=board_type DISPLAY=custom$n$n)
|
$(error Build failed: invalid DISPLAY type. Use one of the options below, depending on your hardware:$n$n make BOARD=board_type DISPLAY=classic$n make BOARD=board_type DISPLAY=custom$n$n)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
ifdef NOSLEEP
|
ifdef NOSLEEP
|
||||||
DEFINES += -DMOVEMENT_LOW_ENERGY_MODE_FORBIDDEN
|
DEFINES += -DMOVEMENT_LOW_ENERGY_MODE_FORBIDDEN
|
||||||
@ -52,6 +55,7 @@ endif
|
|||||||
# Add your include directories here.
|
# Add your include directories here.
|
||||||
INCLUDES += \
|
INCLUDES += \
|
||||||
-I./ \
|
-I./ \
|
||||||
|
-I. \
|
||||||
-I./tinyusb/src \
|
-I./tinyusb/src \
|
||||||
-I./littlefs \
|
-I./littlefs \
|
||||||
-I./utz \
|
-I./utz \
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user