diff options
Diffstat (limited to 'tools/perf/Makefile')
-rw-r--r-- | tools/perf/Makefile | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile index 46150ab073c7..af0e5d64a9f7 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile | |||
@@ -149,7 +149,7 @@ endif | |||
149 | 149 | ||
150 | ### --- END CONFIGURATION SECTION --- | 150 | ### --- END CONFIGURATION SECTION --- |
151 | 151 | ||
152 | BASIC_CFLAGS = -Iutil/include -Iarch/$(ARCH)/include -I$(OUTPUT)/util -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE | 152 | BASIC_CFLAGS = -Iutil/include -Iarch/$(ARCH)/include -I$(OUTPUT)/util -I$(EVENT_PARSE_DIR) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE |
153 | BASIC_LDFLAGS = | 153 | BASIC_LDFLAGS = |
154 | 154 | ||
155 | # Guard against environment variables | 155 | # Guard against environment variables |
@@ -179,7 +179,15 @@ $(OUTPUT)python/perf.so: $(PYRF_OBJS) $(PYTHON_EXT_SRCS) $(PYTHON_EXT_DEPS) | |||
179 | SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) | 179 | SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) |
180 | 180 | ||
181 | EVENT_PARSE_DIR = ../lib/traceevent/ | 181 | EVENT_PARSE_DIR = ../lib/traceevent/ |
182 | LIBTRACEEVENT = $(OUTPUT)$(EVENT_PARSE_DIR)libtraceevent.a | 182 | |
183 | ifeq ("$(origin O)", "command line") | ||
184 | EP_PATH=$(OUTPUT)/ | ||
185 | else | ||
186 | EP_PATH=$(EVENT_PARSE_DIR)/ | ||
187 | endif | ||
188 | |||
189 | LIBPARSEVENT = $(EP_PATH)libtraceevent.a | ||
190 | EP_LIB := -L$(EP_PATH) -ltraceevent | ||
183 | 191 | ||
184 | # | 192 | # |
185 | # Single 'perf' binary right now: | 193 | # Single 'perf' binary right now: |
@@ -295,7 +303,6 @@ LIB_H += util/hist.h | |||
295 | LIB_H += util/thread.h | 303 | LIB_H += util/thread.h |
296 | LIB_H += util/thread_map.h | 304 | LIB_H += util/thread_map.h |
297 | LIB_H += util/trace-event.h | 305 | LIB_H += util/trace-event.h |
298 | LIB_H += util/trace-parse-events.h | ||
299 | LIB_H += util/probe-finder.h | 306 | LIB_H += util/probe-finder.h |
300 | LIB_H += util/dwarf-aux.h | 307 | LIB_H += util/dwarf-aux.h |
301 | LIB_H += util/probe-event.h | 308 | LIB_H += util/probe-event.h |
@@ -358,7 +365,6 @@ LIB_OBJS += $(OUTPUT)util/pmu-bison.o | |||
358 | LIB_OBJS += $(OUTPUT)util/trace-event-read.o | 365 | LIB_OBJS += $(OUTPUT)util/trace-event-read.o |
359 | LIB_OBJS += $(OUTPUT)util/trace-event-info.o | 366 | LIB_OBJS += $(OUTPUT)util/trace-event-info.o |
360 | LIB_OBJS += $(OUTPUT)util/trace-event-scripting.o | 367 | LIB_OBJS += $(OUTPUT)util/trace-event-scripting.o |
361 | LIB_OBJS += $(OUTPUT)util/trace-parse-events.o | ||
362 | LIB_OBJS += $(OUTPUT)util/svghelper.o | 368 | LIB_OBJS += $(OUTPUT)util/svghelper.o |
363 | LIB_OBJS += $(OUTPUT)util/sort.o | 369 | LIB_OBJS += $(OUTPUT)util/sort.o |
364 | LIB_OBJS += $(OUTPUT)util/hist.o | 370 | LIB_OBJS += $(OUTPUT)util/hist.o |
@@ -402,7 +408,7 @@ BUILTIN_OBJS += $(OUTPUT)builtin-kvm.o | |||
402 | BUILTIN_OBJS += $(OUTPUT)builtin-test.o | 408 | BUILTIN_OBJS += $(OUTPUT)builtin-test.o |
403 | BUILTIN_OBJS += $(OUTPUT)builtin-inject.o | 409 | BUILTIN_OBJS += $(OUTPUT)builtin-inject.o |
404 | 410 | ||
405 | PERFLIBS = $(LIB_FILE) | 411 | PERFLIBS = $(LIB_FILE) $(LIBPARSEVENT) |
406 | 412 | ||
407 | # Files needed for the python binding, perf.so | 413 | # Files needed for the python binding, perf.so |
408 | # pyrf is just an internal name needed for all those wrappers. | 414 | # pyrf is just an internal name needed for all those wrappers. |
@@ -699,7 +705,7 @@ $(OUTPUT)perf.o: perf.c $(OUTPUT)common-cmds.h $(OUTPUT)PERF-CFLAGS | |||
699 | '-DPERF_HTML_PATH="$(htmldir_SQ)"' \ | 705 | '-DPERF_HTML_PATH="$(htmldir_SQ)"' \ |
700 | $(ALL_CFLAGS) -c $(filter %.c,$^) -o $@ | 706 | $(ALL_CFLAGS) -c $(filter %.c,$^) -o $@ |
701 | 707 | ||
702 | $(OUTPUT)perf: $(OUTPUT)perf.o $(BUILTIN_OBJS) $(PERFLIBS) $(LIBTRACEEVENT) | 708 | $(OUTPUT)perf: $(OUTPUT)perf.o $(BUILTIN_OBJS) $(PERFLIBS) |
703 | $(QUIET_LINK)$(CC) $(ALL_CFLAGS) $(ALL_LDFLAGS) $(OUTPUT)perf.o \ | 709 | $(QUIET_LINK)$(CC) $(ALL_CFLAGS) $(ALL_LDFLAGS) $(OUTPUT)perf.o \ |
704 | $(BUILTIN_OBJS) $(LIBS) -o $@ | 710 | $(BUILTIN_OBJS) $(LIBS) -o $@ |
705 | 711 | ||
@@ -806,7 +812,7 @@ $(LIB_FILE): $(LIB_OBJS) | |||
806 | $(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(LIB_OBJS) | 812 | $(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(LIB_OBJS) |
807 | 813 | ||
808 | # libparsevent.a | 814 | # libparsevent.a |
809 | $(LIBTRACEEVENT): | 815 | $(LIBPARSEVENT): |
810 | make -C $(EVENT_PARSE_DIR) $(COMMAND_O) libtraceevent.a | 816 | make -C $(EVENT_PARSE_DIR) $(COMMAND_O) libtraceevent.a |
811 | 817 | ||
812 | help: | 818 | help: |