Select your language

Here are some instructions for building MAME from source.

Windows

TODO

MacOS

TODO

Linux and other Unix variants

If you decide to build MAME from source code in Linux, you should probably directly use the git repository on Github since bugs are corrected very quickly (and new ones are as quickly introduced ...).

Version 0.210 and higher

You need

  • gcc / gcc-c++ version 7 or higher
  • git
  • make
  • Development package of alsa
  • Development package of gconf2
  • Development package of gtk2
  • Development package of the SDL2 library
  • Development package of the SDL2_ttf library
  • Development package of the Qt5Core library
  • Development package of Pulseaudio (since 0.230)

Use git to clone the repository to your local drive:

git clone https://github.com/mamedev/mame.git

Ubuntu

Ubuntu users need to make use of the apt-get command or check the software repository tools.

For Ubuntu 18.04 and newer, the following packages are required:

sudo apt install git
sudo apt install qt5-default
sudo apt install libsdl2-ttf-dev
sudo apt install libfontconfig1-dev
sudo apt install python

This set of package installations also imports gcc/gcc-c++ and make. You may put all package names in one single apt install call.

openSUSE

For an openSUSE installation, either use YaST or (if not already installed) follow this path:

sudo zypper install git-core
sudo zypper install gcc-c++
sudo zypper install libqt5-qtbase-devel
sudo zypper install xorg-x11-devel
sudo zypper install alsa-devel
sudo zypper install libSDL2_ttf-devel
sudo zypper install fontconfig-devel
sudo zypper install python-xml
sudo zypper install libpulse-devel

Compiling

You can just build the complete MAME package by running make.

If you only want the TI systems to be included, you may specify them in the command line:

make -j4 SOURCES=src/mame/drivers/ti99_4x.cpp,src/mame/drivers/ti99_4p.cpp,src/mame/drivers/ti99_8.cpp,src/mame/drivers/geneve.cpp,src/mame/drivers/ti99_2.cpp REGENIE=1 TOOLS=1

REGENIE should be specified, since the GENie project generator tool is used for building. TOOLS will generate the additional helpers imgtool, chdman, and others. You probably don't need them if you use TIImageTool.

The -j4 switch is used to start 4 build jobs concurrently, which speeds up the compilation considerably. You must make sure that your build environment is not too old. GCC should be at least version 7. You can also use clang by

OVERRIDE_CC=clang OVERRIDE_CXX=clang++

When you want to get a current version, use the git pull command. Cleaning the build environment is optional, but if you experience problems when compiling, try to clean first.

git pull
make clean

After compiling has finished, you should have a freshly built mame64 executable file.

We use cookies on our website. All of these cookies are essential for the operation of the site. They are only used on this site and not transmitted to any third party. None of them are Tracking Cookies, and they do not serve to analyze your behavior.