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 --- Template | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Template') diff --git a/Template b/Template index 4978eed..fa574de 100644 --- a/Template +++ b/Template @@ -17,10 +17,10 @@ define TOOL_templ $(Q)$$(call RM,$$(DESTDIR)$$(SBINDIR)/$(1)) $(Q)$$(call RM,$$(DESTDIR)$$(MAN8DIR)/$(1).8.gz) $(1)/%.yy.o: $(1)/%.yy.c - $$(CC) $$(CFLAGS) -o $$@ -c $$< + $$(CCQ) $$(CFLAGS) -o $$@ -c $$< $(1)/%.tab.o: $(1)/%.tab.c - $$(CC) $$(CFLAGS) -o $$@ -c $$< + $$(CCQ) $$(CFLAGS) -o $$@ -c $$< $(1)/%.o: %.c $$(CHECK) $$(CFLAGS) $$(CHECKFLAGS) $$< - $$(CC) $$(CFLAGS) -o $(1)/$$(shell basename $$@) -c $$< + $$(CCQ) $$(CFLAGS) -o $(1)/$$(shell basename $$@) -c $$< endef -- cgit v1.2.3-54-g00ecf