working reworked game

This commit is contained in:
2025-09-10 22:08:34 +03:00
parent 7498a49f88
commit ad5b8beb99
15 changed files with 416 additions and 144 deletions

View File

@@ -1,7 +1,26 @@
#!/bin/sh
arg=-1
if [ -v 1 ]; then
arg=$1
fi
if [ $arg = "clean" ]; then
rm -rf ./target/*
exit
fi
oflag="-Og"
debug_flag="-ggdb"
if [ $arg = "release" ]; then
oflag="-O3"
debug_flag=""
fi
src="src/*.c"
flags="-std=c23 -ggdb -Og -Wall -Wextra -Werror -Wpedantic -pedantic-errors"
flags="-std=c23 $oflag $debug_flag -Wall -Wextra -Werror -Wpedantic -pedantic-errors"
includes="-I src/headers"
cmd="gcc $flags $includes $src -o target/sanke"
@@ -9,14 +28,12 @@ cmd="gcc $flags $includes $src -o target/sanke"
echo $cmd
$cmd
if [ $? -gt 0 ]; then
exit
fi
echo
if [ -v 1 ]; then
if [ $1 = "run" ]; then
./target/sanke
fi
if [ $arg = "run" ]; then
echo
./target/sanke
fi