# I. Preparing compile utilities

- create a root directory for compile utilities; generally, this is called mingw
- extract official MAME Development Tools mingw-mame-20100102.exe into your mingw directory

# II. Preparing official MAME source

- create a root directory for mame source code; generally, this is called mamesrc
- extract official MAME source to mamesrc
- extract official MAME source diff to mamesrc, when intermediate updates are available

- File List -
[MinGW] [mingw64-w32] [bin] [mingw64-w64] [bin] ... [mamesrc] [src] [build] [emu] makefile 0136u1.diff 0136u2.diff

- apply official patch:
  D:\mamesrc>patch -p0 -E <0136u1.diff
  D:\mamesrc>patch -p0 -E <0136u2.diff
  ...
- extract MAME Plus! source diff (EXACTLY THE SAME VERSION INCLUDING INTERMEDIATE UPDATES AS OFFICIAL MAME) on top of mamesrc

- File List -
[MinGW] ... [mamesrc] [src] makefile config.def mkgcc-w32.cmd mkgcc-w64.cmd

# III. Compile

- 32-bit
  Edit "mkgcc-w32.cmd" file, modify PATH to your mingw directory:
  set PATH=D:\MinGW\mingw64-w32\bin;%PATH%
  Run "mkgcc-w32.cmd" file to compile. warnings are expected:
  D:\mamesrc>mkgcc-w32.cmd
  D:\mamesrc>make
- 64-bit
  Edit "mkgcc-w64.cmd" file, modify PATH to your mingw directory:
  set PATH=D:\MinGW\mingw64-w64\bin;%PATH%
  Run "mkgcc-w64.cmd" file to compile. warnings are expected:
  D:\mamesrc>mkgcc-w64.cmd
  D:\mamesrc>make