-
Notifications
You must be signed in to change notification settings - Fork 0
bji/libmame
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This is the libmame project. It is a fork of the official MAME source code that adds support for building a library that adheres to the libmame API. The libmame API is well documented in a header file at src/libmame/libmame.h. To build: (Linux) make BUILD_LIBMAME=1 libmame - The resulting shared object library will be obj/posix{64}/libmame.so - The header file is src/libmame/libmame.h - You can build a static version of the library too: make BUILD_LIBMAME=1 STATIC=1 libmame in which case the static library will be at obj/posix{64}s/libmame.a (Windows) - Install MingW compiler; an extremely good choice is the compiler available from the Development Tools section of mamedev.org - Ensure that you have pthreads-w64 installed; NOTE that if you installed the MingW compiler from mamedev.org, you will have to additionally extract the contents of the pthreads-w64 ZIP file and store them in the x64_64-w64-mingw32 folder (I am not sure why MAME ships its build tools with pthreads-w64 present but not unzipped, but there you have it). - From a Windows CMD line, run: make BUILD_LIBMAME=1 libmame - The resulting DLL will be obj/posix{64}/libmame.dll - The header file is src/libmame/libmame.h - You can build a static version of the library too: make BUILD_LIBMAME=1 STATIC=1 libmame in which case the static library will be at obj/posix{64}/libmame.a (Mac OSX) - You'll need to have Xcode installed and its command-line tools - libmame is in the Macports system so if you have Macports installed you can simply issue this command: sudo port install libmame This will install libmame.dylib and libmame.a in /opt/local/lib, and libmame.h in /opt/local/include/libmame - Alternately, you can build libmame yourself: make BUILD_LIBMAME=1 LDFLAGS_EXTRA="-Wl,-current_version,1.0.0 -Wl,-install_name,<wherever_you_expect_to_install_it>" libmame - The resulting dylib will be obj/posix{64}/libmame.dylib - The header file is src/libmame/libmame.h - You can build a static version of the library too: make BUILD_LIBMAME=1 STATIC=1 libmame in which case the static library will be at obj/posix{64}/libmame.a - Note that the libmame makefiles assume that the kernel architecture is the same as the runtime architecture; it might be necessary to set BIGENDIAN and PTR64 manually in some circumstances.