2011-02-18 14:31:32 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2012-09-15 03:03:44 +00:00
|
|
|
# Note: This works in Linux and cygwin
|
|
|
|
|
2011-07-26 08:52:24 +00:00
|
|
|
CMD_PREFIX="i586-mingw32msvc i686-w64-mingw32";
|
|
|
|
|
|
|
|
if [ "X$CC" = "X" ]; then
|
|
|
|
for check in $CMD_PREFIX; do
|
|
|
|
full_check="${check}-gcc"
|
2012-09-15 03:03:44 +00:00
|
|
|
which "$full_check" > /dev/null 2>&1
|
|
|
|
if [ "$?" = "0" ]; then
|
|
|
|
export CC="$full_check"
|
|
|
|
fi
|
2011-07-26 08:52:24 +00:00
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "X$WINDRES" = "X" ]; then
|
|
|
|
for check in $CMD_PREFIX; do
|
|
|
|
full_check="${check}-windres"
|
2012-09-15 03:03:44 +00:00
|
|
|
which "$full_check" > /dev/null 2>&1
|
|
|
|
if [ "$?" = "0" ]; then
|
|
|
|
export WINDRES="$full_check"
|
|
|
|
fi
|
2011-07-26 08:52:24 +00:00
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "X$WINDRES" = "X" -o "X$CC" = "X" ]; then
|
|
|
|
echo "Error: Must define or find WINDRES and CC"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2011-02-18 14:31:32 +00:00
|
|
|
export PLATFORM=mingw32
|
|
|
|
export ARCH=x86
|
2011-07-26 08:52:24 +00:00
|
|
|
|
2011-02-18 14:31:32 +00:00
|
|
|
exec make $*
|