
  COMPILATION INSTRUCTIONS

** Getting sources **

First get required sources and extract them in a build directory. We use
separated compilers environments for 32 and 64-bit builds (multiarch is
not supported), so these instructions use out-of-tree builds. Note that
we use mingw-w64 project headers and libraries (SVN version) for both
32 and 64-bit builds because even on win32 they are far better.

$ wget http://ftp.gnu.org/gnu/binutils/binutils-2.21.1.tar.bz2
$ tar -jxf binutils-2.21.1.tar.bz2
$ wget http://gcc.fyxm.net/releases/gcc-4.5.3/gcc-4.5.3.tar.bz2
$ tar -jxf gcc-4.5.3.tar.bz2

SVN version of mingw-w64 is required:
$ svn co https://mingw-w64.svn.sourceforge.net/svnroot/mingw-w64/trunk mingw-w64-svn


** 32-bit environment **

* binutils

$ mkdir binutils-2.21.1-mingw32 && cd binutils-2.21.1-mingw32
$ ../binutils-2.21.1/configure --prefix=/usr/local/ --target=i686-w64-mingw32
$ make
# make install

* mingw-w64 headers

$ mkdir mingw-w64-headers32 && cd mingw-w64-headers32
$ ../mingw-w64-svn/mingw-w64-headers/configure --host=i686-w64-mingw32 --prefix=/usr/local/ --enable-sdk=all --enable-secure-api
# make install

* GCC compiler

$ mkdir gcc-4.5.3-mingw32 && cd gcc-4.5.3-mingw32
$ ../gcc-4.5.3/configure --prefix=/usr/local/ --target=i686-w64-mingw32 --with-gnu-ld --with-gnu-as --enable-__cxa_atexit --enable-languages=c,c++ --disable-multilib
$ make all-gcc
# make install-gcc

* mingw-w64 crt

$ mkdir mingw-w64-lib32 && cd mingw-w64-lib32
$ ../mingw-w64-svn/mingw-w64-crt/configure --host=i686-w64-mingw32 --prefix=/usr/local/
$ make
# make install

* Finnishing GCC

$ cd gcc-4.5.3-mingw32
$ make
# make install
# echo "#include_next <float.h>" >> /usr/local/lib/gcc/i686-w64-mingw32/4.5.3/include/float.h


** 64-bit environment **

* binutils

$ mkdir binutils-2.21.1-mingw64 && cd binutils-2.21.1-mingw64
$ ../binutils-2.21.1/configure --prefix=/usr/local/ --target=x86_64-w64-mingw32 --disable-multilib
$ make
# make install

* mingw-w64 headers

$ mkdir mingw-w64-headers64 && cd mingw-w64-headers64
$ ../mingw-w64-svn/mingw-w64-headers/configure --host=x86_64-w64-mingw32 --prefix=/usr/local/ --enable-sdk=all --enable-secure-api
# make install

* GCC compiler

$ mkdir gcc-4.5.3-mingw64 && cd gcc-4.5.3-mingw64
$ ../gcc-4.5.3/configure --target=x86_64-w64-mingw32 --disable-multilib --prefix=/usr/local/ --enable-languages=c,c++ --with-gnu-ld --with-gnu-as
$ make all-gcc
# make install-gcc

* mingw-w64 crt

$ mkdir mingw-w64-lib64 && cd mingw-w64-lib64
$ ../mingw-w64-svn/mingw-w64-crt/configure --host=x86_64-w64-mingw32 --prefix=/usr/local/
$ make
# make install

* Finishing GCC

$ cd gcc-4.5.3-mingw64
$ make
# make install

** Compiling wine_gecko **

To compile Wine Gecko package simply run wine/make_package script. See 'wine/make_package --help' for available options.

$ wine/make_package

If all goes well, you should have a complete package in ../wine_gecko-$TARGET$DEBUG-$VERSION/dist/wine_gecko
