From 3f68a5ea045f3a097768c681ecf60989ca296ec1 Mon Sep 17 00:00:00 2001 From: pryazha Date: Wed, 9 Jul 2025 15:37:44 +0500 Subject: organized examples --- example/build.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'example/build.sh') 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 -- cgit v1.2.3-70-g09d2