1
0
Fork 0
mirror of https://git.coom.tech/drummyfish/raycastlib.git synced 2024-11-23 20:49:57 +01:00
raycastlib/programs/make.sh

28 lines
486 B
Bash
Raw Normal View History

2019-06-04 19:27:00 +02:00
#!/bin/bash
2020-06-21 12:02:37 +02:00
# Make script for raycastlib programs.
# by drummyfish
# released under CC0 1.0, public domain
2020-06-21 11:39:52 +02:00
if [ "$#" -ne 1 ]; then
echo "ERROR: expecting one argument, the name of program without extension (e.g. \"helloWorld\")"
exit 0
fi
2019-06-04 19:27:00 +02:00
2020-06-21 12:02:37 +02:00
link=""
if [ "$1" = "testSDL" ]; then
link="-lSDL2"
fi
clear
clear
2020-06-21 12:17:43 +02:00
flags="-x c -g -O3 -std=c99 -pedantic -Wall -Wextra -o $1 $1.c ${link}"
2020-06-21 12:02:37 +02:00
compiler=gcc
#compiler=clang
echo "making:" ${compiler} ${flags}
2020-06-21 17:40:17 +02:00
${compiler} ${flags} && ./$1