@Keltar's comment nailed it exactly: LINK=$CC
should be LINK=$(CC)
.
In make
's syntax, $()
is the proper way to deference a variable. The line LINK=$(CC)
means set the variable LINK
to whatever the CC
variable is set to. After that instruction, their values will be the same.