abstract compile stuff into Makefile