Generalize makefile