Fix/version makefile

Improve the way version.cpp is handled as per adam greens suggestion