Get the build system working, and flush the output

Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>