rework system to generate makefile