#!/bin/sh
PREFIX=i686-w64-mingw32
INST_DIR=$HOME/packages/mingw-i686
export CC=$PREFIX-gcc
export CXX=$PREFIX-g++
export CPP=$PREFIX-cpp
export RANLIB=$PREFIX-ranlib
export PATH='/usr/i686-w64-mingw32/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games'
mkdir -p w32
cd w32
../configure --with-wx-prefix=$INST_DIR --with-sdl-prefix=$INST_DIR --host=$PREFIX CFLAGS='-static'
make -j8
strip -s src/xdre.exe
mv src/xdre.exe build/
cp ../README.md build/
