Improve generated makefiles