diff options
Diffstat (limited to 'example/build.sh')
-rwxr-xr-x | example/build.sh | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/example/build.sh b/example/build.sh index de969e8..e6cee7c 100755 --- a/example/build.sh +++ b/example/build.sh @@ -1,14 +1,22 @@ #!/bin/sh compiler='gcc' +path=`dirname $0` +cd $path if [ $# -eq 1 ] ; then if [ $1 = 'windows' ] ; then compiler='x86_64-w64-mingw32-gcc' fi + if [ $1 = 'clean' ] ; then + set -x + rm -f macros macros.exe arena arena.exe sys sys.exe string string.exe + exit + fi fi cflags='-g -Wall' include='-I..' libs='-lm' -path=`dirname $0` set -x -cd $path -$compiler $cflags $include -o example example.c $libs +$compiler $cflags $include -o macros macros.c $libs +$compiler $cflags $include -o arena arena.c $libs +$compiler $cflags $include -o sys sys.c $libs +$compiler $cflags $include -o string string.c $libs |