diff options
author | pryazha <pryadeiniv@mail.ru> | 2025-06-15 15:28:45 +0500 |
---|---|---|
committer | pryazha <pryadeiniv@mail.ru> | 2025-06-15 15:28:45 +0500 |
commit | e7f67b450d8034b532101445035d3b199e702621 (patch) | |
tree | d1193a6044d75800266cec11776358be7270cf8b /example/build.sh | |
parent | 92850237f42cecfeba519bc15f7f5bb7a76cde5f (diff) |
windows?
Diffstat (limited to 'example/build.sh')
-rwxr-xr-x | example/build.sh | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/example/build.sh b/example/build.sh index 172aa69..de969e8 100755 --- a/example/build.sh +++ b/example/build.sh @@ -1,7 +1,14 @@ #!/bin/sh -CFLAGS='-g -Wall' -INCLUDE='-I..' -LIBS='-lm' +compiler='gcc' +if [ $# -eq 1 ] ; then + if [ $1 = 'windows' ] ; then + compiler='x86_64-w64-mingw32-gcc' + fi +fi +cflags='-g -Wall' +include='-I..' +libs='-lm' +path=`dirname $0` set -x -#tcc $CFLAGS $INCLUDE $LIBS -o example example.c && ./example -gcc $CFLAGS $INCLUDE $LIBS -o example example.c && ./example +cd $path +$compiler $cflags $include -o example example.c $libs |