You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1.0 KiB
Makefile
36 lines
1.0 KiB
Makefile
ifeq ($(PROFILE),release)
|
|
RELEASE = --release
|
|
PROFILE = release
|
|
else
|
|
PROFILE = debug
|
|
endif
|
|
|
|
target/x86_64-unknown-linux-gnu/$(PROFILE)/set: src/*
|
|
cargo build --target x86_64-unknown-linux-gnu --features bevy/dynamic_linking $(RELEASE)
|
|
|
|
target/wasm32-unknown-unknown/$(PROFILE)/set.wasm: src/*
|
|
cargo build --target wasm32-unknown-unknown $(RELEASE)
|
|
|
|
out/$(PROFILE)/set.js: target/wasm32-unknown-unknown/$(PROFILE)/set.wasm
|
|
wasm-bindgen --no-typescript --target web --out-dir "./out/$(PROFILE)" ./target/wasm32-unknown-unknown/$(PROFILE)/set.wasm
|
|
|
|
out/$(PROFILE)/assets:
|
|
rm -rf ./out/$(PROFILE)/assets
|
|
cp -r ./assets ./out/$(PROFILE)/
|
|
|
|
out/$(PROFILE)/index.html:
|
|
cp index.html ./out/$(PROFILE)/index.html
|
|
|
|
native/build: target/x86_64-unknown-linux-gnu/$(PROFILE)/set
|
|
|
|
native/run: native/build
|
|
cargo run --target x86_64-unknown-linux-gnu --features bevy/dynamic_linking $(RELEASE)
|
|
|
|
web/build: out/$(PROFILE)/set.js out/$(PROFILE)/assets out/$(PROFILE)/index.html
|
|
|
|
web/serve: web/build
|
|
cd ./out/$(PROFILE)/; simple-http-server
|
|
|
|
clean:
|
|
rm ./target/*/*/set*
|