From f05e8354b127382d904057e2de4d2b97930148a2 Mon Sep 17 00:00:00 2001 From: Stephen Seo Date: Fri, 16 Feb 2024 15:19:00 +0900 Subject: [PATCH] wasm/Makefile: Rebuild on rust source change --- wasm/Makefile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/wasm/Makefile b/wasm/Makefile index aa34388..4c779de 100644 --- a/wasm/Makefile +++ b/wasm/Makefile @@ -1,6 +1,16 @@ EM_ENV = "${HOME}/git/emsdk/emsdk_env.sh" CC = source ${EM_ENV} && emcc +RUST_SOURCES = \ + ../src/agnostic_interface/raylib_impl.rs \ + ../src/bin.rs \ + ../src/agnostic_interface.rs \ + ../src/shaders.rs \ + ../src/faux_quicksilver.rs \ + ../src/lib.rs \ + ../src/original_impl.rs \ + ../src/wasm_helpers.rs + all: ld45.html ld45.html: src/main.c ../target/wasm32-unknown-emscripten/release/libld45_lib.a @@ -19,7 +29,7 @@ ld45.html: src/main.c ../target/wasm32-unknown-emscripten/release/libld45_lib.a #-fsanitize=address \ #-sWARN_UNALIGNED=1 \ -../target/wasm32-unknown-emscripten/release/libld45_lib.a: ../src/lib.rs +../target/wasm32-unknown-emscripten/release/libld45_lib.a: ${RUST_SOURCES} cd .. && source ${EM_ENV} && cargo build --lib --release --target wasm32-unknown-emscripten # cd .. && source ${EM_ENV} && cargo rustc --lib --release --target wasm32-unknown-emscripten -- -C link-args=-Wl,-zstack-size=8388608