#!/bin/sh 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 cd $path $compiler $cflags $include -o example example.c $libs