[PATCH 11/30] perf build: Add ui objects building

From: Jiri Olsa
Date: Fri Jan 02 2015 - 10:41:31 EST


Move the ui objects building under build framework
to be included in the libperf build object.

Signed-off-by: Jiri Olsa <jolsa@xxxxxxxxxx>
Cc: Alexis Berlemont <alexis.berlemont@xxxxxxxxx>
Cc: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
Cc: Borislav Petkov <bp@xxxxxxxxx>
Cc: Corey Ashford <cjashfor@xxxxxxxxxxxxxxxxxx>
Cc: David Ahern <dsahern@xxxxxxxxx>
Cc: Frederic Weisbecker <fweisbec@xxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxxxxx>
Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
Cc: Paul Mackerras <paulus@xxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Stephane Eranian <eranian@xxxxxxxxxx>
---
tools/perf/Build | 1 +
tools/perf/Makefile.perf | 10 ----------
tools/perf/config/Makefile | 1 +
tools/perf/ui/Build | 8 ++++++++
4 files changed, 10 insertions(+), 10 deletions(-)
create mode 100644 tools/perf/ui/Build

diff --git a/tools/perf/Build b/tools/perf/Build
index 170e4563bb24..e84ced325147 100644
--- a/tools/perf/Build
+++ b/tools/perf/Build
@@ -34,3 +34,4 @@ CFLAGS_builtin-timechart.o += $(paths)

libperf-y += util/
libperf-y += arch/
+libperf-y += ui/
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 92a1b2538ccd..5f46fe25d725 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -327,13 +327,6 @@ LIB_H += util/data.h
LIB_H += util/kvm-stat.h
LIB_H += util/thread-stack.h

-LIB_OBJS += $(OUTPUT)ui/setup.o
-LIB_OBJS += $(OUTPUT)ui/helpline.o
-LIB_OBJS += $(OUTPUT)ui/progress.o
-LIB_OBJS += $(OUTPUT)ui/util.o
-LIB_OBJS += $(OUTPUT)ui/hist.o
-LIB_OBJS += $(OUTPUT)ui/stdio/hist.o
-
PERFLIBS = $(LIB_FILE) $(LIBAPIKFS) $(LIBTRACEEVENT)

# We choose to avoid "if .. else if .. else .. endif endif"
@@ -492,9 +485,6 @@ $(OUTPUT)%.o: %.S
$(OUTPUT)%.s: %.S
$(QUIET_CC)$(CC) -o $@ -E $(CFLAGS) $<

-$(OUTPUT)ui/setup.o: ui/setup.c $(OUTPUT)PERF-CFLAGS
- $(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) -DLIBDIR='"$(libdir_SQ)"' $<
-
$(OUTPUT)ui/browser.o: ui/browser.c $(OUTPUT)PERF-CFLAGS
$(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) -DENABLE_SLFUTURE_CONST $<

diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index f71e16008ee3..0da571594a5b 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -837,3 +837,4 @@ $(call detected_var,infodir_SQ)
$(call detected_var,mandir_SQ)
$(call detected_var,ETC_PERFCONFIG_SQ)
$(call detected_var,prefix_SQ)
+$(call detected_var,LIBDIR)
diff --git a/tools/perf/ui/Build b/tools/perf/ui/Build
new file mode 100644
index 000000000000..077b6a448ddc
--- /dev/null
+++ b/tools/perf/ui/Build
@@ -0,0 +1,8 @@
+libperf-y += setup.o
+libperf-y += helpline.o
+libperf-y += progress.o
+libperf-y += util.o
+libperf-y += hist.o
+libperf-y += stdio/hist.o
+
+CFLAGS_setup.o += -DLIBDIR="BUILD_STR($(LIBDIR))"
--
1.9.3

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