Adapt core build system to allow building out-of-tree

Simply define `BUILDDIR` to where you would like build output to go.
2 files changed