2011-09-10 00:19:06 +00:00
|
|
|
#!/bin/sh
|
2011-09-23 00:31:43 +00:00
|
|
|
# find root
|
|
|
|
cd `dirname $PWD/$0` ; cd ..
|
|
|
|
#TODO: add support for ccache
|
2011-09-10 00:19:06 +00:00
|
|
|
|
2012-08-10 09:35:38 +00:00
|
|
|
# XXX. fails with >1
|
2012-08-10 13:59:37 +00:00
|
|
|
MAKE_JOBS=8
|
2012-08-10 09:35:38 +00:00
|
|
|
|
|
|
|
OLD_LDFLAGS="${LDFLAGS}"
|
|
|
|
unset LDFLAGS
|
|
|
|
|
2013-05-13 23:53:52 +00:00
|
|
|
CFGFLAGS="--without-ewf --with-ostype=windows"
|
2012-08-31 23:06:24 +00:00
|
|
|
|
2014-07-18 06:57:43 +00:00
|
|
|
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
|
2013-05-16 23:42:24 +00:00
|
|
|
C=i686-w64-mingw32-gcc
|
|
|
|
H=i686-unknown-windows
|
|
|
|
elif [ -x /usr/bin/pacman ]; then
|
|
|
|
C=i486-mingw32-gcc
|
|
|
|
H=i486-unknown-windows
|
2011-09-14 00:07:06 +00:00
|
|
|
elif [ `uname` = Darwin ]; then
|
2013-05-16 23:42:24 +00:00
|
|
|
C=i386-mingw32-gcc
|
|
|
|
H=i386-unknown-windows
|
2011-09-10 00:19:06 +00:00
|
|
|
elif [ -x /usr/bin/apt-get ]; then
|
2013-05-16 23:42:24 +00:00
|
|
|
C=i586-mingw32msvc-gcc
|
|
|
|
H=i586-unknown-windows
|
2011-09-10 00:19:06 +00:00
|
|
|
else
|
2013-05-16 23:42:24 +00:00
|
|
|
echo "arch/opensuse/ubuntu/debian mingw32 package required."
|
2011-09-10 00:19:06 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
2013-05-16 23:42:24 +00:00
|
|
|
|
2013-08-26 23:02:41 +00:00
|
|
|
make mrproper
|
2013-05-16 23:42:24 +00:00
|
|
|
|
|
|
|
./configure ${CFGFLAGS} --with-compiler=$C --host=$H && \
|
2013-10-24 12:08:03 +00:00
|
|
|
make -s -j ${MAKE_JOBS} CC="${C} -static-libgcc" && \
|
2013-05-16 23:42:24 +00:00
|
|
|
make w32dist
|