From 29e8d65ae49ef1c9435fb861b1fc55ef2305d7ed Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Tue, 9 Sep 2014 14:15:18 +0200 Subject: build: Don't overwrite CC variable Don't reset the variable CC in the Makefile, but set it to gcc by default (can be overriden when e.g. compiling with `make CC=clang'). This way we can also have non-verbose compiles with compilers other than gcc. Furthermore make sure that the CC variable is also respected for LD. Signed-off-by: Tobias Klauser --- Cmds | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'Cmds') diff --git a/Cmds b/Cmds index 247a972..2296e76 100644 --- a/Cmds +++ b/Cmds @@ -1,13 +1,14 @@ -# Be quite and do not echo the cmd +# Be quiet and do not echo the cmd Q = @ # Try to use bash as shell for make SHELL := $(shell if [ -x /bin/bash ]; then echo /bin/bash; else echo /bin/sh; fi) -# GCC related stuff -LD = $(Q)echo -e " LD\t$@" && $(CCACHE) $(CROSS_COMPILE)gcc -CCNQ = $(CCACHE) $(CROSS_COMPILE)gcc -CC = $(Q)echo -e " CC\t$<" && $(CCNQ) +# Compiler related stuff +CC = gcc +LD = $(Q)echo -e " LD\t$@" && $(CCACHE) $(CROSS_COMPILE)$(CC) +CCNQ = $(CCACHE) $(CROSS_COMPILE)$(CC) +CCQ = $(Q)echo -e " CC\t$<" && $(CCNQ) ifeq ($(DEBUG), 1) STRIP = $(Q)true else -- cgit v1.2.3-54-g00ecf