Enhance makefile

There were some bugs in `Makefile`, I corrected them and enhanced the `Makefile` by doing some things listed in commits.