From 370fe85d6c0909daff77a7a413f4cb97b2d7a632 Mon Sep 17 00:00:00 2001 From: Robert Garrett Date: Tue, 28 Oct 2025 14:59:47 -0500 Subject: [PATCH] Make wasm binary target depend on source files Now Make will know to rebuild the WASM binary if the source code changes... because I forgot to do that, too. :v --- makefile_web | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/makefile_web b/makefile_web index 58f7f1f5..4a4744c8 100644 --- a/makefile_web +++ b/makefile_web @@ -1,3 +1,6 @@ +SRC_DIR = ./src +SRCS := $(wildcard $(SRC_DIR)/**) + .PHONY: clean full-clean web tarball web: out/boids.js out/boids.wasm out/index.html @@ -7,7 +10,7 @@ tarball: boids_web_root.tar boids_web_root.tar: out/boids.js out/boids.wasm out/index.html tar -caf $@ $< -target/wasm32-unknown-unknown/wasm-release/another-boids-in-rust.wasm: +target/wasm32-unknown-unknown/wasm-release/another-boids-in-rust.wasm: $(SRCS) cargo build --profile wasm-release --target wasm32-unknown-unknown out: