mirror of
https://github.com/Q3Rally-Team/q3rally.git
synced 2024-11-22 20:11:48 +00:00
32 lines
612 B
Bash
32 lines
612 B
Bash
|
#!/bin/sh
|
||
|
|
||
|
CMD_PREFIX="amd64-mingw32msvc x86_64-w64-mingw32";
|
||
|
|
||
|
if [ "X$CC" = "X" ]; then
|
||
|
for check in $CMD_PREFIX; do
|
||
|
full_check="${check}-gcc"
|
||
|
if [ ! $(which "$full_check") = "" ]; then
|
||
|
export CC="$full_check"
|
||
|
fi
|
||
|
done
|
||
|
fi
|
||
|
|
||
|
if [ "X$WINDRES" = "X" ]; then
|
||
|
for check in $CMD_PREFIX; do
|
||
|
full_check="${check}-windres"
|
||
|
if [ ! $(which "$full_check") = "" ]; 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=x64
|
||
|
|
||
|
exec make $*
|