tools power x86_energy_perf_policy: Override CFLAGS assignments and add LDFLAGS to...
authorJiri Olsa <jolsa@kernel.org>
Fri, 12 Oct 2018 11:20:16 +0000 (07:20 -0400)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 28 Dec 2018 19:33:07 +0000 (16:33 -0300)
So user could specify outside CFLAGS/LDFLAGS values.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Herton Krzesinski <herton@redhat.com>
Cc: Len Brown <len.brown@intel.com>
Link: https://lkml.kernel.org/r/20181212102537.25902-2-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/power/x86/x86_energy_perf_policy/Makefile

index f4534fb8b95158a5fb1e789739e32d754b0b1ae4..ae7a0e09b72276219f302517a7b1e0660ded3fcb 100644 (file)
@@ -9,12 +9,12 @@ ifeq ("$(origin O)", "command line")
 endif
 
 x86_energy_perf_policy : x86_energy_perf_policy.c
-CFLAGS +=      -Wall
-CFLAGS +=      -DMSRHEADER='"../../../../arch/x86/include/asm/msr-index.h"'
+override CFLAGS +=     -Wall
+override CFLAGS +=     -DMSRHEADER='"../../../../arch/x86/include/asm/msr-index.h"'
 
 %: %.c
        @mkdir -p $(BUILD_OUTPUT)
-       $(CC) $(CFLAGS) $< -o $(BUILD_OUTPUT)/$@
+       $(CC) $(CFLAGS) $< -o $(BUILD_OUTPUT)/$@ $(LDFLAGS)
 
 .PHONY : clean
 clean :