From e7f67b450d8034b532101445035d3b199e702621 Mon Sep 17 00:00:00 2001 From: pryazha Date: Sun, 15 Jun 2025 15:28:45 +0500 Subject: windows? --- example/build.sh | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'example/build.sh') 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 -- cgit v1.2.3-70-g09d2