From f53f1ddfb7038c22ccf964da76a1ac7dbda722e3 Mon Sep 17 00:00:00 2001 From: Lewis Lakerink Date: Mon, 23 Mar 2026 13:04:35 +1100 Subject: [PATCH] make: rebuild when rust sources change --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 3fb81e5..0c6fa8c 100644 --- a/Makefile +++ b/Makefile @@ -51,10 +51,12 @@ RUST_DEPS = rust/target/thumbv6m-none-eabi/release/deps STARTUP_SRC = ./sdk/cstartup_8266.S STARTUP_OBJ = $(addprefix $(BUILD_DIR)/asm/, $(notdir $(STARTUP_SRC:%.S=%.o))) +RUST_SRCS = $(shell find rust/src -name '*.rs') rust/Cargo.toml rust/Cargo.lock + $(BUILD_DIR)/$(TARGET).bin: $(BUILD_DIR)/$(TARGET) $(CP) -O binary $< $@ -$(BUILD_DIR)/$(TARGET): $(STARTUP_OBJ) +$(BUILD_DIR)/$(TARGET): $(STARTUP_OBJ) $(RUST_SRCS) @[ -f .env ] && . .env || :; \ _LLC=$${LLC:-$(LLC)}; \ _LLVM_LINK=$${LLVM_LINK:-$(LLVM_LINK)}; \