The application uses LuaJIT 2.1 and 5.2 compatibility, which needs to be installed. The easiest way to install it on Linux is explained below and it should be similar on mac.
-
Run the command
git clone http://luajit.org/git/luajit −2.0.git -
Change to version 2.1 by running the following command in the luajit-folder just created
git checkout v2.1 -
Open the file luajit-2.0/src/Makefile and exchange the line
#XCFLAGS+= −DLUAJIT ENABLE LUA52COMPAT with XCFLAGS+= −DLUAJIT ENABLE LUA52COMPAT -
Make and install the program sudo make & make install
-
Download MAD by cloning the git repository
git clone http://github.com/martinvalen/parselang -
Make LPEG
make lpeg
make linux [LUADIR=/path/to/luajit/include]
or
make macosx [LUADIR=/path/to/luajit/include]
LUADIR defaults to usr/local/include/luajit-2.1. If you get an er- ror fatal error: lua.h: No such file or directory, your LUADIR is wrong. Your copy of MAD should now be ready to run!