update/refactor makefile