Merge pull request #6 from coderhaoxin/fix

refactor isGenerator; fix Makefile