optimize the auto make Makefile script