radare2/sys/mingw32.sh
pancake 356640967b Fix double warning for -zz and add support for openSUSE in mingw32.sh
- Fix mingw32 build
- Fix double warn for -zz
- Some code indentation in c55plus code
- mingw32.sh now supports openSUSE
2013-05-17 01:42:24 +02:00

36 lines
728 B
Bash
Executable File

#!/bin/sh
# find root
cd `dirname $PWD/$0` ; cd ..
#TODO: add support for ccache
# XXX. fails with >1
MAKE_JOBS=8
OLD_LDFLAGS="${LDFLAGS}"
unset LDFLAGS
CFGFLAGS="--without-ewf --with-ostype=windows"
if [ -x /usr/bin/i686-w64-mingw32-gcc ]; then
C=i686-w64-mingw32-gcc
H=i686-unknown-windows
elif [ -x /usr/bin/pacman ]; then
C=i486-mingw32-gcc
H=i486-unknown-windows
elif [ `uname` = Darwin ]; then
C=i386-mingw32-gcc
H=i386-unknown-windows
elif [ -x /usr/bin/apt-get ]; then
C=i586-mingw32msvc-gcc
H=i586-unknown-windows
else
echo "arch/opensuse/ubuntu/debian mingw32 package required."
exit 1
fi
make clean
./configure ${CFGFLAGS} --with-compiler=$C --host=$H && \
make -s -j ${MAKE_JOBS} && \
make w32dist