tools lib: Allow external definition of CC, AR and LD
authorDavid Carrillo-Cisneros <davidcc@google.com>
Sun, 27 Aug 2017 07:54:39 +0000 (00:54 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 28 Aug 2017 19:44:45 +0000 (16:44 -0300)
Use already defined values for CC, AR and LD when available.

Signed-off-by: David Carrillo-Cisneros <davidcc@google.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Paul Turner <pjt@google.com>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/20170827075442.108534-4-davidcc@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/lib/api/Makefile

index eb6e0b3..2538675 100644 (file)
@@ -8,9 +8,9 @@ srctree := $(patsubst %/,%,$(dir $(srctree)))
 #$(info Determined 'srctree' to be $(srctree))
 endif
 
-CC = $(CROSS_COMPILE)gcc
-AR = $(CROSS_COMPILE)ar
-LD = $(CROSS_COMPILE)ld
+CC ?= $(CROSS_COMPILE)gcc
+AR ?= $(CROSS_COMPILE)ar
+LD ?= $(CROSS_COMPILE)ld
 
 MAKEFLAGS += --no-print-directory