summaryrefslogtreecommitdiff
path: root/example/build.sh
diff options
context:
space:
mode:
authorpryazha <pryadeiniv@mail.ru>2025-07-09 15:37:44 +0500
committerpryazha <pryadeiniv@mail.ru>2025-07-09 15:37:44 +0500
commit3f68a5ea045f3a097768c681ecf60989ca296ec1 (patch)
tree163cf9ad0631d839da7912afca03a9dadd120806 /example/build.sh
parentea6cdf80a35f0a3c45833e94782cfd1ec7dae929 (diff)
organized examples
Diffstat (limited to 'example/build.sh')
-rwxr-xr-xexample/build.sh14
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