diff options
author | Borislav Petkov <bp@suse.de> | 2013-02-20 10:32:30 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-03-15 12:06:00 -0400 |
commit | 85c66be101e1847f0eb46dcb48d5738572129694 (patch) | |
tree | 96900665b0edb1466da7b82bd7ca619858f4ba4d /tools/perf/Makefile | |
parent | 9687b89d21999301ed386855c04b60d00ed1ec02 (diff) |
perf tools: Introduce tools/lib/lk library
This introduces the tools/lib/lk library, that will gradually have the
routines that now are used in tools/perf/ and other tools and that can
be shared.
Start by carving out debugfs routines for general use.
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/1361374353-30385-5-git-send-email-bp@alien8.de
[ committer note: Add tools/lib/lk/ to perf's MANIFEST so that its tarballs continue to build ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/Makefile')
-rw-r--r-- | tools/perf/Makefile | 34 |
1 files changed, 27 insertions, 7 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile index bb74c79cd16e..3dcd6273a90b 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile | |||
@@ -215,6 +215,7 @@ BASIC_CFLAGS = \ | |||
215 | -Iutil \ | 215 | -Iutil \ |
216 | -I. \ | 216 | -I. \ |
217 | -I$(TRACE_EVENT_DIR) \ | 217 | -I$(TRACE_EVENT_DIR) \ |
218 | -I../lib/ \ | ||
218 | -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE | 219 | -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE |
219 | 220 | ||
220 | BASIC_LDFLAGS = | 221 | BASIC_LDFLAGS = |
@@ -240,19 +241,28 @@ SCRIPT_SH += perf-archive.sh | |||
240 | grep-libs = $(filter -l%,$(1)) | 241 | grep-libs = $(filter -l%,$(1)) |
241 | strip-libs = $(filter-out -l%,$(1)) | 242 | strip-libs = $(filter-out -l%,$(1)) |
242 | 243 | ||
244 | LK_DIR = ../lib/lk/ | ||
243 | TRACE_EVENT_DIR = ../lib/traceevent/ | 245 | TRACE_EVENT_DIR = ../lib/traceevent/ |
244 | 246 | ||
247 | LK_PATH=$(LK_DIR) | ||
248 | |||
245 | ifneq ($(OUTPUT),) | 249 | ifneq ($(OUTPUT),) |
246 | TE_PATH=$(OUTPUT) | 250 | TE_PATH=$(OUTPUT) |
251 | ifneq ($(subdir),) | ||
252 | LK_PATH=$(OUTPUT)$(LK_DIR) | ||
253 | else | ||
254 | LK_PATH=$(OUTPUT) | ||
255 | endif | ||
247 | else | 256 | else |
248 | TE_PATH=$(TRACE_EVENT_DIR) | 257 | TE_PATH=$(TRACE_EVENT_DIR) |
249 | endif | 258 | endif |
250 | 259 | ||
251 | LIBTRACEEVENT = $(TE_PATH)libtraceevent.a | 260 | LIBTRACEEVENT = $(TE_PATH)libtraceevent.a |
252 | TE_LIB := -L$(TE_PATH) -ltraceevent | ||
253 | |||
254 | export LIBTRACEEVENT | 261 | export LIBTRACEEVENT |
255 | 262 | ||
263 | LIBLK = $(LK_PATH)liblk.a | ||
264 | export LIBLK | ||
265 | |||
256 | # python extension build directories | 266 | # python extension build directories |
257 | PYTHON_EXTBUILD := $(OUTPUT)python_ext_build/ | 267 | PYTHON_EXTBUILD := $(OUTPUT)python_ext_build/ |
258 | PYTHON_EXTBUILD_LIB := $(PYTHON_EXTBUILD)lib/ | 268 | PYTHON_EXTBUILD_LIB := $(PYTHON_EXTBUILD)lib/ |
@@ -355,7 +365,6 @@ LIB_H += util/cache.h | |||
355 | LIB_H += util/callchain.h | 365 | LIB_H += util/callchain.h |
356 | LIB_H += util/build-id.h | 366 | LIB_H += util/build-id.h |
357 | LIB_H += util/debug.h | 367 | LIB_H += util/debug.h |
358 | LIB_H += util/debugfs.h | ||
359 | LIB_H += util/sysfs.h | 368 | LIB_H += util/sysfs.h |
360 | LIB_H += util/pmu.h | 369 | LIB_H += util/pmu.h |
361 | LIB_H += util/event.h | 370 | LIB_H += util/event.h |
@@ -416,7 +425,6 @@ LIB_OBJS += $(OUTPUT)util/annotate.o | |||
416 | LIB_OBJS += $(OUTPUT)util/build-id.o | 425 | LIB_OBJS += $(OUTPUT)util/build-id.o |
417 | LIB_OBJS += $(OUTPUT)util/config.o | 426 | LIB_OBJS += $(OUTPUT)util/config.o |
418 | LIB_OBJS += $(OUTPUT)util/ctype.o | 427 | LIB_OBJS += $(OUTPUT)util/ctype.o |
419 | LIB_OBJS += $(OUTPUT)util/debugfs.o | ||
420 | LIB_OBJS += $(OUTPUT)util/sysfs.o | 428 | LIB_OBJS += $(OUTPUT)util/sysfs.o |
421 | LIB_OBJS += $(OUTPUT)util/pmu.o | 429 | LIB_OBJS += $(OUTPUT)util/pmu.o |
422 | LIB_OBJS += $(OUTPUT)util/environment.o | 430 | LIB_OBJS += $(OUTPUT)util/environment.o |
@@ -536,7 +544,7 @@ BUILTIN_OBJS += $(OUTPUT)builtin-kvm.o | |||
536 | BUILTIN_OBJS += $(OUTPUT)builtin-inject.o | 544 | BUILTIN_OBJS += $(OUTPUT)builtin-inject.o |
537 | BUILTIN_OBJS += $(OUTPUT)tests/builtin-test.o | 545 | BUILTIN_OBJS += $(OUTPUT)tests/builtin-test.o |
538 | 546 | ||
539 | PERFLIBS = $(LIB_FILE) $(LIBTRACEEVENT) | 547 | PERFLIBS = $(LIB_FILE) $(LIBLK) $(LIBTRACEEVENT) |
540 | 548 | ||
541 | # | 549 | # |
542 | # Platform specific tweaks | 550 | # Platform specific tweaks |
@@ -1051,6 +1059,18 @@ $(LIBTRACEEVENT): | |||
1051 | $(LIBTRACEEVENT)-clean: | 1059 | $(LIBTRACEEVENT)-clean: |
1052 | $(QUIET_SUBDIR0)$(TRACE_EVENT_DIR) $(QUIET_SUBDIR1) O=$(OUTPUT) clean | 1060 | $(QUIET_SUBDIR0)$(TRACE_EVENT_DIR) $(QUIET_SUBDIR1) O=$(OUTPUT) clean |
1053 | 1061 | ||
1062 | # if subdir is set, we've been called from above so target has been built | ||
1063 | # already | ||
1064 | $(LIBLK): | ||
1065 | ifeq ($(subdir),) | ||
1066 | $(QUIET_SUBDIR0)$(LK_DIR) $(QUIET_SUBDIR1) O=$(OUTPUT) liblk.a | ||
1067 | endif | ||
1068 | |||
1069 | $(LIBLK)-clean: | ||
1070 | ifeq ($(subdir),) | ||
1071 | $(QUIET_SUBDIR0)$(LK_DIR) $(QUIET_SUBDIR1) O=$(OUTPUT) clean | ||
1072 | endif | ||
1073 | |||
1054 | help: | 1074 | help: |
1055 | @echo 'Perf make targets:' | 1075 | @echo 'Perf make targets:' |
1056 | @echo ' doc - make *all* documentation (see below)' | 1076 | @echo ' doc - make *all* documentation (see below)' |
@@ -1171,7 +1191,7 @@ $(INSTALL_DOC_TARGETS): | |||
1171 | 1191 | ||
1172 | ### Cleaning rules | 1192 | ### Cleaning rules |
1173 | 1193 | ||
1174 | clean: $(LIBTRACEEVENT)-clean | 1194 | clean: $(LIBTRACEEVENT)-clean $(LIBLK)-clean |
1175 | $(RM) $(LIB_OBJS) $(BUILTIN_OBJS) $(LIB_FILE) $(OUTPUT)perf-archive $(OUTPUT)perf.o $(LANG_BINDINGS) | 1195 | $(RM) $(LIB_OBJS) $(BUILTIN_OBJS) $(LIB_FILE) $(OUTPUT)perf-archive $(OUTPUT)perf.o $(LANG_BINDINGS) |
1176 | $(RM) $(ALL_PROGRAMS) perf | 1196 | $(RM) $(ALL_PROGRAMS) perf |
1177 | $(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo $(OUTPUT)common-cmds.h TAGS tags cscope* | 1197 | $(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo $(OUTPUT)common-cmds.h TAGS tags cscope* |
@@ -1181,6 +1201,6 @@ clean: $(LIBTRACEEVENT)-clean | |||
1181 | $(RM) $(OUTPUT)util/*-flex* | 1201 | $(RM) $(OUTPUT)util/*-flex* |
1182 | $(python-clean) | 1202 | $(python-clean) |
1183 | 1203 | ||
1184 | .PHONY: all install clean strip $(LIBTRACEEVENT) | 1204 | .PHONY: all install clean strip $(LIBTRACEEVENT) $(LIBLK) |
1185 | .PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell | 1205 | .PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell |
1186 | .PHONY: .FORCE-PERF-VERSION-FILE TAGS tags cscope .FORCE-PERF-CFLAGS | 1206 | .PHONY: .FORCE-PERF-VERSION-FILE TAGS tags cscope .FORCE-PERF-CFLAGS |