force a choice of display type at build time
This commit is contained in:
parent
63dbaad730
commit
f9c30d1edd
20
Makefile
20
Makefile
@ -8,9 +8,8 @@ GOSSAMER_PATH=gossamer
|
|||||||
# - sensorwatch_red (also known as Sensor Watch Lite)
|
# - sensorwatch_red (also known as Sensor Watch Lite)
|
||||||
# BOARD=sensorwatch_pro
|
# BOARD=sensorwatch_pro
|
||||||
|
|
||||||
# Sensor Watch will detect the display, unless you are debugging over USB.
|
# Set this to the type of display in your watch: classic or custom. Commented out to force a choice when building.
|
||||||
# If you need to force a specific display, set this to the type you want, CLASSIC or CUSTOM
|
# DISPLAY=classic
|
||||||
FORCE_DISPLAY_TYPE=CLASSIC
|
|
||||||
|
|
||||||
# End of user configurable options.
|
# End of user configurable options.
|
||||||
|
|
||||||
@ -26,15 +25,20 @@ define n
|
|||||||
endef
|
endef
|
||||||
|
|
||||||
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$n make BOARD=sensorwatch_green$n make BOARD=sensorwatch_blue$n make BOARD=sensorwatch_pro$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
|
||||||
|
|
||||||
ifdef FORCE_DISPLAY_TYPE
|
ifndef DISPLAY
|
||||||
ifeq ($(FORCE_DISPLAY_TYPE), CUSTOM)
|
$(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), custom)
|
||||||
DEFINES += -DFORCE_CUSTOM_LCD_TYPE
|
DEFINES += -DFORCE_CUSTOM_LCD_TYPE
|
||||||
endif
|
else ifeq ($(DISPLAY), classic)
|
||||||
ifeq ($(FORCE_DISPLAY_TYPE), CLASSIC)
|
|
||||||
DEFINES += -DFORCE_CLASSIC_LCD_TYPE
|
DEFINES += -DFORCE_CLASSIC_LCD_TYPE
|
||||||
|
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
|
||||||
|
|
||||||
|
|||||||
2
gossamer
2
gossamer
@ -1 +1 @@
|
|||||||
Subproject commit 2d79f337c7a6d928830ded91f5d998582f8ea58a
|
Subproject commit 422b34606669523ab7fa44499f6f58f6cb5b49e9
|
||||||
Loading…
x
Reference in New Issue
Block a user