Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Building Max

To keep the development environment clean, builds are done on the build/ directory. It doesn't come included on the repository, so you can create it with mkdir build. For the following build-related pages, it is assumed you're on the build/ directory.

Debug build

A debug build allows you to use the debug macros.

To set up the build directory for a development build, run:

cmake -DMAX_DEBUG=ON ..

You can compile as usual (with make), but to speed up the compilation process, you can split the compilation tasks across threads with the -j flag. If your computer has 8 threads, the command would be: make -j8.

Note: The command nproc outputs your processor's thread count.

Release build

Release builds don't contain any debug symbols and are more optimized, resulting in smaller, faster binaries. It is recommended that for distributing Max, it is built in release mode.

Linux

To set up the build directory for a release build, run:

cmake ..

To compile, run:

make

Windows

To be determined