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