3 # This file is part of PlomRogue. PlomRogue is licensed under the GPL version 3
4 # or any later version. For details on its copyright, license, and warranties,
5 # see the file NOTICE in the root directory of the PlomRogue source package.
10 CFLAGS="-std=c11 -pedantic-errors -Wall -Werror -Wextra -Wformat-security $OFLAG"
12 # For non-GNU gcc masks, drop all gcc-specific debugging flags.
13 test=`stat --version 2>&1 | grep 'Free Software Foundation' | wc -l`
19 # Some tests: for gcc, and certain necessary header files.
20 test=`command -v gcc | wc -l`
24 echo "No gcc installed, but it's needed!"
29 test=`echo $code | cpp -H -o /dev/null 2>&1 | head -n1 | grep error | wc -l`
33 echo "No $1 header file found, but it's needed!"
34 echo "Maybe install some $2 package?"
38 test_header stdlib.h libc6-dev # Assume stdlib.h guarantees full libc6-dev.
41 gcc -shared -fPIC $CFLAGS -o libplomrogue.so libplomrogue.c -lm