PROJECT_NAME=game_core CURRENT_DIRECTORY=$(shell pwd) linux-deps: sudo apt-get install -yyq clang pkg-config libx11-dev libasound-dev libudev-dev lld wayland-deps: sudo apt-get install -yyq libwayland-dev libxkbcommon-dev cargo-deps: rustup target install wasm32-unknown-unknown cargo install -f wasm-server-runner setup-x11: linux-deps cargo-deps setup-wayland: linux-deps wayland-deps cargo-deps # Update this command to build assets; commonly using Crunch to generate asset files # If you remove this command, be sure to update .gitlab-ci.yml to remove the steps that # call "make assets" assets: @echo "Beep Boop, No assets needed to be built" run: RUSTFLAGS="-Awarnings" \ cargo run --release --features "bevy/dynamic" -p game_core run-web: cd game_core && trunk serve --release check: cargo check --release --features "bevy/dynamic" -p game_core build-windows: clean_dist top_tail docker run --rm --name "${PROJECT_NAME}-build-windows" -v "$(CURRENT_DIRECTORY):/app" -w /app --user $(shell id -u):$(shell id -g) r.lcr.gr/microhacks/bevy-builder \ cargo build --release -p game_core --target x86_64-pc-windows-gnu mkdir -p dist cp -r assets dist/assets cp target/x86_64-pc-windows-gnu/release/game_core.exe "dist/${PROJECT_NAME}.exe" cd dist && zip -r "${PROJECT_NAME}-windows.zip" "./${PROJECT_NAME}.exe" ./assets build-linux: clean_dist top_tail docker run --rm --name "${PROJECT_NAME}-build-linux" -v "$(CURRENT_DIRECTORY):/app" -w /app --user $(shell id -u):$(shell id -g) r.lcr.gr/microhacks/bevy-builder \ cargo build --release -p game_core --target x86_64-unknown-linux-gnu mkdir -p dist cp -r assets dist/assets cp target/x86_64-unknown-linux-gnu/release/game_core "dist/${PROJECT_NAME}" cd dist && zip -r "${PROJECT_NAME}-linux.zip" "./${PROJECT_NAME}" ./assets build-web: top_tail cd game_core && trunk build --release cd game_core/dist && zip -r "${PROJECT_NAME}-web.zip" ./* clean_dist: rm -rf ./dist top_tail: @echo "================================================" @echo " Building ${PROJECT_NAME}" @echo "================================================"