build out of source dir

With this patch, we can build in or out of the source directory.