Refactor Makefile.