[RFC][PATCH 3/8] perf: Build libparsevent.a
From: Steven Rostedt
Date: Fri Aug 05 2011 - 17:13:14 EST
From: Steven Rostedt <srostedt@xxxxxxxxxx>
Have building perf also build libparsevent.a. Currently, perf does
not use the code within libparsevent.a, but it soon will.
Signed-off-by: Steven Rostedt <rostedt@xxxxxxxxxxx>
---
tools/perf/Makefile | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index ebf38c1..0ea25c9 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -1,5 +1,6 @@
ifeq ("$(origin O)", "command line")
OUTPUT := $(O)/
+ COMMAND_O := O=$(O)
endif
# The default target of this Makefile is...
@@ -187,6 +188,9 @@ $(OUTPUT)python/perf.so: $(PYRF_OBJS)
SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH))
+EVENT_PARSE_DIR = ../lib/events/
+LIBPARSEVENT = $(OUTPUT)$(EVENT_PARSE_DIR)libparsevent.a
+
#
# Single 'perf' binary right now:
#
@@ -286,6 +290,7 @@ LIB_H += util/cpumap.h
LIB_H += util/top.h
LIB_H += $(ARCH_INCLUDE)
LIB_H += util/cgroup.h
+LIB_H += $(EVENT_PARSE_DIR)event-parse.h
LIB_OBJS += $(OUTPUT)util/abspath.o
LIB_OBJS += $(OUTPUT)util/alias.o
@@ -663,7 +668,7 @@ $(OUTPUT)perf.o: perf.c $(OUTPUT)common-cmds.h $(OUTPUT)PERF-CFLAGS
'-DPERF_HTML_PATH="$(htmldir_SQ)"' \
$(ALL_CFLAGS) -c $(filter %.c,$^) -o $@
-$(OUTPUT)perf: $(OUTPUT)perf.o $(BUILTIN_OBJS) $(PERFLIBS)
+$(OUTPUT)perf: $(OUTPUT)perf.o $(BUILTIN_OBJS) $(PERFLIBS) $(LIBPARSEVENT)
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) $(ALL_LDFLAGS) $(OUTPUT)perf.o \
$(BUILTIN_OBJS) $(LIBS) -o $@
@@ -756,6 +761,10 @@ $(sort $(dir $(DIRECTORY_DEPS))):
$(LIB_FILE): $(LIB_OBJS)
$(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(LIB_OBJS)
+# libparsevent.a
+$(LIBPARSEVENT):
+ make -C $(EVENT_PARSE_DIR) $(COMMAND_O) libparsevent.a
+
help:
@echo 'Perf make targets:'
@echo ' doc - make *all* documentation (see below)'
--
1.7.5.4
--
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/