marble-machinations/Makefile
2024-12-24 23:49:49 +01:00

24 lines
692 B
Makefile

VERSION = `cat version.txt`
RELEASE_DIRNAME = marble_machinations_${VERSION}
BIN_NAME = marble-machinations
TARGET_W64 = x86_64-pc-windows-gnu
linux:
cargo build --release
mkdir ${RELEASE_DIRNAME}
cp target/release/${BIN_NAME} ${RELEASE_DIRNAME}/
cp -r assets levels ${RELEASE_DIRNAME}/
zip -r ${RELEASE_DIRNAME}_linux.zip ${RELEASE_DIRNAME}/
rm -rf ${RELEASE_DIRNAME}
windows:
cargo build --release --target=${TARGET_W64}
mkdir ${RELEASE_DIRNAME}_win
cp target/${TARGET_W64}/release/${BIN_NAME}.exe ${RELEASE_DIRNAME}_win/
cp -r assets levels ${RELEASE_DIRNAME}_win/
zip -r ${RELEASE_DIRNAME}_win.zip ${RELEASE_DIRNAME}_win/
rm -rf ${RELEASE_DIRNAME}_win
all: windows linux