0;136;0c Bulding libmame

Building libmame


Assuming that you have a libmame-patched version of the MAME source in a directory called libmame, you can build the libmame library in either static or dynamic form. The instructions differ slightly on Linux versus Windows.

Please note that a build from scratch can take a long time - many minutes to tens of minutes on older systems. You can improve performance by passing make a "-j N" argument where N is the number of CPU cores that you have, plus one.

The resulting shared object library, libmame.so (or libmame.dll on Windows), will be in the obj/posix/mame directory. Note that if you are building on a 64-bit system, the resulting library will be 64-bit and will be in a subdirectory called mame64 instead of mame.

You will find the libmame header file at src/libmame/libmame.h.

If you would like to add debugging symbols, add the option DEBUG=1 to the make command line. If you would like to build a static library, libmame.a, add the option STATIC=1 to the make command line. Note that both of these options will result in extra suffixes being added to the mame subdirectory of obj in which the libmame.a file is found.

Note also that the static libmame.a is not a C library, it is C++, and must be linked against using a C++ compiler; so pure C programs can only link against the shared object libmame library, not the static one.

Linux Build Instructions

Prerequisites:

To build libmame, simply cd into the libmame directory and issue this command:

make BUILD_LIBMAME=1 libmame

Windows Build Instructions

Prerequisites:

You must add these paths to your PATH variable:

Now cd into the libmame source directory and build libmame with this command:

make BUILD_LIBMAME=1 libmame


This page Copyright 2011 Bryan Ischo.