blob: d3408a4630601c25092975ac180dc54084806c0c [file] [log] [blame]
Jiri Olsa5ff32882019-02-13 13:32:39 +01001perf-y += annotate.o
2perf-y += block-range.o
3perf-y += build-id.o
4perf-y += config.o
5perf-y += ctype.o
6perf-y += db-export.o
7perf-y += env.o
8perf-y += event.o
9perf-y += evlist.o
10perf-y += evsel.o
11perf-y += evsel_fprintf.o
12perf-y += find_bit.o
13perf-y += get_current_dir_name.o
14perf-y += kallsyms.o
15perf-y += levenshtein.o
16perf-y += llvm-utils.o
17perf-y += mmap.o
18perf-y += memswap.o
19perf-y += parse-events.o
20perf-y += perf_regs.o
21perf-y += path.o
22perf-y += print_binary.o
Arnaldo Carvalho de Melo9c105482019-06-26 15:27:58 -030023perf-y += argv_split.o
Jiri Olsa5ff32882019-02-13 13:32:39 +010024perf-y += rbtree.o
25perf-y += libstring.o
26perf-y += bitmap.o
27perf-y += hweight.o
28perf-y += smt.o
29perf-y += strbuf.o
30perf-y += string.o
31perf-y += strlist.o
32perf-y += strfilter.o
33perf-y += top.o
34perf-y += usage.o
35perf-y += dso.o
36perf-y += symbol.o
37perf-y += symbol_fprintf.o
38perf-y += color.o
39perf-y += color_config.o
40perf-y += metricgroup.o
41perf-y += header.o
42perf-y += callchain.o
43perf-y += values.o
44perf-y += debug.o
45perf-y += machine.o
46perf-y += map.o
47perf-y += pstack.o
48perf-y += session.o
49perf-y += sample-raw.o
50perf-y += s390-sample-raw.o
51perf-$(CONFIG_TRACE) += syscalltbl.o
52perf-y += ordered-events.o
53perf-y += namespaces.o
54perf-y += comm.o
55perf-y += thread.o
56perf-y += thread_map.o
57perf-y += trace-event-parse.o
58perf-y += parse-events-flex.o
59perf-y += parse-events-bison.o
60perf-y += pmu.o
61perf-y += pmu-flex.o
62perf-y += pmu-bison.o
63perf-y += trace-event-read.o
64perf-y += trace-event-info.o
65perf-y += trace-event-scripting.o
66perf-y += trace-event.o
67perf-y += svghelper.o
68perf-y += sort.o
69perf-y += hist.o
70perf-y += util.o
71perf-y += xyarray.o
72perf-y += cpumap.o
Jiri Olsa5135d5e2019-02-19 10:58:13 +010073perf-y += cputopo.o
Jiri Olsa5ff32882019-02-13 13:32:39 +010074perf-y += cgroup.o
75perf-y += target.o
76perf-y += rblist.o
77perf-y += intlist.o
78perf-y += vdso.o
79perf-y += counts.o
80perf-y += stat.o
81perf-y += stat-shadow.o
82perf-y += stat-display.o
83perf-y += record.o
84perf-y += srcline.o
85perf-y += srccode.o
86perf-y += data.o
87perf-y += tsc.o
88perf-y += cloexec.o
89perf-y += call-path.o
90perf-y += rwsem.o
91perf-y += thread-stack.o
92perf-$(CONFIG_AUXTRACE) += auxtrace.o
93perf-$(CONFIG_AUXTRACE) += intel-pt-decoder/
94perf-$(CONFIG_AUXTRACE) += intel-pt.o
95perf-$(CONFIG_AUXTRACE) += intel-bts.o
96perf-$(CONFIG_AUXTRACE) += arm-spe.o
97perf-$(CONFIG_AUXTRACE) += arm-spe-pkt-decoder.o
98perf-$(CONFIG_AUXTRACE) += s390-cpumsf.o
Mathieu Poirier440a23b2018-01-17 10:52:11 -070099
100ifdef CONFIG_LIBOPENCSD
Jiri Olsa5ff32882019-02-13 13:32:39 +0100101perf-$(CONFIG_AUXTRACE) += cs-etm.o
102perf-$(CONFIG_AUXTRACE) += cs-etm-decoder/
Mathieu Poirier440a23b2018-01-17 10:52:11 -0700103endif
104
Jiri Olsa5ff32882019-02-13 13:32:39 +0100105perf-y += parse-branch-options.o
106perf-y += dump-insn.o
107perf-y += parse-regs-options.o
108perf-y += term.o
109perf-y += help-unknown-cmd.o
110perf-y += mem-events.o
111perf-y += vsprintf.o
112perf-y += units.o
113perf-y += time-utils.o
114perf-y += expr-bison.o
115perf-y += branch.o
116perf-y += mem2node.o
Jiri Olsa9352aab2014-12-29 17:42:46 +0100117
Jiri Olsa5ff32882019-02-13 13:32:39 +0100118perf-$(CONFIG_LIBBPF) += bpf-loader.o
Arnaldo Carvalho de Melod19f85642019-02-19 16:11:56 -0300119perf-$(CONFIG_LIBBPF) += bpf_map.o
Jiri Olsa5ff32882019-02-13 13:32:39 +0100120perf-$(CONFIG_BPF_PROLOGUE) += bpf-prologue.o
121perf-$(CONFIG_LIBELF) += symbol-elf.o
122perf-$(CONFIG_LIBELF) += probe-file.o
123perf-$(CONFIG_LIBELF) += probe-event.o
Jiri Olsa709e6792014-12-29 23:52:25 +0100124
125ifndef CONFIG_LIBELF
Jiri Olsa5ff32882019-02-13 13:32:39 +0100126perf-y += symbol-minimal.o
Jiri Olsa709e6792014-12-29 23:52:25 +0100127endif
128
Arnaldo Carvalho de Melo86bcdb52017-07-18 17:15:29 -0300129ifndef CONFIG_SETNS
Jiri Olsa5ff32882019-02-13 13:32:39 +0100130perf-y += setns.o
Arnaldo Carvalho de Melo86bcdb52017-07-18 17:15:29 -0300131endif
132
Jiri Olsa5ff32882019-02-13 13:32:39 +0100133perf-$(CONFIG_DWARF) += probe-finder.o
134perf-$(CONFIG_DWARF) += dwarf-aux.o
135perf-$(CONFIG_DWARF) += dwarf-regs.o
Jiri Olsa8379fce2014-12-30 00:06:25 +0100136
Jiri Olsa5ff32882019-02-13 13:32:39 +0100137perf-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o
138perf-$(CONFIG_LOCAL_LIBUNWIND) += unwind-libunwind-local.o
139perf-$(CONFIG_LIBUNWIND) += unwind-libunwind.o
140perf-$(CONFIG_LIBUNWIND_X86) += libunwind/x86_32.o
141perf-$(CONFIG_LIBUNWIND_AARCH64) += libunwind/arm64.o
Jiri Olsab2e45c32014-12-30 00:11:11 +0100142
Jiri Olsa5ff32882019-02-13 13:32:39 +0100143perf-$(CONFIG_LIBBABELTRACE) += data-convert-bt.o
Jiri Olsaedbe9812015-02-20 23:17:00 +0100144
Jiri Olsa5ff32882019-02-13 13:32:39 +0100145perf-y += scripting-engines/
Jiri Olsac7355f82014-12-30 13:11:32 +0100146
Jiri Olsa5ff32882019-02-13 13:32:39 +0100147perf-$(CONFIG_ZLIB) += zlib.o
148perf-$(CONFIG_LZMA) += lzma.o
Alexey Budankovf24c1d72019-03-18 20:42:55 +0300149perf-$(CONFIG_ZSTD) += zstd.o
150
Jiri Olsa5ff32882019-02-13 13:32:39 +0100151perf-y += demangle-java.o
152perf-y += demangle-rust.o
Arnaldo Carvalho de Melo46dad052016-03-07 18:48:45 -0300153
Jiri Olsae12b2022016-03-10 17:41:13 +0100154ifdef CONFIG_JITDUMP
Jiri Olsa5ff32882019-02-13 13:32:39 +0100155perf-$(CONFIG_LIBELF) += jitdump.o
156perf-$(CONFIG_LIBELF) += genelf.o
157perf-$(CONFIG_DWARF) += genelf_debug.o
Arnaldo Carvalho de Melo46dad052016-03-07 18:48:45 -0300158endif
Jiri Olsa3bc33742014-12-30 13:30:04 +0100159
Jiri Olsa5ff32882019-02-13 13:32:39 +0100160perf-y += perf-hooks.o
Wang Nana0748652016-11-26 07:03:28 +0000161
Jiri Olsa5ff32882019-02-13 13:32:39 +0100162perf-$(CONFIG_LIBBPF) += bpf-event.o
Song Liu45178a92019-01-17 08:15:18 -0800163
Jiri Olsa5ff32882019-02-13 13:32:39 +0100164perf-$(CONFIG_CXX) += c++/
Wang Nan00b86692016-11-26 07:03:34 +0000165
Jiri Olsa9352aab2014-12-29 17:42:46 +0100166CFLAGS_config.o += -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
Arnaldo Carvalho de Melo1b16fff2018-05-04 10:37:27 -0300167CFLAGS_llvm-utils.o += -DPERF_INCLUDE_DIR="BUILD_STR($(perf_include_dir_SQ))"
168
Stephane Eranian598b7c62015-11-30 10:02:23 +0100169# avoid compiler warnings in 32-bit mode
170CFLAGS_genelf_debug.o += -Wno-packed
Jiri Olsa9352aab2014-12-29 17:42:46 +0100171
172$(OUTPUT)util/parse-events-flex.c: util/parse-events.l $(OUTPUT)util/parse-events-bison.c
Jiri Olsa19993072014-12-30 18:44:38 +0100173 $(call rule_mkdir)
Jiri Olsa70923bd2015-05-14 12:31:48 -0300174 $(Q)$(call echo-cmd,flex)$(FLEX) -o $@ --header-file=$(OUTPUT)util/parse-events-flex.h $(PARSER_DEBUG_FLEX) util/parse-events.l
Jiri Olsa9352aab2014-12-29 17:42:46 +0100175
176$(OUTPUT)util/parse-events-bison.c: util/parse-events.y
Jiri Olsa19993072014-12-30 18:44:38 +0100177 $(call rule_mkdir)
Jiri Olsa70923bd2015-05-14 12:31:48 -0300178 $(Q)$(call echo-cmd,bison)$(BISON) -v util/parse-events.y -d $(PARSER_DEBUG_BISON) -o $@ -p parse_events_
Jiri Olsa9352aab2014-12-29 17:42:46 +0100179
Andi Kleen07516732017-03-20 13:17:05 -0700180$(OUTPUT)util/expr-bison.c: util/expr.y
181 $(call rule_mkdir)
182 $(Q)$(call echo-cmd,bison)$(BISON) -v util/expr.y -d $(PARSER_DEBUG_BISON) -o $@ -p expr__
183
Jiri Olsa9352aab2014-12-29 17:42:46 +0100184$(OUTPUT)util/pmu-flex.c: util/pmu.l $(OUTPUT)util/pmu-bison.c
Jiri Olsa19993072014-12-30 18:44:38 +0100185 $(call rule_mkdir)
Jiri Olsa70923bd2015-05-14 12:31:48 -0300186 $(Q)$(call echo-cmd,flex)$(FLEX) -o $@ --header-file=$(OUTPUT)util/pmu-flex.h util/pmu.l
Jiri Olsa9352aab2014-12-29 17:42:46 +0100187
188$(OUTPUT)util/pmu-bison.c: util/pmu.y
Jiri Olsa19993072014-12-30 18:44:38 +0100189 $(call rule_mkdir)
Jiri Olsa70923bd2015-05-14 12:31:48 -0300190 $(Q)$(call echo-cmd,bison)$(BISON) -v util/pmu.y -d -o $@ -p perf_pmu_
Jiri Olsa9352aab2014-12-29 17:42:46 +0100191
192CFLAGS_parse-events-flex.o += -w
193CFLAGS_pmu-flex.o += -w
Namhyung Kim539f3aa2015-04-29 12:55:00 -0300194CFLAGS_parse-events-bison.o += -DYYENABLE_NLS=0 -w
Jiri Olsa9352aab2014-12-29 17:42:46 +0100195CFLAGS_pmu-bison.o += -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -w
Andi Kleen07516732017-03-20 13:17:05 -0700196CFLAGS_expr-bison.o += -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -w
Jiri Olsa9352aab2014-12-29 17:42:46 +0100197
198$(OUTPUT)util/parse-events.o: $(OUTPUT)util/parse-events-flex.c $(OUTPUT)util/parse-events-bison.c
199$(OUTPUT)util/pmu.o: $(OUTPUT)util/pmu-flex.c $(OUTPUT)util/pmu-bison.c
200
Arnaldo Carvalho de Melo915b0882016-01-08 12:33:37 -0300201CFLAGS_bitmap.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
Arnaldo Carvalho de Melo552eb9752016-01-08 10:46:52 -0300202CFLAGS_find_bit.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
Jiri Olsa9352aab2014-12-29 17:42:46 +0100203CFLAGS_rbtree.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
Arnaldo Carvalho de Melo4ddd3272015-11-16 11:36:29 -0300204CFLAGS_libstring.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
Jiri Olsa9352aab2014-12-29 17:42:46 +0100205CFLAGS_hweight.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
206CFLAGS_parse-events.o += -Wno-redundant-decls
Soramichi AKIYAMAd25ed5d2017-01-17 00:22:37 +0900207CFLAGS_header.o += -include $(OUTPUT)PERF-VERSION-FILE
Jiri Olsa9352aab2014-12-29 17:42:46 +0100208
209$(OUTPUT)util/kallsyms.o: ../lib/symbol/kallsyms.c FORCE
Jiri Olsa19993072014-12-30 18:44:38 +0100210 $(call rule_mkdir)
Jiri Olsa9352aab2014-12-29 17:42:46 +0100211 $(call if_changed_dep,cc_o_c)
212
Arnaldo Carvalho de Melo9c105482019-06-26 15:27:58 -0300213$(OUTPUT)util/argv_split.o: ../lib/argv_split.c FORCE
214 $(call rule_mkdir)
215 $(call if_changed_dep,cc_o_c)
216
Arnaldo Carvalho de Melo915b0882016-01-08 12:33:37 -0300217$(OUTPUT)util/bitmap.o: ../lib/bitmap.c FORCE
218 $(call rule_mkdir)
219 $(call if_changed_dep,cc_o_c)
220
Arnaldo Carvalho de Melo3052ba52019-06-25 17:27:31 -0300221$(OUTPUT)util/ctype.o: ../lib/ctype.c FORCE
222 $(call rule_mkdir)
223 $(call if_changed_dep,cc_o_c)
224
Arnaldo Carvalho de Melo552eb9752016-01-08 10:46:52 -0300225$(OUTPUT)util/find_bit.o: ../lib/find_bit.c FORCE
Jiri Olsa19993072014-12-30 18:44:38 +0100226 $(call rule_mkdir)
Jiri Olsa9352aab2014-12-29 17:42:46 +0100227 $(call if_changed_dep,cc_o_c)
228
Arnaldo Carvalho de Melo3f735372015-07-05 22:48:21 -0300229$(OUTPUT)util/rbtree.o: ../lib/rbtree.c FORCE
Jiri Olsa19993072014-12-30 18:44:38 +0100230 $(call rule_mkdir)
Jiri Olsa9352aab2014-12-29 17:42:46 +0100231 $(call if_changed_dep,cc_o_c)
232
Arnaldo Carvalho de Melo4ddd3272015-11-16 11:36:29 -0300233$(OUTPUT)util/libstring.o: ../lib/string.c FORCE
234 $(call rule_mkdir)
235 $(call if_changed_dep,cc_o_c)
236
Arnaldo Carvalho de Melo0aefc352015-07-09 16:27:25 -0300237$(OUTPUT)util/hweight.o: ../lib/hweight.c FORCE
Jiri Olsa19993072014-12-30 18:44:38 +0100238 $(call rule_mkdir)
Jiri Olsa9352aab2014-12-29 17:42:46 +0100239 $(call if_changed_dep,cc_o_c)
Arnaldo Carvalho de Melod0761e32016-07-07 15:42:33 -0300240
241$(OUTPUT)util/vsprintf.o: ../lib/vsprintf.c FORCE
242 $(call rule_mkdir)
243 $(call if_changed_dep,cc_o_c)