The proper variable to use for the C++ compiler is $(CXX). Also, when linking objects, $(LDFLAGS) should be used.