add Makefile, depart the file into several small ones