1#!/bin/sh
2set -e
3
4./configure \
5  --disable-libs \
6  --build=i686-pc-linux-gnu \
7  --host=i586-mingw32msvc \
8  CC=i586-mingw32msvc-gcc CXX=i586-mingw32msvc-g++
9
10make
11
12# Check two locations to be compatible with libtool 1.5.26 or 2.2.6b.
13if test -f compiler/cpp/.libs/thrift.exe ; then
14  i586-mingw32msvc-strip compiler/cpp/.libs/thrift.exe -o ./thrift.exe
15else
16  i586-mingw32msvc-strip compiler/cpp/thrift.exe -o ./thrift.exe
17fi
18echo "Finished compiling with resulting exe"
19ls -l ./thrift.exe
20