GCC=gcc EGCS=$(shell test -f /usr/bin/egcs && /bin/echo -n 1) ifeq ($(EGCS),1) GPPLINK=egcs GPP=egcs else GPP=g++ # Using g++ to link pulls libg++ even if the program does not need it GPPLINK=gcc endif