refactor makefile