Moving libnuma check config into config/Makefile

Signed-off-by: Jiri Olsa <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Corey Ashford <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: Stephane Eranian <[email protected]>
Cc: Sam Ravnborg <[email protected]>
Cc: David Ahern <[email protected]>
---
 tools/perf/Makefile        |  9 +--------
 tools/perf/config/Makefile | 11 +++++++++++
 2 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index c1fef3d..07612be 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -547,14 +547,7 @@ ifeq ($(NO_PERF_REGS),0)
 endif
 
 ifndef NO_LIBNUMA
-       FLAGS_LIBNUMA = $(ALL_CFLAGS) $(ALL_LDFLAGS) -lnuma
-       ifneq ($(call try-cc,$(SOURCE_LIBNUMA),$(FLAGS_LIBNUMA),libnuma),y)
-               msg := $(warning No numa.h found, disables 'perf bench numa 
mem' benchmark, please install numa-libs-devel or libnuma-dev);
-       else
-               BASIC_CFLAGS += -DLIBNUMA_SUPPORT
-               BUILTIN_OBJS += $(OUTPUT)bench/numa.o
-               EXTLIBS += -lnuma
-       endif
+       BUILTIN_OBJS += $(OUTPUT)bench/numa.o
 endif
 
 ifdef ASCIIDOC8
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index 8c832f7..b559693 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -379,3 +379,14 @@ ifndef NO_BACKTRACE
                BASIC_CFLAGS += -DBACKTRACE_SUPPORT
        endif
 endif
+
+ifndef NO_LIBNUMA
+       FLAGS_LIBNUMA = $(ALL_CFLAGS) $(ALL_LDFLAGS) -lnuma
+       ifneq ($(call try-cc,$(SOURCE_LIBNUMA),$(FLAGS_LIBNUMA),libnuma),y)
+               msg := $(warning No numa.h found, disables 'perf bench numa 
mem' benchmark, please install numa-libs-devel or libnuma-dev);
+               NO_LIBNUMA := 1
+       else
+               BASIC_CFLAGS += -DLIBNUMA_SUPPORT
+               EXTLIBS += -lnuma
+       endif
+endif
-- 
1.7.11.7

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to