Add build debug output flag

This PR solves issue #233 by introducing the option `DEBUG_OUTPUT` (which, by default, is `OFF`).