odin-space-invaders/Makefile

27 lines
712 B
Makefile

EXE=space_invaders
REL_FOLDER=release_x64_win
DEB_FOLDER=debug_x64_win
BIN_FOLDER=./bin
run: build
${BIN_FOLDER}/${EXE}.exe
run_rel: build_release
${BIN_FOLDER}/${EXE}_rel.exe
build: clean
odin build . -out:${BIN_FOLDER}/${EXE}.exe -debug
build_release: clean
odin build . -out:${BIN_FOLDER}/${EXE}_rel.exe -o:speed -subsystem:windows
clean:
rm -rf ${BIN_FOLDER}/${EXE}.*
rm -rf ${BIN_FOLDER}/${EXE}_rel.*
package: build_release
rm -rf ${BIN_FOLDER}/${REL_FOLDER}
mkdir ${BIN_FOLDER}/${REL_FOLDER}
cp -r ./assets/ ${BIN_FOLDER}/${REL_FOLDER}/
cp ${BIN_FOLDER}/${EXE}_rel.exe ${BIN_FOLDER}/${REL_FOLDER}/${EXE}.exe
tar.exe -a -c -f ${BIN_FOLDER}/release_x64_win.zip ${BIN_FOLDER}/release_x64_win