update makefile to use templating