cleanup makefiles, use uniform error reporting