Modularize makefile