mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-05-30 10:06:35 +03:00
40 lines
790 B
Bash
Executable File
40 lines
790 B
Bash
Executable File
#!/bin/bash
|
|
cd "$(dirname "$0")" || exit
|
|
|
|
ARCH=32
|
|
for i in "$@"; do
|
|
case $i in
|
|
config=*)
|
|
CONFIG="${i#*=}"
|
|
shift
|
|
;;
|
|
*)
|
|
;;
|
|
esac
|
|
done
|
|
|
|
if [[ "$CONFIG" == *"x86_64"* ]]; then
|
|
ARCH=64
|
|
fi
|
|
|
|
if command -v premake5 &> /dev/null
|
|
then
|
|
premake5 --file=../../premake5.lua --os=windows --cc=mingw --windows-mingw-build gmake2
|
|
elif [ -f ../../premake5 ]; then
|
|
../../premake5 --file=../../premake5.lua --os=windows --cc=mingw --windows-mingw-build gmake2
|
|
else
|
|
echo "Neither premake5 nor premake4 is available. Please install one."
|
|
exit 1
|
|
fi
|
|
|
|
cd ../../make/windows/ || exit
|
|
|
|
if command -v mingw"$ARCH"-make &> /dev/null
|
|
then
|
|
mingw"$ARCH"-make "$@"
|
|
else
|
|
export CC=x86_64-w64-mingw32-gcc-posix
|
|
export CXX=x86_64-w64-mingw32-g++-posix
|
|
make "$@"
|
|
fi
|