   Building MAME32

1. GNU Development Tools

   a) Get the latest gcc, ld, binutils, libbfd, mingw-runtime and w32api
      from http://www.ming.org or http://mingw.sourceforge.net.

      The latest versions as of April 2001 are:

      binutils-2.10.91-20010114.zip
      gcc-2.95.2-3.zip
      ld-2.10.91-20010126.zip
      libbfd-2.10.91-20010121.zip
      mingw-runtime-0.5-20010221.tar.gz
      w32api-0.5.1.tar.gz

   b) Extract all the archives into a directory. Extract w32api last.
      The w32api package has a header file, include/excpt.h, which will
      overwrite the file from mingw-runtime.

   c) Add the bin directory to your path.

2. Gnu make

   a) Get the latest gnu make. I've made a Win32 exe available at:
      http://www.classicgaming.com/mame32/make-3.79.1.exe.zip

   b) Extract make.exe and add it to your path.

3. Netwide Assembler (NASM)
   
   a) Get nasm from http://www.cryogen.com/Nasm

   b) Put nasmw.exe in your path.

4. zlib data compression library

   a) Get the zlib source archive:
      ftp://ftp.freesoftware.com/pub/infozip/zlib/zlib113.zip

   b) Extract the archive into a directory.

   c) Get the Win32 import libs, zlib113adll.zip at:
      http://www.winimage.com/zLibDll

   d) Extract the archive into a directory.
      Can be the same directory as above.
      The static library is <zlib dir>/static32/zlibstat.lib

5. DirectX

   MAME32 requires the DirectX SDK include files and import
   libraries. The latest version is 8, but version 7 will work.

   a) Get and install the latest DirectX C++ SDK from Microsoft: 45MB
      http://msdn.microsoft.com/directx

      Or

       i) Get a zip of just the include files (850k) at:
          http://www.classicgaming.com/mame32/dx8include.zip
          Extract it to a directory. Don't overwrite the w32api header files.

      ii) Get the DirectX version 8 import libraries from:
          http://sites.netscape.net/ptrpck/dx8libs.zip
          and extract them to a lib directory.

   b) For version 8, there is a change needed for dinput.h due
      to a few type redefinitions which cause errors in gcc.
      Extract the following into your DirectX SDK dir:
      http://www.classicgaming.com/mame32/dx8includefix.zip

6. Environment

    Set up the environment variables for the paths to the include
    and lib directories for zlib and DirectX.
    The following is an example:

	Set C_INCLUDE_PATH=p:\lib\dx8\include;%C_INCLUDE_PATH%
	Set LIBRARY_PATH=p:\lib\dx8\lib;%LIBRARY_PATH%

	Set C_INCLUDE_PATH=p:\lib\zlib;%C_INCLUDE_PATH%
	Set LIBRARY_PATH=p:\lib\zlib\static32;%LIBRARY_PATH%

	Set C_INCLUDE_PATH=p:\lib\htmlhelp\include;%C_INCLUDE_PATH%
	Set LIBRARY_PATH=p:\lib\htmlhelp\lib;%LIBRARY_PATH%




