mirror of
https://github.com/ioquake/ioq3.git
synced 2024-11-14 00:40:39 +00:00
35 lines
743 B
Bash
Executable file
35 lines
743 B
Bash
Executable file
#!/bin/sh
|
|
|
|
# Note: This works in Linux and cygwin
|
|
|
|
CMD_PREFIX="i586-mingw32msvc i686-w64-mingw32";
|
|
|
|
if [ "X$CC" = "X" ]; then
|
|
for check in $CMD_PREFIX; do
|
|
full_check="${check}-gcc"
|
|
which "$full_check" > /dev/null 2>&1
|
|
if [ "$?" = "0" ]; then
|
|
export CC="$full_check"
|
|
fi
|
|
done
|
|
fi
|
|
|
|
if [ "X$WINDRES" = "X" ]; then
|
|
for check in $CMD_PREFIX; do
|
|
full_check="${check}-windres"
|
|
which "$full_check" > /dev/null 2>&1
|
|
if [ "$?" = "0" ]; then
|
|
export WINDRES="$full_check"
|
|
fi
|
|
done
|
|
fi
|
|
|
|
if [ "X$WINDRES" = "X" -o "X$CC" = "X" ]; then
|
|
echo "Error: Must define or find WINDRES and CC"
|
|
exit 1
|
|
fi
|
|
|
|
export PLATFORM=mingw32
|
|
export ARCH=x86
|
|
|
|
exec make $*
|