The Makefile is not prepared to be used from inside a tool. It's thought to be used from a Linux console. There it's rather simple to set those names, simply call 'CC=gcc CXX=g++ make' and everything works as expected.
You can simply add those two settings as first lines in the makefile (CC=gcc and CXX=g++, both without semicolon or so). It's not part of the makefile in order to allow the user to override those values, moreover the mentioned values are defaults on Linux systems, which is why the makefile also works with just 'make'.