Building zlib 1.2.3 for Win32 using MSYS / MINGW (under Wine)

Binary builds of zlib for win32 deveopers are hard to come by.  You can
download zlib 1.2.3.3 for win32 here or you can try building it yourself.
Included in the download is the libraries and header files, as well as
the binaries and the dll, for developers.  

I successfully compiled zlib 1.2.3.3 using MSYS and MinGW running under Wine,
the Windows Emulator, but the process will work equally as well on "Native"
Win32 platforms.

The only gotcha that a Wine user has to watch out for is to add a DLLOverride
for msvcrt, and to use the "native" MSVCRT.DLL, because windres.exe will
not work due to bugs in Wine at the time of writing (1.1.13 and probably
slightly beyond).

Manually add this to user.reg (exit all wine apps first) if you find that
winecfg is being a pain and crashes when you add a new dlloverride app:

[Software\\Wine\\AppDefaults\\windres.exe\\DllOverrides] 1232063734
"msvcrt"="native"

If you want to build yourself, download the standard version of zlib.
it contains a Makefile ready to go, in win32/Makefile.gcc.
The Makefile *may* require a little tweaking: it assumes that you
are going to run under CMD.EXE rather than /bin/sh, so you may
wish to make the CP command "cp" rather than "copy".

Also you will need zlibdefs.h (missing from the install process) so
add this to the "install:" line in the Makefile.gcc:

    -f $(INSTALL) zlibdefs.h $(INCLUDE_PATH)


You've downloaded MSYS and MinGW - simply type
    make -f win32/Makefile.gcc
and then:
    make -f win32/Makefile.gcc INCLUDE_PATH=/mingw/include \
                               LIBRARY_PATH=/mingw/lib

Congratulations and hurrah.