Outsource generated files into build directory

Still doesn't work, though. I'll do some additional cleanup and
debugging to see whether it works at least if I include the
implementation into the header file.