Reworking source tree and Makefiles for out of tree builds.