diff options
-rw-r--r-- | tools/perf/Makefile | 10 | ||||
-rw-r--r-- | tools/scripts/Makefile.include | 1 |
2 files changed, 10 insertions, 1 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile index 819102342985..46150ab073c7 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile | |||
@@ -178,6 +178,9 @@ $(OUTPUT)python/perf.so: $(PYRF_OBJS) $(PYTHON_EXT_SRCS) $(PYTHON_EXT_DEPS) | |||
178 | 178 | ||
179 | SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) | 179 | SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) |
180 | 180 | ||
181 | EVENT_PARSE_DIR = ../lib/traceevent/ | ||
182 | LIBTRACEEVENT = $(OUTPUT)$(EVENT_PARSE_DIR)libtraceevent.a | ||
183 | |||
181 | # | 184 | # |
182 | # Single 'perf' binary right now: | 185 | # Single 'perf' binary right now: |
183 | # | 186 | # |
@@ -301,6 +304,7 @@ LIB_H += util/cpumap.h | |||
301 | LIB_H += util/top.h | 304 | LIB_H += util/top.h |
302 | LIB_H += $(ARCH_INCLUDE) | 305 | LIB_H += $(ARCH_INCLUDE) |
303 | LIB_H += util/cgroup.h | 306 | LIB_H += util/cgroup.h |
307 | LIB_H += $(EVENT_PARSE_DIR)event-parse.h | ||
304 | 308 | ||
305 | LIB_OBJS += $(OUTPUT)util/abspath.o | 309 | LIB_OBJS += $(OUTPUT)util/abspath.o |
306 | LIB_OBJS += $(OUTPUT)util/alias.o | 310 | LIB_OBJS += $(OUTPUT)util/alias.o |
@@ -695,7 +699,7 @@ $(OUTPUT)perf.o: perf.c $(OUTPUT)common-cmds.h $(OUTPUT)PERF-CFLAGS | |||
695 | '-DPERF_HTML_PATH="$(htmldir_SQ)"' \ | 699 | '-DPERF_HTML_PATH="$(htmldir_SQ)"' \ |
696 | $(ALL_CFLAGS) -c $(filter %.c,$^) -o $@ | 700 | $(ALL_CFLAGS) -c $(filter %.c,$^) -o $@ |
697 | 701 | ||
698 | $(OUTPUT)perf: $(OUTPUT)perf.o $(BUILTIN_OBJS) $(PERFLIBS) | 702 | $(OUTPUT)perf: $(OUTPUT)perf.o $(BUILTIN_OBJS) $(PERFLIBS) $(LIBTRACEEVENT) |
699 | $(QUIET_LINK)$(CC) $(ALL_CFLAGS) $(ALL_LDFLAGS) $(OUTPUT)perf.o \ | 703 | $(QUIET_LINK)$(CC) $(ALL_CFLAGS) $(ALL_LDFLAGS) $(OUTPUT)perf.o \ |
700 | $(BUILTIN_OBJS) $(LIBS) -o $@ | 704 | $(BUILTIN_OBJS) $(LIBS) -o $@ |
701 | 705 | ||
@@ -801,6 +805,10 @@ $(sort $(dir $(DIRECTORY_DEPS))): | |||
801 | $(LIB_FILE): $(LIB_OBJS) | 805 | $(LIB_FILE): $(LIB_OBJS) |
802 | $(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(LIB_OBJS) | 806 | $(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(LIB_OBJS) |
803 | 807 | ||
808 | # libparsevent.a | ||
809 | $(LIBTRACEEVENT): | ||
810 | make -C $(EVENT_PARSE_DIR) $(COMMAND_O) libtraceevent.a | ||
811 | |||
804 | help: | 812 | help: |
805 | @echo 'Perf make targets:' | 813 | @echo 'Perf make targets:' |
806 | @echo ' doc - make *all* documentation (see below)' | 814 | @echo ' doc - make *all* documentation (see below)' |
diff --git a/tools/scripts/Makefile.include b/tools/scripts/Makefile.include index 87b55a729a5f..bde8521d56bb 100644 --- a/tools/scripts/Makefile.include +++ b/tools/scripts/Makefile.include | |||
@@ -1,5 +1,6 @@ | |||
1 | ifeq ("$(origin O)", "command line") | 1 | ifeq ("$(origin O)", "command line") |
2 | OUTPUT := $(O)/ | 2 | OUTPUT := $(O)/ |
3 | COMMAND_O := O=$(O) | ||
3 | endif | 4 | endif |
4 | 5 | ||
5 | ifneq ($(OUTPUT),) | 6 | ifneq ($(OUTPUT),) |