converting Makefile to C++