?= is for conditional assignment, i.e. if it is not yet defined, then only assign the value else to leave it. In your example, if you give make COMPILER=arm-none-gcc , then arm-none-gcc used as a compiler than g ++ by default if you just type make and g ++ as an option for COMPILER. If = used, then COMPILER will be assigned a value when and where assignments are encountered. for more information on files that you can reference Understanding makefile for beginners
source share