Added a Python script to the cpp/ directory for regenerating the Makefile