Added -M flag to various outputs
Updated build system.