Some extensive changes to Makefile in cpp module