diff options
author | Jiri Olsa <jolsa@redhat.com> | 2013-05-24 08:35:23 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-05-30 09:37:24 -0400 |
commit | 7c53746e6da21750760054ca9fd8797725e3842a (patch) | |
tree | d8d5a0895122a7a91aa4e40637ec11ea2507a8fe /tools | |
parent | 1e9f7aad3f5ed32e82bb6dea7afccbdb607c2ea3 (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/Makefile | 4 | ||||
-rw-r--r-- | tools/perf/config/Makefile | 49 |
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 | |||
80 | BISON = bison | 80 | BISON = bison |
81 | STRIP ?= strip | 81 | STRIP ?= strip |
82 | 82 | ||
83 | LK_DIR = ../lib/lk/ | 83 | LK_DIR = $(srctree)/tools/lib/lk/ |
84 | TRACE_EVENT_DIR = ../lib/traceevent/ | 84 | TRACE_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 |
35 | endif | 35 | endif |
36 | 36 | ||
37 | -include config/feature-tests.mak | 37 | ifeq ($(src-perf),) |
38 | src-perf := $(srctree)/tools/perf | ||
39 | endif | ||
40 | |||
41 | ifeq ($(obj-perf),) | ||
42 | obj-perf := $(objtree) | ||
43 | endif | ||
44 | |||
45 | ifneq ($(obj-perf),) | ||
46 | obj-perf := $(abspath $(obj-perf))/ | ||
47 | endif | ||
48 | |||
49 | # include ARCH specific config | ||
50 | -include $(src-perf)/arch/$(ARCH)/Makefile | ||
51 | |||
52 | include $(src-perf)/config/feature-tests.mak | ||
53 | include $(src-perf)/config/utilities.mak | ||
38 | 54 | ||
39 | ifeq ($(call get-executable,$(FLEX)),) | 55 | ifeq ($(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 | |||
91 | endif | 107 | endif |
92 | 108 | ||
93 | CFLAGS += \ | 109 | CFLAGS += \ |
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 |
119 | ifneq ($(OUTPUT),) | ||
120 | CFLAGS += \ | ||
121 | -I$(obj-perf)/util \ | ||
122 | -I$(obj-perf) | ||
123 | endif | ||
124 | |||
125 | CFLAGS += \ | ||
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 | |||
131 | CFLAGS += \ | ||
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 | ||
109 | ifeq ($(call try-cc,$(SOURCE_BIONIC),$(CFLAGS),bionic),y) | 134 | ifeq ($(call try-cc,$(SOURCE_BIONIC),$(CFLAGS),bionic),y) |
@@ -159,7 +184,7 @@ ifeq ($(call try-cc,$(SOURCE_ELF_MMAP),$(FLAGS_LIBELF),-DLIBELF_MMAP),y) | |||
159 | endif | 184 | endif |
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 | ||
164 | ifndef NO_DWARF | 189 | ifndef NO_DWARF |
165 | ifeq ($(origin PERF_HAVE_DWARF_REGS), undefined) | 190 | ifeq ($(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 |