add makefile and move main cfg files to templates
add build update rebuild to Makefile