Add compile flags

This commit is contained in:
Julien Chemillier 2022-03-25 19:19:57 +01:00
parent 77911169e7
commit 0fc6271828

View File

@ -1,10 +1,12 @@
#!/bin/bash #!/bin/bash
FLAGS="-std=c99 -lm"
if [[ $1 == "preview" ]]; then if [[ $1 == "preview" ]]; then
[[ $2 ]] || set -- "$1" "build" [[ $2 ]] || set -- "$1" "build"
if [[ $2 == "build" ]]; then if [[ $2 == "build" ]]; then
mkdir -p out mkdir -p out
gcc src/mnist/preview.c -o out/preview_mnist gcc src/mnist/preview.c -o out/preview_mnist $FLAGS
exit exit
elif [[ $2 == "train" ]]; then elif [[ $2 == "train" ]]; then
[[ -f out/preview_mnist ]] || $0 preview build [[ -f out/preview_mnist ]] || $0 preview build