summaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
authorTyge Lovset <[email protected]>2022-11-10 08:33:02 +0100
committerTyge Lovset <[email protected]>2022-11-10 08:33:02 +0100
commite0fc0f2ec3846334496ab90b46ce1d69e9bbd230 (patch)
treed07417b00b7a19d1de95db077717f9723dffe9e1 /examples
parent50abbfbef2f790c8ba11e402de106d5410d3139c (diff)
downloadSTC-modified-e0fc0f2ec3846334496ab90b46ce1d69e9bbd230.tar.gz
STC-modified-e0fc0f2ec3846334496ab90b46ce1d69e9bbd230.zip
updated examples/make.sh
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/make.sh12
1 files changed, 7 insertions, 5 deletions
diff --git a/examples/make.sh b/examples/make.sh
index 28d95abe..a25c517a 100755
--- a/examples/make.sh
+++ b/examples/make.sh
@@ -32,18 +32,20 @@ if [ "$1" = '-run' ]; then
shift
fi
if [ ! -z "$1" ] ; then
- comp=$@
+ comp="$@"
+else
+ comp="$cc $cflags"
fi
if [ $run = 0 ] ; then
for i in *.c ; do
- echo $cc $cflags -I../include $i $clibs $oflag$(basename $i .c).exe
- $cc $cflags -I../include $i $clibs $oflag$(basename $i .c).exe
+ echo $comp -I../include $i $clibs $oflag$(basename $i .c).exe
+ $comp -I../include $i $clibs $oflag$(basename $i .c).exe
done
else
for i in *.c ; do
- echo $cc $cflags -I../include $i $clibs
- $cc $cflags -I../include $i $clibs
+ echo $comp -I../include $i $clibs
+ $comp -I../include $i $clibs
if [ -f $(basename -s .c $i).exe ]; then ./$(basename -s .c $i).exe; fi
if [ -f ./a.exe ]; then ./a.exe; fi
if [ -f ./a.out ]; then ./a.out; fi