blob: aab05e2c01a52349aa5d8f1af8d1c1c6783eb2af [file] [log] [blame]
Jiri Olsa5ff32882019-02-13 13:32:39 +01001perf-y += annotate.o
Jin Yao60414412019-11-07 15:47:14 +08002perf-y += block-info.o
Jiri Olsa5ff32882019-02-13 13:32:39 +01003perf-y += block-range.o
4perf-y += build-id.o
Arnaldo Carvalho de Melo12500902019-08-22 16:58:29 -03005perf-y += cacheline.o
Jiri Olsa5ff32882019-02-13 13:32:39 +01006perf-y += config.o
Arnaldo Carvalho de Melo32ff3fe2019-09-24 15:14:12 -03007perf-y += copyfile.o
Jiri Olsa5ff32882019-02-13 13:32:39 +01008perf-y += ctype.o
9perf-y += db-export.o
10perf-y += env.o
11perf-y += event.o
12perf-y += evlist.o
13perf-y += evsel.o
14perf-y += evsel_fprintf.o
Arnaldo Carvalho de Meloca125272019-09-24 15:41:51 -030015perf-y += perf_event_attr_fprintf.o
Arnaldo Carvalho de Melo8829e562019-08-15 11:00:11 -030016perf-y += evswitch.o
Jiri Olsa5ff32882019-02-13 13:32:39 +010017perf-y += find_bit.o
18perf-y += get_current_dir_name.o
19perf-y += kallsyms.o
20perf-y += levenshtein.o
21perf-y += llvm-utils.o
22perf-y += mmap.o
23perf-y += memswap.o
24perf-y += parse-events.o
25perf-y += perf_regs.o
26perf-y += path.o
27perf-y += print_binary.o
Arnaldo Carvalho de Melo49752232019-07-09 14:49:26 -030028perf-y += rlimit.o
Arnaldo Carvalho de Melo9c105482019-06-26 15:27:58 -030029perf-y += argv_split.o
Jiri Olsa5ff32882019-02-13 13:32:39 +010030perf-y += rbtree.o
31perf-y += libstring.o
32perf-y += bitmap.o
33perf-y += hweight.o
34perf-y += smt.o
35perf-y += strbuf.o
36perf-y += string.o
37perf-y += strlist.o
38perf-y += strfilter.o
39perf-y += top.o
40perf-y += usage.o
41perf-y += dso.o
Arnaldo Carvalho de Melo4a3cec82019-08-30 11:11:01 -030042perf-y += dsos.o
Jiri Olsa5ff32882019-02-13 13:32:39 +010043perf-y += symbol.o
44perf-y += symbol_fprintf.o
45perf-y += color.o
46perf-y += color_config.o
47perf-y += metricgroup.o
48perf-y += header.o
49perf-y += callchain.o
50perf-y += values.o
51perf-y += debug.o
Andi Kleend9664582019-11-20 16:15:11 -080052perf-y += fncache.o
Jiri Olsa5ff32882019-02-13 13:32:39 +010053perf-y += machine.o
54perf-y += map.o
55perf-y += pstack.o
56perf-y += session.o
57perf-y += sample-raw.o
58perf-y += s390-sample-raw.o
59perf-$(CONFIG_TRACE) += syscalltbl.o
60perf-y += ordered-events.o
61perf-y += namespaces.o
62perf-y += comm.o
63perf-y += thread.o
64perf-y += thread_map.o
65perf-y += trace-event-parse.o
66perf-y += parse-events-flex.o
67perf-y += parse-events-bison.o
68perf-y += pmu.o
69perf-y += pmu-flex.o
70perf-y += pmu-bison.o
71perf-y += trace-event-read.o
72perf-y += trace-event-info.o
73perf-y += trace-event-scripting.o
74perf-y += trace-event.o
75perf-y += svghelper.o
76perf-y += sort.o
77perf-y += hist.o
78perf-y += util.o
Jiri Olsa5ff32882019-02-13 13:32:39 +010079perf-y += cpumap.o
Jiri Olsa5135d5e2019-02-19 10:58:13 +010080perf-y += cputopo.o
Jiri Olsa5ff32882019-02-13 13:32:39 +010081perf-y += cgroup.o
82perf-y += target.o
83perf-y += rblist.o
84perf-y += intlist.o
85perf-y += vdso.o
86perf-y += counts.o
87perf-y += stat.o
88perf-y += stat-shadow.o
89perf-y += stat-display.o
90perf-y += record.o
91perf-y += srcline.o
92perf-y += srccode.o
Arnaldo Carvalho de Melo055c67e2019-09-18 16:08:52 -030093perf-y += synthetic-events.o
Jiri Olsa5ff32882019-02-13 13:32:39 +010094perf-y += data.o
95perf-y += tsc.o
96perf-y += cloexec.o
97perf-y += call-path.o
98perf-y += rwsem.o
99perf-y += thread-stack.o
Jin Yaocebf7d52019-09-25 09:14:46 +0800100perf-y += spark.o
Jiri Olsa5ff32882019-02-13 13:32:39 +0100101perf-$(CONFIG_AUXTRACE) += auxtrace.o
102perf-$(CONFIG_AUXTRACE) += intel-pt-decoder/
103perf-$(CONFIG_AUXTRACE) += intel-pt.o
104perf-$(CONFIG_AUXTRACE) += intel-bts.o
105perf-$(CONFIG_AUXTRACE) += arm-spe.o
106perf-$(CONFIG_AUXTRACE) += arm-spe-pkt-decoder.o
107perf-$(CONFIG_AUXTRACE) += s390-cpumsf.o
Mathieu Poirier440a23b2018-01-17 10:52:11 -0700108
109ifdef CONFIG_LIBOPENCSD
Jiri Olsa5ff32882019-02-13 13:32:39 +0100110perf-$(CONFIG_AUXTRACE) += cs-etm.o
111perf-$(CONFIG_AUXTRACE) += cs-etm-decoder/
Mathieu Poirier440a23b2018-01-17 10:52:11 -0700112endif
113
Jiri Olsa5ff32882019-02-13 13:32:39 +0100114perf-y += parse-branch-options.o
115perf-y += dump-insn.o
116perf-y += parse-regs-options.o
117perf-y += term.o
118perf-y += help-unknown-cmd.o
119perf-y += mem-events.o
120perf-y += vsprintf.o
121perf-y += units.o
122perf-y += time-utils.o
123perf-y += expr-bison.o
124perf-y += branch.o
125perf-y += mem2node.o
Jiri Olsa9352aab2014-12-29 17:42:46 +0100126
Jiri Olsa5ff32882019-02-13 13:32:39 +0100127perf-$(CONFIG_LIBBPF) += bpf-loader.o
Arnaldo Carvalho de Melod19f85642019-02-19 16:11:56 -0300128perf-$(CONFIG_LIBBPF) += bpf_map.o
Jiri Olsa5ff32882019-02-13 13:32:39 +0100129perf-$(CONFIG_BPF_PROLOGUE) += bpf-prologue.o
130perf-$(CONFIG_LIBELF) += symbol-elf.o
131perf-$(CONFIG_LIBELF) += probe-file.o
132perf-$(CONFIG_LIBELF) += probe-event.o
Jiri Olsa709e6792014-12-29 23:52:25 +0100133
134ifndef CONFIG_LIBELF
Jiri Olsa5ff32882019-02-13 13:32:39 +0100135perf-y += symbol-minimal.o
Jiri Olsa709e6792014-12-29 23:52:25 +0100136endif
137
Arnaldo Carvalho de Melo86bcdb52017-07-18 17:15:29 -0300138ifndef CONFIG_SETNS
Jiri Olsa5ff32882019-02-13 13:32:39 +0100139perf-y += setns.o
Arnaldo Carvalho de Melo86bcdb52017-07-18 17:15:29 -0300140endif
141
Jiri Olsa5ff32882019-02-13 13:32:39 +0100142perf-$(CONFIG_DWARF) += probe-finder.o
143perf-$(CONFIG_DWARF) += dwarf-aux.o
144perf-$(CONFIG_DWARF) += dwarf-regs.o
Jiri Olsa8379fce2014-12-30 00:06:25 +0100145
Jiri Olsa5ff32882019-02-13 13:32:39 +0100146perf-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o
147perf-$(CONFIG_LOCAL_LIBUNWIND) += unwind-libunwind-local.o
148perf-$(CONFIG_LIBUNWIND) += unwind-libunwind.o
149perf-$(CONFIG_LIBUNWIND_X86) += libunwind/x86_32.o
150perf-$(CONFIG_LIBUNWIND_AARCH64) += libunwind/arm64.o
Jiri Olsab2e45c32014-12-30 00:11:11 +0100151
Jiri Olsa5ff32882019-02-13 13:32:39 +0100152perf-$(CONFIG_LIBBABELTRACE) += data-convert-bt.o
Jiri Olsaedbe9812015-02-20 23:17:00 +0100153
Jiri Olsa5ff32882019-02-13 13:32:39 +0100154perf-y += scripting-engines/
Jiri Olsac7355f82014-12-30 13:11:32 +0100155
Jiri Olsa5ff32882019-02-13 13:32:39 +0100156perf-$(CONFIG_ZLIB) += zlib.o
157perf-$(CONFIG_LZMA) += lzma.o
Alexey Budankovf24c1d72019-03-18 20:42:55 +0300158perf-$(CONFIG_ZSTD) += zstd.o
159
Igor Lubashevc22e1502019-08-07 10:44:14 -0400160perf-$(CONFIG_LIBCAP) += cap.o
161
Jiri Olsa5ff32882019-02-13 13:32:39 +0100162perf-y += demangle-java.o
163perf-y += demangle-rust.o
Arnaldo Carvalho de Melo46dad052016-03-07 18:48:45 -0300164
Jiri Olsae12b2022016-03-10 17:41:13 +0100165ifdef CONFIG_JITDUMP
Jiri Olsa5ff32882019-02-13 13:32:39 +0100166perf-$(CONFIG_LIBELF) += jitdump.o
167perf-$(CONFIG_LIBELF) += genelf.o
168perf-$(CONFIG_DWARF) += genelf_debug.o
Arnaldo Carvalho de Melo46dad052016-03-07 18:48:45 -0300169endif
Jiri Olsa3bc33742014-12-30 13:30:04 +0100170
Jiri Olsa5ff32882019-02-13 13:32:39 +0100171perf-y += perf-hooks.o
Wang Nana0748652016-11-26 07:03:28 +0000172
Jiri Olsa5ff32882019-02-13 13:32:39 +0100173perf-$(CONFIG_LIBBPF) += bpf-event.o
Song Liu45178a92019-01-17 08:15:18 -0800174
Jiri Olsa5ff32882019-02-13 13:32:39 +0100175perf-$(CONFIG_CXX) += c++/
Wang Nan00b86692016-11-26 07:03:34 +0000176
Jiri Olsa9352aab2014-12-29 17:42:46 +0100177CFLAGS_config.o += -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
Arnaldo Carvalho de Melo1b16fff2018-05-04 10:37:27 -0300178CFLAGS_llvm-utils.o += -DPERF_INCLUDE_DIR="BUILD_STR($(perf_include_dir_SQ))"
179
Stephane Eranian598b7c62015-11-30 10:02:23 +0100180# avoid compiler warnings in 32-bit mode
181CFLAGS_genelf_debug.o += -Wno-packed
Jiri Olsa9352aab2014-12-29 17:42:46 +0100182
183$(OUTPUT)util/parse-events-flex.c: util/parse-events.l $(OUTPUT)util/parse-events-bison.c
Jiri Olsa19993072014-12-30 18:44:38 +0100184 $(call rule_mkdir)
Jiri Olsa70923bd2015-05-14 12:31:48 -0300185 $(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 +0100186
187$(OUTPUT)util/parse-events-bison.c: util/parse-events.y
Jiri Olsa19993072014-12-30 18:44:38 +0100188 $(call rule_mkdir)
Jiri Olsa70923bd2015-05-14 12:31:48 -0300189 $(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 +0100190
Andi Kleen07516732017-03-20 13:17:05 -0700191$(OUTPUT)util/expr-bison.c: util/expr.y
192 $(call rule_mkdir)
193 $(Q)$(call echo-cmd,bison)$(BISON) -v util/expr.y -d $(PARSER_DEBUG_BISON) -o $@ -p expr__
194
Jiri Olsa9352aab2014-12-29 17:42:46 +0100195$(OUTPUT)util/pmu-flex.c: util/pmu.l $(OUTPUT)util/pmu-bison.c
Jiri Olsa19993072014-12-30 18:44:38 +0100196 $(call rule_mkdir)
Jiri Olsa70923bd2015-05-14 12:31:48 -0300197 $(Q)$(call echo-cmd,flex)$(FLEX) -o $@ --header-file=$(OUTPUT)util/pmu-flex.h util/pmu.l
Jiri Olsa9352aab2014-12-29 17:42:46 +0100198
199$(OUTPUT)util/pmu-bison.c: util/pmu.y
Jiri Olsa19993072014-12-30 18:44:38 +0100200 $(call rule_mkdir)
Jiri Olsa70923bd2015-05-14 12:31:48 -0300201 $(Q)$(call echo-cmd,bison)$(BISON) -v util/pmu.y -d -o $@ -p perf_pmu_
Jiri Olsa9352aab2014-12-29 17:42:46 +0100202
203CFLAGS_parse-events-flex.o += -w
204CFLAGS_pmu-flex.o += -w
Namhyung Kim539f3aa2015-04-29 12:55:00 -0300205CFLAGS_parse-events-bison.o += -DYYENABLE_NLS=0 -w
Jiri Olsa9352aab2014-12-29 17:42:46 +0100206CFLAGS_pmu-bison.o += -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -w
Andi Kleen07516732017-03-20 13:17:05 -0700207CFLAGS_expr-bison.o += -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -w
Jiri Olsa9352aab2014-12-29 17:42:46 +0100208
209$(OUTPUT)util/parse-events.o: $(OUTPUT)util/parse-events-flex.c $(OUTPUT)util/parse-events-bison.c
210$(OUTPUT)util/pmu.o: $(OUTPUT)util/pmu-flex.c $(OUTPUT)util/pmu-bison.c
211
Arnaldo Carvalho de Melo915b0882016-01-08 12:33:37 -0300212CFLAGS_bitmap.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
Arnaldo Carvalho de Melo552eb9752016-01-08 10:46:52 -0300213CFLAGS_find_bit.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
Jiri Olsa9352aab2014-12-29 17:42:46 +0100214CFLAGS_rbtree.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
Arnaldo Carvalho de Melo4ddd3272015-11-16 11:36:29 -0300215CFLAGS_libstring.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
Jiri Olsa9352aab2014-12-29 17:42:46 +0100216CFLAGS_hweight.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
217CFLAGS_parse-events.o += -Wno-redundant-decls
Soramichi AKIYAMAd25ed5d2017-01-17 00:22:37 +0900218CFLAGS_header.o += -include $(OUTPUT)PERF-VERSION-FILE
Jiri Olsa9352aab2014-12-29 17:42:46 +0100219
220$(OUTPUT)util/kallsyms.o: ../lib/symbol/kallsyms.c FORCE
Jiri Olsa19993072014-12-30 18:44:38 +0100221 $(call rule_mkdir)
Jiri Olsa9352aab2014-12-29 17:42:46 +0100222 $(call if_changed_dep,cc_o_c)
223
Arnaldo Carvalho de Melo9c105482019-06-26 15:27:58 -0300224$(OUTPUT)util/argv_split.o: ../lib/argv_split.c FORCE
225 $(call rule_mkdir)
226 $(call if_changed_dep,cc_o_c)
227
Arnaldo Carvalho de Melo915b0882016-01-08 12:33:37 -0300228$(OUTPUT)util/bitmap.o: ../lib/bitmap.c FORCE
229 $(call rule_mkdir)
230 $(call if_changed_dep,cc_o_c)
231
Arnaldo Carvalho de Melo3052ba52019-06-25 17:27:31 -0300232$(OUTPUT)util/ctype.o: ../lib/ctype.c FORCE
233 $(call rule_mkdir)
234 $(call if_changed_dep,cc_o_c)
235
Arnaldo Carvalho de Melo552eb9752016-01-08 10:46:52 -0300236$(OUTPUT)util/find_bit.o: ../lib/find_bit.c FORCE
Jiri Olsa19993072014-12-30 18:44:38 +0100237 $(call rule_mkdir)
Jiri Olsa9352aab2014-12-29 17:42:46 +0100238 $(call if_changed_dep,cc_o_c)
239
Arnaldo Carvalho de Melo3f735372015-07-05 22:48:21 -0300240$(OUTPUT)util/rbtree.o: ../lib/rbtree.c FORCE
Jiri Olsa19993072014-12-30 18:44:38 +0100241 $(call rule_mkdir)
Jiri Olsa9352aab2014-12-29 17:42:46 +0100242 $(call if_changed_dep,cc_o_c)
243
Arnaldo Carvalho de Melo4ddd3272015-11-16 11:36:29 -0300244$(OUTPUT)util/libstring.o: ../lib/string.c FORCE
245 $(call rule_mkdir)
246 $(call if_changed_dep,cc_o_c)
247
Arnaldo Carvalho de Melo0aefc352015-07-09 16:27:25 -0300248$(OUTPUT)util/hweight.o: ../lib/hweight.c FORCE
Jiri Olsa19993072014-12-30 18:44:38 +0100249 $(call rule_mkdir)
Jiri Olsa9352aab2014-12-29 17:42:46 +0100250 $(call if_changed_dep,cc_o_c)
Arnaldo Carvalho de Melod0761e32016-07-07 15:42:33 -0300251
252$(OUTPUT)util/vsprintf.o: ../lib/vsprintf.c FORCE
253 $(call rule_mkdir)
254 $(call if_changed_dep,cc_o_c)