2024-09-18 08:56:47 -04:00
# Keep this first line.
GOSSAMER_PATH = gossamer
2025-05-15 09:08:06 -04:00
# Which board are we building for? Commented out to force a choice when building.
2025-01-14 13:53:53 +01:00
# Options are:
# - sensorwatch_pro
# - sensorwatch_green
# - sensorwatch_red (also known as Sensor Watch Lite)
2025-06-26 23:10:23 +02:00
# - sensorwatch_blue
2025-05-15 09:08:06 -04:00
# BOARD=sensorwatch_pro
2024-09-18 08:56:47 -04:00
2025-05-17 12:40:29 -04:00
# Set this to the type of display in your watch: classic or custom. Commented out to force a choice when building.
# DISPLAY=classic
2024-09-29 15:47:26 -04:00
2025-05-15 09:08:06 -04:00
# End of user configurable options.
2024-10-09 07:46:28 -04:00
2024-10-06 17:14:46 -04:00
# Support USB features?
2024-09-18 17:14:06 -04:00
TINYUSB_CDC = 1
2025-05-15 09:08:06 -04:00
# Now we're all set to include gossamer's make rules.
2024-09-18 08:56:47 -04:00
i n c l u d e $( GOSSAMER_PATH ) / m a k e . m k
2025-07-22 20:32:38 +10:00
CFLAGS += -D_POSIX_C_SOURCE= 200112L
2025-05-15 09:08:06 -04:00
d e f i n e n
e n d e f
2025-07-04 11:04:13 -04:00
# Don't require BOARD or DISPLAY for `make clean` or `make install`
2025-06-26 20:48:03 +02:00
i f e q ( , $( filter clean ,$ ( MAKECMDGOALS ) ) )
2025-07-04 10:59:33 -04:00
ifeq ( ,$( filter install,$( MAKECMDGOALS) ) )
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 )
endif
endif
2025-05-15 09:08:06 -04:00
2025-07-04 10:59:33 -04:00
ifeq ( ,$( filter install,$( MAKECMDGOALS) ) )
ifndef DISPLAY
$( 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
else ifeq ( $( DISPLAY) , classic)
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
2025-03-12 20:56:46 -04:00
endif
e n d i f
2025-05-29 07:16:50 -04:00
i f d e f N O S L E E P
DEFINES += -DMOVEMENT_LOW_ENERGY_MODE_FORBIDDEN
e n d i f
2025-06-29 11:00:47 +02:00
# Emscripten targets are now handled in rules.mk in gossamer
2024-09-18 09:40:18 -04:00
2024-09-18 13:47:35 -04:00
# Add your include directories here.
INCLUDES += \
2024-09-18 18:22:33 -04:00
-I./ \
2025-06-28 14:29:05 +02:00
-I. \
2024-09-18 17:14:06 -04:00
-I./tinyusb/src \
2024-09-22 15:34:51 -04:00
-I./littlefs \
2024-09-23 23:27:10 -04:00
-I./utz \
2024-09-22 15:34:51 -04:00
-I./filesystem \
-I./shell \
2024-11-27 10:56:50 -05:00
-I./lib/sunriset \
2025-12-16 14:09:52 -03:00
-I./lib/moonrise \
2025-06-29 19:25:42 +02:00
-I./lib/sha1 \
-I./lib/sha256 \
-I./lib/sha512 \
-I./lib/base32 \
-I./lib/TOTP \
2024-11-27 10:56:50 -05:00
-I./lib/chirpy_tx \
-I./lib/base64 \
2024-09-18 13:47:35 -04:00
-I./watch-library/shared/watch \
2024-10-08 20:27:42 -04:00
-I./watch-library/shared/driver \
2024-09-18 18:22:33 -04:00
-I./watch-faces/clock \
2024-09-28 17:43:10 -04:00
-I./watch-faces/complication \
2024-09-30 00:24:23 -04:00
-I./watch-faces/demo \
-I./watch-faces/sensor \
2024-09-18 18:22:33 -04:00
-I./watch-faces/settings \
2024-10-22 07:49:41 -04:00
-I./watch-faces/io \
2024-09-18 13:47:35 -04:00
2024-09-18 08:56:47 -04:00
# Add your source files here.
SRCS += \
2025-03-16 08:07:06 -04:00
./dummy.c \
2024-09-22 15:34:51 -04:00
./littlefs/lfs.c \
./littlefs/lfs_util.c \
./filesystem/filesystem.c \
2024-09-23 23:27:10 -04:00
./utz/utz.c \
./utz/zones.c \
2024-09-22 15:34:51 -04:00
./shell/shell.c \
./shell/shell_cmd_list.c \
2024-11-27 10:56:50 -05:00
./lib/sunriset/sunriset.c \
2025-12-16 14:09:52 -03:00
./lib/moonrise/moonrise.c \
2025-06-29 19:25:42 +02:00
./lib/base32/base32.c \
./lib/TOTP/sha1.c \
./lib/TOTP/sha256.c \
./lib/TOTP/sha512.c \
./lib/TOTP/TOTP.c \
2024-11-27 10:56:50 -05:00
./lib/chirpy_tx/chirpy_tx.c \
./lib/base64/base64.c \
2024-10-08 20:27:42 -04:00
./watch-library/shared/driver/thermistor_driver.c \
2024-09-18 17:25:41 -04:00
./watch-library/shared/watch/watch_common_buzzer.c \
./watch-library/shared/watch/watch_common_display.c \
2024-09-18 18:22:33 -04:00
./watch-library/shared/watch/watch_utility.c \
2024-10-06 17:14:46 -04:00
2024-10-12 10:55:10 -04:00
SRCS += ./watch-library/shared/driver/lis2dw.c
2024-10-06 17:14:46 -04:00
i f d e f E M S C R I P T E N
INCLUDES += \
-I./watch-library/simulator/watch \
SRCS += \
./watch-library/simulator/watch/watch.c \
./watch-library/simulator/watch/watch_adc.c \
./watch-library/simulator/watch/watch_deepsleep.c \
./watch-library/simulator/watch/watch_extint.c \
./watch-library/simulator/watch/watch_gpio.c \
2024-10-08 21:04:25 -04:00
./watch-library/simulator/watch/watch_i2c.c \
2024-10-06 17:14:46 -04:00
./watch-library/simulator/watch/watch_private.c \
./watch-library/simulator/watch/watch_rtc.c \
./watch-library/simulator/watch/watch_slcd.c \
2024-10-08 17:59:01 -04:00
./watch-library/simulator/watch/watch_spi.c \
2024-10-06 17:14:46 -04:00
./watch-library/simulator/watch/watch_storage.c \
./watch-library/simulator/watch/watch_tcc.c \
2024-10-08 17:23:08 -04:00
./watch-library/simulator/watch/watch_uart.c \
2024-10-06 17:14:46 -04:00
e l s e
INCLUDES += \
-I./watch-library/hardware/watch \
SRCS += \
2024-09-18 17:14:06 -04:00
./watch-library/hardware/watch/watch.c \
2024-09-18 16:10:12 -04:00
./watch-library/hardware/watch/watch_adc.c \
2024-09-18 17:37:20 -04:00
./watch-library/hardware/watch/watch_deepsleep.c \
2024-09-18 15:29:31 -04:00
./watch-library/hardware/watch/watch_extint.c \
2024-09-18 14:33:07 -04:00
./watch-library/hardware/watch/watch_gpio.c \
2024-10-08 21:04:25 -04:00
./watch-library/hardware/watch/watch_i2c.c \
2024-09-18 17:14:06 -04:00
./watch-library/hardware/watch/watch_private.c \
2024-09-18 15:06:38 -04:00
./watch-library/hardware/watch/watch_rtc.c \
2024-09-18 16:04:55 -04:00
./watch-library/hardware/watch/watch_slcd.c \
2024-10-08 17:59:01 -04:00
./watch-library/hardware/watch/watch_spi.c \
2024-09-18 17:44:14 -04:00
./watch-library/hardware/watch/watch_storage.c \
2024-09-18 14:53:46 -04:00
./watch-library/hardware/watch/watch_tcc.c \
2024-10-08 17:23:08 -04:00
./watch-library/hardware/watch/watch_uart.c \
2024-09-18 17:14:06 -04:00
./watch-library/hardware/watch/watch_usb_descriptors.c \
./watch-library/hardware/watch/watch_usb_cdc.c \
2024-09-18 18:22:33 -04:00
2024-10-06 17:14:46 -04:00
e n d i f
2024-09-18 18:22:33 -04:00
i n c l u d e w a t c h - f a c e s . m k
SRCS += \
./movement.c \
2024-09-18 08:56:47 -04:00
# Finally, leave this line at the bottom of the file.
i n c l u d e $( GOSSAMER_PATH ) / r u l e s . m k