make.sh 437 B

123456789101112131415161718192021222324
  1. #!/bin/sh
  2. # Make script for small3dlib programs.
  3. # by drummyfish
  4. # released under CC0 1.0, public domain
  5. if [ "$#" -ne 1 ]; then
  6. echo "ERROR: expecting one argument, the name of program without extension (e.g. \"helloWorld\")"
  7. exit 0
  8. fi
  9. link=""
  10. clear
  11. clear
  12. flags="-x c -g -lm -O3 -std=c99 -pedantic -Wall -Wextra -o $1 $1.c -lSDL2"
  13. compiler=gcc
  14. #compiler=clang
  15. echo "making:" ${compiler} ${flags}
  16. ${compiler} ${flags} && ./$1