Just noticed that this kind of constructs chokes GNU Make 3.82
test x$CC = x && CC = gcc
It can be replaced by
CC ?= gcc
Which can be written in a long form:
ifeq ($(origin CC), undefined) CC= gcc endif
The other thing that is making this version of GNU Make choke are leading spaces in multi-line rules. Please, use tabs when writing Makefiles.