Raycaster_G90/build.sh

28 lines
690 B
Bash

#Fcalva 21/02/2024
#Script to do the build for you.
#Is now meant to be used since it runs the converter script
rm "./maps/convert/converted.c"
python3 "./maps/convert/convert.py" script
if test $1 = "linux"; then
mkdir "./build-linux"
cd "./build-linux"
cmake ..
make
mv "./RaycasterGame" "../RaycasterGame.amd64";
elif test $1 = "cg"; then
fxsdk build-cg;
elif test $1 = "win"; then
#todo
echo "not done yet !";
elif test $1 = "ems"; then
mkdir "./build-ems"
cd "./build-ems"
cmake ..
emmake make
emcc -O0 RaycasterGame.o -o RaycasterGame.js;
elif test $1 = "clean"; then
rm -rf "./build-cg" "./build-linux" "./build-ems"
rm "./maps/convert/converted.c"
fi