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
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user