In general? Install mingw32 including the corresponding binutils, gcc, runtime and w32api packages. Then call i486-mingw32-gcc (might be i686-mingw32-gcc, too) instead of your local gcc when compiling and application.
If the application uses a configure script, pass the option --host=i486-mingw32 (or i686-mingw32 respectively) to the configure script and it should set you up for cross compiling.
If you're talking about aMule: install the mingw packages for libiconv, gettext and zlib as well, compile wxmsw from source (add the --host option to the configure script) and compile aMule adding the host option...stop, you'll have to take care of crypto++ as well, lazy me wanted to test this, but didn't do it. But I guess you have to compile from source and specify the crypto-prefix.