# HG changeset patch # User Volker Grabsch # Date 1244382536 -7200 # Node ID 8ab59fc935ef4a0e8db707ff91eef649d42857fd # Parent 6f4bc915cc2fb7bec1acacfeaef1ec44ebd3d275 improved tutorial diff -r 6f4bc915cc2f -r 8ab59fc935ef doc/index.html --- a/doc/index.html Sun Jun 07 14:48:48 2009 +0200 +++ b/doc/index.html Sun Jun 07 15:48:56 2009 +0200 @@ -176,7 +176,14 @@

Step 1: Download and Unpack

- First, download the + First, you should ensure that your system meets + mingw_cross_env's + requirements. + You probably need to install some stuff. +

+ +

+ When everything is fine, download the latest release and unpack the tarball:

@@ -230,8 +237,8 @@
make

you're in for a long wait, - because the mingw_cross_env - compiles a lot of stuff. + because it compiles + a lot of packages. On the other hand it doesn't require any intervention, so you're free to do whatever you like – like watch a movie or go for a night on the town. @@ -256,48 +263,65 @@

After you're done it just needs a little post-installation. +

+ +

Step 4: Environment Variables

+ +

Edit your .bashrc script in order to change $PATH:

export PATH=/where mingw_cross_env is installed/usr/bin:$PATH

- BTW, note that any compiler related environment variables + Note that any compiler related environment variables (like $CC, $LDFLAGS, etc.) may spoil your compiling pleasure, so be sure to delete or disable those.

-

Step 4: Build your Project

+

+ Congratulations! + You're ready to cross compile anything you like. +

+ +

Step 5a: Cross compile your Project (Autotools)

- You probably will have to make a few adjustments to your Makefile: + If you use the + Autotools, + all you have to do is: +

+
./configure --host=i386-mingw32msvc
+make
+ +

+ Don't worry about a warning like this: +

+
configure: WARNING: If you wanted to set the --build type, don't use --host.
+If a cross compiler is detected then cross compile mode will be used.
+

+ Everything will be just fine. +

+ +

Step 5b: Cross compile your Project (Makefile)

+ +

+ If you have a handwritten Makefile, + you probably will have to make a few adjustments to it:

CC=$(CROSS)gcc
 LD=$(CROSS)ld
 AR=$(CROSS)ar

You may have to add a few others, depending on your project. - Then, all you have to do is type this: -

-
make CROSS="i386-mingw32msvc-"
- -

- If you're using configure, all you have to do is: -

-
./configure --host="i386-mingw32msvc"
-make
-

- That's it!

- Don't let any warnings put you off. - A warning like this is absolutely harmless: + Then, all you have to do is:

-
configure: WARNING: If you wanted to set the --build type, don't use --host.
-If a cross compiler is detected then cross compile mode will be used.
+
make CROSS=i386-mingw32msvc-

- Everything will be just fine. + That's it!