Overriding `CC` and `CXX` variables in makefiles
问题 I have a master makefile, which contains generic settings, and a child makefile that has project specific settings. From my other question about overriding variables in a makefile, I learned that I can use the following code in my master makefile: CC ?= avr-gcc CXX ?= avr-g++ In the child makefile, I use colorgcc and override these variables: CC ?= color-avr-gcc CXX ?= color-avr-g++ Everything works. But, if I remove the above lines from my child makefile, make starts using gcc and g++