tweak Makefile checks, no need for BOARD or DISPLAY to make install

This commit is contained in:
Joey Castillo 2025-07-04 10:59:33 -04:00
parent 8eaa9262ad
commit f64f1f4b2f

View File

@ -27,23 +27,27 @@ endef
# Only require BOARD and DISPLAY for non-clean targets # Only require BOARD and DISPLAY for non-clean targets
ifeq (,$(filter clean,$(MAKECMDGOALS))) ifeq (,$(filter clean,$(MAKECMDGOALS)))
ifndef BOARD ifeq (,$(filter install,$(MAKECMDGOALS)))
$(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) ifndef BOARD
endif $(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
ifndef DISPLAY endif
$(error Build failed: DISPLAY not defined. 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)
else ifeq (,$(filter install,$(MAKECMDGOALS)))
ifeq ($(DISPLAY), custom) ifndef DISPLAY
DEFINES += -DFORCE_CUSTOM_LCD_TYPE $(error Build failed: DISPLAY not defined. 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)
else ifeq ($(DISPLAY), classic) else
DEFINES += -DFORCE_CLASSIC_LCD_TYPE ifeq ($(DISPLAY), custom)
else ifeq ($(DISPLAY), autodetect) DEFINES += -DFORCE_CUSTOM_LCD_TYPE
$(warning WARNING: LCD autodetection is experimental and not reliable! We suggest specifying DISPLAY=classic or DISPLAY=custom for reliable operation.) else ifeq ($(DISPLAY), classic)
else DEFINES += -DFORCE_CLASSIC_LCD_TYPE
$(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) else ifeq ($(DISPLAY), autodetect)
$(warning WARNING: LCD autodetection is experimental and not reliable! We suggest specifying DISPLAY=classic or DISPLAY=custom for reliable operation.)
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)
endif
endif
endif endif
endif
endif endif
ifdef NOSLEEP ifdef NOSLEEP