Makefile restructured