updated the implementation of Makefile