Add support for MXE mingw32 toolchain

This commit is contained in:
pancake 2014-07-18 08:57:43 +02:00
parent 7277b79858
commit 567663f7d7
2 changed files with 26 additions and 1 deletions

21
mk/i686-pc-mingw32-gcc.mk Normal file
View File

@ -0,0 +1,21 @@
ifeq (${_INCLUDE_MK_GCC_},)
_INCLUDE_MK_GCC_=1
CC=i686-pc-mingw32-gcc
RANLIB=i686-pc-mingw32-ranlib
ONELIB=0
OSTYPE=windows
LINK=
CC_AR=i686-pc-mingw32-ar -r ${LIBAR}
PICFLAGS=
CFLAGS+=${PICFLAGS} -MD -D__WINDOWS__=1
CC_LIB=${CC} -shared -o
CFLAGS_INCLUDE=-I
LDFLAGS+=-static-libgcc
LDFLAGS_LINK=-l
LDFLAGS_LINKPATH=-L
CFLAGS_OPT0=-O0
CFLAGS_OPT1=-O1
CFLAGS_OPT2=-O2
CFLAGS_OPT3=-O3
CFLAGS_DEBUG=-g
endif

View File

@ -11,7 +11,11 @@ unset LDFLAGS
CFGFLAGS="--without-ewf --with-ostype=windows"
if [ -x /usr/bin/i686-w64-mingw32-gcc ]; then
type i686-pc-mingw32-gcc >/dev/null 2>&1
if [ $? = 0 ]; then
C=i686-pc-mingw32-gcc
H=i686-unknown-windows
elif [ -x /usr/bin/i686-w64-mingw32-gcc ]; then
C=i686-w64-mingw32-gcc
H=i686-unknown-windows
elif [ -x /usr/bin/pacman ]; then