decent makefile and build loop