1#!/bin/bash
2
3target=i686-w64-mingw32
4
5unset CC
6unset CXX
7unset CPP
8unset LD
9unset LDFLAGS
10unset CFLAGS
11unset CXXFLAGS
12unset PKG_CONFIG_PATH
13
14# Removed -static from the following
15export CFLAGS="-static-libgcc"
16export CXXFLAGS="-static-libgcc -static-libstdc++"
17export CPPFLAGS="-I$HOME/.local/$target/include -O2"
18export LDFLAGS=-L$HOME/.local/$target/lib
19export PKG_CONFIG_LIBDIR=$HOME/.local/$target/lib/pkgconfig
20export PATH=$HOME/.local/$target/bin:$PATH
21
22../configure --build=`../config.guess` --host=$target --prefix=$HOME/.local/$target "$@"
23