forked from EXTERNAL/bareiron
support 32-bit compilation on windows
* Add support for 32 bit cross compile in mingw64 and windows 98 support * add check to error out on linux * update text * add instructions for 32-bit compilation on windows --------- Co-authored-by: p2r3 <41925384+p2r3@users.noreply.github.com>
This commit is contained in:
20
build.sh
20
build.sh
@@ -22,6 +22,24 @@ case "$unameOut" in
|
||||
;;
|
||||
esac
|
||||
|
||||
# Default compiler
|
||||
compiler="gcc"
|
||||
|
||||
# Handle arguments for windows 9x build
|
||||
for arg in "$@"; do
|
||||
case $arg in
|
||||
--9x)
|
||||
if [[ "$unameOut" == MINGW64_NT* ]]; then
|
||||
compiler="/opt/bin/i686-w64-mingw32-gcc"
|
||||
windows_linker="$windows_linker -Wl,--subsystem,console:4"
|
||||
else
|
||||
echo "Error: Compiling for Windows 9x is only supported when running under the MinGW64 shell."
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
rm -f "bareiron$exe"
|
||||
gcc src/*.c -O3 -Iinclude -o "bareiron$exe" $windows_linker
|
||||
$compiler src/*.c -O3 -Iinclude -o "bareiron$exe" $windows_linker
|
||||
"./bareiron$exe"
|
||||
|
Reference in New Issue
Block a user