Make has several predefined variables among which is CC
. Initially, it is set at cc
which is a symlink to the installed C compiler:
$ readlink -f `which cc`
/usr/bin/gcc-4.6
Also:
$ readlink -f `which c++`
/usr/bin/g++-4.6
You can change it if you want.
You can use make -p -f /dev/null
to get a list of all implicit rules and variables. I cannot show the output right now because I have a non-standard install and the output is not in English.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…