diff options
Diffstat (limited to 'examples/make.sh')
| -rwxr-xr-x | examples/make.sh | 12 |
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 |
