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

24 lines
437 B
Bash
Raw Normal View History

2022-09-22 19:44:53 +02:00
#!/bin/sh
2019-04-28 19:31:13 +02:00
2022-09-22 19:44:53 +02:00
# Make script for small3dlib programs.
# by drummyfish
# released under CC0 1.0, public domain
2019-04-28 19:31:13 +02:00
2022-09-22 19:44:53 +02:00
if [ "$#" -ne 1 ]; then
echo "ERROR: expecting one argument, the name of program without extension (e.g. \"helloWorld\")"
exit 0
fi
link=""
clear
clear
2022-09-26 18:43:25 +02:00
flags="-x c -g -lm -O3 -std=c99 -pedantic -Wall -Wextra -o $1 $1.c -lSDL2"
2022-09-22 19:44:53 +02:00
compiler=gcc
#compiler=clang
echo "making:" ${compiler} ${flags}
${compiler} ${flags} && ./$1