This directory contains a Makefile for building an NSFPlay library.
This is intended to be built on Windows with MSYS2, Linux, or MacOS.
The library is just the core NSF/NSFe/M3U parser/emulator/renderer. It does not have routines/methods for creating a GUI, playing audio to devices, saving configuration options to files, and so on.
Currently experimental, your mileage may vary.
Also contains an example application for converting NSF(e) tracks to WAV files.
cd into this directory and run make:
cd contrib
makeBy default, it builds libnsfplay.a and libnsfplay.so, using
your default C and C++ compilers, in a debug mode.
Run make release to make an optimized build, and make release_debug
to perform an optimized build with debug info.
release and release_debug builds are always from-scratch, debug
builds use the usual Make semantics for determining what needs building.
To pass additional CFLAGS and CXXFLAGS, use CFLAGS_EXTRA and
CXXFLAGS_EXTRA, for example:
make CFLAGS_EXTRA="-Wextra" CXXFLAGS_EXTRA="-Wextra"To build libraries using different extensions, use
STATIC_EXT and DYNLIB_EXT. Change prefixes with
STATIC_PREFIX and DYNLIB_PREFIX.
Example: To cross-compile a Windows DLL just named nsfplay.dll, in the release config:
make CC=i686-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ DYNLIB_PREFIX= DYNLIB_EXT=.dll releaseThis Makefile supports installing the library and header files via make install
install uses the following variables:
DESTDIRto install to a staging directory.PREFIXto change installation prefix- default:
/usr/local
- default:
LIBDIRto set the library installation directory- default:
$(PREFIX)/lib - setting
LIBDIRdirectly ignoresDESTDIRandPREFIX
- default:
INCDIRto set the header installation directory- default:
$(PREFIX)/include/nsfplay - setting
INCDIRdirectly ignoresDESTDIRandPREFIX
- default: