started rework
This commit is contained in:
23
compile.sh
23
compile.sh
@@ -1,3 +1,22 @@
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
gcc -Og -g -Wall -Werror -pedantic -o build/sanke src/main.c src/snake/**.c src/utils/**.c src/board/**.c
|
||||
src="src/*.c"
|
||||
flags="-std=c23 -ggdb -Og -Wall -Wextra -Werror -Wpedantic -pedantic-errors"
|
||||
includes="-I src/headers"
|
||||
|
||||
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
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user