Difference between revisions of "Building MAME"

From Ninerpedia
Jump to navigation Jump to search
m (openSUSE)
Line 73: Line 73:
  
 
  make SUBTARGET=mess -j4 TOOLS=1 OVERRIDE_CC=gcc-5 OVERRIDE_CXX=g++-5
 
  make SUBTARGET=mess -j4 TOOLS=1 OVERRIDE_CC=gcc-5 OVERRIDE_CXX=g++-5
 +
 +
=== Compiling only for TI family ===
 +
 +
Since MAME 0.174 you can compile a system-specific version of MAME, which means you can throw out all unneeded drivers. You just have to provide the path names of the drivers which you are interested in:
 +
 +
  make -j4 TOOLS=1 OVERRIDE_CC=gcc-5 OVERRIDE_CXX=g++-5 SOURCES=src/mame/drivers/ti99_4x.cpp,src/mame/drivers/ti99_8.cpp,src/mame/drivers/geneve.cpp,src/mame/drivers/ti99_4p.cpp REGENIE=1
 +
 +
The REGENIE=1 setting is important so that the build scripts are automatically changed.
  
 
[[Category:MESS]]
 
[[Category:MESS]]

Revision as of 19:40, 28 May 2016

Here are some instructions for building MESS from source.

Windows

TODO

OSX

TODO

Linux and other Unix variants

If you decide to build MESS 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.171 and higher

You need

  • gcc / gcc-c++ version 5
  • 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

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 15.10 and newer, the following packages are required:

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

This set of package installations also imports gcc/gcc-c++ and make.

openSUSE

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

sudo zypper install git-core
sudo zypper install gcc5-c++ 
sudo zypper install libqt5-qtbase-devel
sudo zypper install xorg-x11-devel
sudo zypper install alsa-devel
sudo zypper install libSDL2_ttf-devel

Compiling

You can just build the complete MAME package by running make; it includes the whole MESS emulator. If you only want the MESS part, use

make SUBTARGET=mess

For a 64-bit environment you may add PTR64=1, but it should be automatically set when you compile it on such a machine. For a quad-core machine, you can greatly speed up the compile process with -j4 (start 4 jobs).

make SUBTARGET=mess -j4

Some systems use gcc 4.8; you must upgrade to gcc 4.9 at least; better even gcc 5. Since gcc5 may co-exist with gcc 4.x by offering a special gcc-5 command, you have to explicitly specify that you want to use gcc 5 by

make SUBTARGET=mess -j4 OVERRIDE_CC=gcc-5 OVERRIDE_CXX=g++-5

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 SUBTARGET=mess 
make SUBTARGET=mess -j4 OVERRIDE_CC=gcc-5 OVERRIDE_CXX=g++-5

Now you should have a freshly built mess executable file. Unlike previous versions, the tools like imgtool or chdman are not included. If your want to get the tools (chdman, imgtool), just specify "TOOLS=1" to make:

make SUBTARGET=mess -j4 TOOLS=1 OVERRIDE_CC=gcc-5 OVERRIDE_CXX=g++-5

Compiling only for TI family

Since MAME 0.174 you can compile a system-specific version of MAME, which means you can throw out all unneeded drivers. You just have to provide the path names of the drivers which you are interested in:

 make -j4 TOOLS=1 OVERRIDE_CC=gcc-5 OVERRIDE_CXX=g++-5 SOURCES=src/mame/drivers/ti99_4x.cpp,src/mame/drivers/ti99_8.cpp,src/mame/drivers/geneve.cpp,src/mame/drivers/ti99_4p.cpp REGENIE=1

The REGENIE=1 setting is important so that the build scripts are automatically changed.