aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@redhat.com>2013-05-24 08:35:23 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2013-05-30 09:37:24 -0400
commit7c53746e6da21750760054ca9fd8797725e3842a (patch)
treed8d5a0895122a7a91aa4e40637ec11ea2507a8fe /tools
parent1e9f7aad3f5ed32e82bb6dea7afccbdb607c2ea3 (diff)
perf tools: Switch to full path C include directories
Switching to full path C include directories, to make the includes clear. Plus little include cleanup. Signed-off-by: Jiri Olsa <jolsa@redhat.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1369398928-9809-21-git-send-email-jolsa@redhat.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/Makefile4
-rw-r--r--tools/perf/config/Makefile49
2 files changed, 39 insertions, 14 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 1a3557c09098..4275ddc5afba 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -80,8 +80,8 @@ FLEX = flex
80BISON = bison 80BISON = bison
81STRIP ?= strip 81STRIP ?= strip
82 82
83LK_DIR = ../lib/lk/ 83LK_DIR = $(srctree)/tools/lib/lk/
84TRACE_EVENT_DIR = ../lib/traceevent/ 84TRACE_EVENT_DIR = $(srctree)/tools/lib/traceevent/
85 85
86# include config/Makefile by default and rule out 86# include config/Makefile by default and rule out
87# non-config cases 87# non-config cases
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index c6e49022d78b..87622094e511 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -34,7 +34,23 @@ ifeq ($(NO_PERF_REGS),0)
34 CFLAGS += -DHAVE_PERF_REGS 34 CFLAGS += -DHAVE_PERF_REGS
35endif 35endif
36 36
37-include config/feature-tests.mak 37ifeq ($(src-perf),)
38src-perf := $(srctree)/tools/perf
39endif
40
41ifeq ($(obj-perf),)
42obj-perf := $(objtree)
43endif
44
45ifneq ($(obj-perf),)
46obj-perf := $(abspath $(obj-perf))/
47endif
48
49# include ARCH specific config
50-include $(src-perf)/arch/$(ARCH)/Makefile
51
52include $(src-perf)/config/feature-tests.mak
53include $(src-perf)/config/utilities.mak
38 54
39ifeq ($(call get-executable,$(FLEX)),) 55ifeq ($(call get-executable,$(FLEX)),)
40 dummy := $(error Error: $(FLEX) is missing on this system, please install it) 56 dummy := $(error Error: $(FLEX) is missing on this system, please install it)
@@ -91,19 +107,28 @@ ifndef PERF_DEBUG
91endif 107endif
92 108
93CFLAGS += \ 109CFLAGS += \
94 -Iutil/include \ 110 -I$(src-perf)/util/include \
95 -Iarch/$(ARCH)/include \ 111 -I$(src-perf)/arch/$(ARCH)/include \
96 $(if $(objtree),-I$(objtree)/arch/$(ARCH)/include/generated/uapi) \
97 -I$(srctree)/arch/$(ARCH)/include/uapi \ 112 -I$(srctree)/arch/$(ARCH)/include/uapi \
98 -I$(srctree)/arch/$(ARCH)/include \ 113 -I$(srctree)/arch/$(ARCH)/include \
99 $(if $(objtree),-I$(objtree)/include/generated/uapi) \
100 -I$(srctree)/include/uapi \ 114 -I$(srctree)/include/uapi \
101 -I$(srctree)/include \ 115 -I$(srctree)/include
102 -I$(OUTPUT)util \ 116
103 -Iutil \ 117# $(obj-perf) for generated common-cmds.h
104 -I. \ 118# $(obj-perf)/util for generated bison/flex headers
119ifneq ($(OUTPUT),)
120CFLAGS += \
121 -I$(obj-perf)/util \
122 -I$(obj-perf)
123endif
124
125CFLAGS += \
126 -I$(src-perf)/util \
127 -I$(src-perf) \
105 -I$(TRACE_EVENT_DIR) \ 128 -I$(TRACE_EVENT_DIR) \
106 -I../lib/ \ 129 -I$(srctree)/tools/lib/
130
131CFLAGS += \
107 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE 132 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
108 133
109ifeq ($(call try-cc,$(SOURCE_BIONIC),$(CFLAGS),bionic),y) 134ifeq ($(call try-cc,$(SOURCE_BIONIC),$(CFLAGS),bionic),y)
@@ -159,7 +184,7 @@ ifeq ($(call try-cc,$(SOURCE_ELF_MMAP),$(FLAGS_LIBELF),-DLIBELF_MMAP),y)
159endif 184endif
160 185
161# include ARCH specific config 186# include ARCH specific config
162-include arch/$(ARCH)/Makefile 187-include $(src-perf)/arch/$(ARCH)/Makefile
163 188
164ifndef NO_DWARF 189ifndef NO_DWARF
165ifeq ($(origin PERF_HAVE_DWARF_REGS), undefined) 190ifeq ($(origin PERF_HAVE_DWARF_REGS), undefined)
@@ -329,7 +354,7 @@ else
329 else 354 else
330 LDFLAGS += $(PYTHON_EMBED_LDFLAGS) 355 LDFLAGS += $(PYTHON_EMBED_LDFLAGS)
331 EXTLIBS += $(PYTHON_EMBED_LIBADD) 356 EXTLIBS += $(PYTHON_EMBED_LIBADD)
332 LANG_BINDINGS += $(OUTPUT)python/perf.so 357 LANG_BINDINGS += $(obj-perf)python/perf.so
333 endif 358 endif
334 endif 359 endif
335 endif 360 endif