7925eace57
esp32-lcd named the substrate rather than the thing, and both halves would age: the chip is swappable and the panel technology is incidental. What the project actually is is a Lua app platform that happens to run on a cheap touchscreen, so the name is now a model number rather than a parts list. slate32 is also unclaimed, where slate alone collides with several well known projects. Board identifiers stay as they were -- the e32r40t QEMU machine, the esp32-32e build env and the test skill name all refer to real hardware, which did not get renamed.
46 lines
1.3 KiB
Makefile
46 lines
1.3 KiB
Makefile
# Run inside `nix develop`, which provides pio, lua and a compiler.
|
|
# LUA is pinned to 5.4 to match the interpreter vendored into the firmware.
|
|
|
|
LUA ?= lua
|
|
CXX ?= c++
|
|
CXXFLAGS ?= -std=c++11 -Wall -Wextra
|
|
BUILD_DIR := .pio/build/esp32-32e
|
|
LUA_TESTS := test/ui_layout.lua test/ui_theme.lua test/settings_calibration.lua
|
|
|
|
.PHONY: test test-lua test-cpp test-stubs stubs build upload monitor clean
|
|
|
|
test: test-cpp test-lua test-stubs
|
|
|
|
# The stub is only useful if it matches the bindings, and nothing but a check keeps it
|
|
# honest -- an editor completing a function the firmware no longer has is worse than no
|
|
# completion at all.
|
|
test-stubs:
|
|
@printf '%-32s ' stubs/slate32.lua; python3 scripts/gen_lua_stubs.py --check && echo ok
|
|
|
|
stubs:
|
|
@python3 scripts/gen_lua_stubs.py
|
|
|
|
test-lua:
|
|
@$(LUA) -e 'assert(_VERSION == "Lua 5.4", "tests need Lua 5.4 to match the firmware, got " .. _VERSION)'
|
|
@for t in $(LUA_TESTS); do printf '%-32s ' "$$t"; $(LUA) "$$t" || exit 1; done
|
|
|
|
test-cpp: $(BUILD_DIR)/round_rect_test
|
|
@printf '%-32s ' test/round_rect_test.cpp; $(BUILD_DIR)/round_rect_test
|
|
|
|
$(BUILD_DIR)/round_rect_test: test/round_rect_test.cpp src/gfx/round_rect.h
|
|
@mkdir -p $(@D)
|
|
@$(CXX) $(CXXFLAGS) $< -o $@
|
|
|
|
build:
|
|
pio run
|
|
|
|
upload:
|
|
pio run -t upload
|
|
|
|
monitor:
|
|
pio device monitor
|
|
|
|
clean:
|
|
pio run -t clean
|
|
rm -f $(BUILD_DIR)/round_rect_test
|