A nightstand noise generator based on M5Stack Atom Echo and integrating with Home Assistant
1# Top-level entry point for the sound-machine project.
2#
3# Right now this delegates to firmware/. As 3D-printable parts (OpenSCAD)
4# and other artifacts get added, give them sibling targets here so a bare
5# `make` rebuilds whatever's stale across the repo.
6
7MAKEFLAGS += --no-print-directory
8
9.PHONY: all firmware firmware-check firmware-flash firmware-flash-monitor firmware-monitor firmware-ota-publish firmware-clean enclosure enclosure-preview enclosure-clean clean help
10
11all: firmware
12
13firmware:
14 $(MAKE) -C firmware build
15
16firmware-check:
17 $(MAKE) -C firmware check
18
19firmware-flash:
20 $(MAKE) -C firmware flash
21
22firmware-flash-monitor:
23 $(MAKE) -C firmware flash-monitor
24
25firmware-monitor:
26 $(MAKE) -C firmware monitor
27
28firmware-ota-publish:
29 $(MAKE) -C firmware ota-publish
30
31firmware-clean:
32 $(MAKE) -C firmware clean
33
34enclosure:
35 $(MAKE) -C enclosure all
36
37enclosure-preview:
38 $(MAKE) -C enclosure preview
39
40enclosure-clean:
41 $(MAKE) -C enclosure clean
42
43clean: firmware-clean enclosure-clean
44
45help:
46 @echo "sound-machine targets:"
47 @echo " all (default) build firmware"
48 @echo " firmware cargo build --release in firmware/"
49 @echo " firmware-check cargo check"
50 @echo " firmware-flash headless: build + flash, no monitor"
51 @echo " firmware-flash-monitor interactive: build + flash + serial monitor (needs TTY)"
52 @echo " firmware-monitor serial monitor only"
53 @echo " firmware-ota-publish save .bin to OTA_LOCAL_DIR + publish latest_version"
54 @echo " firmware-clean cargo clean"
55 @echo " enclosure render printable STLs from OpenSCAD into enclosure/build/"
56 @echo " enclosure-preview open the enclosure assembly view in OpenSCAD"
57 @echo " enclosure-clean remove enclosure/build/"
58 @echo " clean clean everything"