Split the TemplateNode makefile up into
seperate pieces so the makefile logic can
be shared between nodes
Test cases are now also using the new template
makefiles
Fixed some formatting in makefiles