blob: b7bf201fe8a87b1b5a84a2dc9a4fdf18cd526469 [file] [log] [blame]
Jiri Olsa9352aab2014-12-29 17:42:46 +01001libperf-y += annotate.o
Peter Zijlstra70fbe052016-09-05 16:08:12 -03002libperf-y += block-range.o
Jiri Olsa9352aab2014-12-29 17:42:46 +01003libperf-y += build-id.o
4libperf-y += config.o
5libperf-y += ctype.o
6libperf-y += db-export.o
Arnaldo Carvalho de Melof0ce8882015-09-08 13:30:00 -03007libperf-y += env.o
Jiri Olsa9352aab2014-12-29 17:42:46 +01008libperf-y += event.o
9libperf-y += evlist.o
10libperf-y += evsel.o
Arnaldo Carvalho de Melo25da4fa2016-04-14 19:45:01 -030011libperf-y += evsel_fprintf.o
Arnaldo Carvalho de Melo552eb9752016-01-08 10:46:52 -030012libperf-y += find_bit.o
Arnaldo Carvalho de Melo8feb8ef2018-11-19 16:56:22 -030013libperf-y += get_current_dir_name.o
Jiri Olsa9352aab2014-12-29 17:42:46 +010014libperf-y += kallsyms.o
15libperf-y += levenshtein.o
Wang Nanaa61fd02015-07-21 11:13:34 +000016libperf-y += llvm-utils.o
Arnaldo Carvalho de Melo16958492017-10-06 10:31:47 -030017libperf-y += mmap.o
Arnaldo Carvalho de Melo98521b32017-04-25 15:45:35 -030018libperf-y += memswap.o
Jiri Olsa9352aab2014-12-29 17:42:46 +010019libperf-y += parse-events.o
Sukadev Bhattiprolueb56db52015-09-24 17:53:49 -040020libperf-y += perf_regs.o
Jiri Olsa9352aab2014-12-29 17:42:46 +010021libperf-y += path.o
Arnaldo Carvalho de Melofea01392017-04-17 16:23:22 -030022libperf-y += print_binary.o
Jiri Olsa9352aab2014-12-29 17:42:46 +010023libperf-y += rbtree.o
Arnaldo Carvalho de Melo4ddd3272015-11-16 11:36:29 -030024libperf-y += libstring.o
Jiri Olsa9352aab2014-12-29 17:42:46 +010025libperf-y += bitmap.o
26libperf-y += hweight.o
Andi Kleende5077c2017-08-11 16:26:22 -070027libperf-y += smt.o
Jiri Olsa9352aab2014-12-29 17:42:46 +010028libperf-y += strbuf.o
29libperf-y += string.o
30libperf-y += strlist.o
31libperf-y += strfilter.o
32libperf-y += top.o
33libperf-y += usage.o
Jiri Olsa9352aab2014-12-29 17:42:46 +010034libperf-y += dso.o
35libperf-y += symbol.o
Arnaldo Carvalho de Melobfbba182016-04-14 15:54:36 -030036libperf-y += symbol_fprintf.o
Jiri Olsa9352aab2014-12-29 17:42:46 +010037libperf-y += color.o
Andi Kleenb18f3e32017-08-31 12:40:31 -070038libperf-y += metricgroup.o
Jiri Olsa9352aab2014-12-29 17:42:46 +010039libperf-y += header.o
40libperf-y += callchain.o
41libperf-y += values.o
42libperf-y += debug.o
43libperf-y += machine.o
44libperf-y += map.o
45libperf-y += pstack.o
46libperf-y += session.o
Hendrik Bruecknerb3fa3892018-01-19 09:56:17 +010047libperf-$(CONFIG_TRACE) += syscalltbl.o
Jiri Olsa9352aab2014-12-29 17:42:46 +010048libperf-y += ordered-events.o
Hari Bathinif3b36142017-03-08 02:11:43 +053049libperf-y += namespaces.o
Jiri Olsa9352aab2014-12-29 17:42:46 +010050libperf-y += comm.o
51libperf-y += thread.o
52libperf-y += thread_map.o
53libperf-y += trace-event-parse.o
54libperf-y += parse-events-flex.o
55libperf-y += parse-events-bison.o
56libperf-y += pmu.o
57libperf-y += pmu-flex.o
58libperf-y += pmu-bison.o
59libperf-y += trace-event-read.o
60libperf-y += trace-event-info.o
61libperf-y += trace-event-scripting.o
62libperf-y += trace-event.o
63libperf-y += svghelper.o
64libperf-y += sort.o
65libperf-y += hist.o
66libperf-y += util.o
67libperf-y += xyarray.o
68libperf-y += cpumap.o
69libperf-y += cgroup.o
70libperf-y += target.o
71libperf-y += rblist.o
72libperf-y += intlist.o
73libperf-y += vdso.o
Jiri Olsad8095602015-08-07 12:51:03 +020074libperf-y += counts.o
Jiri Olsa9352aab2014-12-29 17:42:46 +010075libperf-y += stat.o
Jiri Olsaf87027b2015-06-03 16:25:59 +020076libperf-y += stat-shadow.o
Jiri Olsa088519f2018-08-30 08:32:52 +020077libperf-y += stat-display.o
Jiri Olsa9352aab2014-12-29 17:42:46 +010078libperf-y += record.o
79libperf-y += srcline.o
80libperf-y += data.o
Adrian Hunter2a28e232016-03-08 10:38:50 +020081libperf-y += tsc.o
Jiri Olsa9352aab2014-12-29 17:42:46 +010082libperf-y += cloexec.o
Chris Phlipot451db122016-04-28 01:19:07 -070083libperf-y += call-path.o
Arnaldo Carvalho de Melo0a7c74e2017-04-04 13:15:04 -030084libperf-y += rwsem.o
Jiri Olsa9352aab2014-12-29 17:42:46 +010085libperf-y += thread-stack.o
Adrian Huntere31f0d02015-04-30 17:37:27 +030086libperf-$(CONFIG_AUXTRACE) += auxtrace.o
Adrian Huntera4e92592015-07-17 19:33:37 +030087libperf-$(CONFIG_AUXTRACE) += intel-pt-decoder/
Adrian Hunter90e457f2015-07-17 19:33:41 +030088libperf-$(CONFIG_AUXTRACE) += intel-pt.o
Adrian Hunterd0170af2015-07-17 19:33:43 +030089libperf-$(CONFIG_AUXTRACE) += intel-bts.o
Kim Phillipsffd3d182018-01-14 13:28:50 -060090libperf-$(CONFIG_AUXTRACE) += arm-spe.o
91libperf-$(CONFIG_AUXTRACE) += arm-spe-pkt-decoder.o
Thomas Richterb96e6612018-08-02 09:46:20 +020092libperf-$(CONFIG_AUXTRACE) += s390-cpumsf.o
Mathieu Poirier440a23b2018-01-17 10:52:11 -070093
94ifdef CONFIG_LIBOPENCSD
95libperf-$(CONFIG_AUXTRACE) += cs-etm.o
Mathieu Poirier68ffe392018-01-17 10:52:13 -070096libperf-$(CONFIG_AUXTRACE) += cs-etm-decoder/
Mathieu Poirier440a23b2018-01-17 10:52:11 -070097endif
98
Andi Kleenf00898f2015-05-27 10:51:51 -070099libperf-y += parse-branch-options.o
Andi Kleen48d02a12017-02-23 15:46:34 -0800100libperf-y += dump-insn.o
Stephane Eranianbcc84ec2015-08-31 18:41:12 +0200101libperf-y += parse-regs-options.o
Josh Poimboeuf1fe143c2015-12-07 22:21:42 -0600102libperf-y += term.o
Josh Poimboeuf5feaac22015-12-13 22:18:09 -0600103libperf-y += help-unknown-cmd.o
Jiri Olsaacbe6132016-02-15 09:34:34 +0100104libperf-y += mem-events.o
Arnaldo Carvalho de Melod0761e32016-07-07 15:42:33 -0300105libperf-y += vsprintf.o
Mathieu Poirier859442b2016-09-16 09:50:02 -0600106libperf-y += drv_configs.o
Arnaldo Carvalho de Melo58db1d62017-04-19 16:05:56 -0300107libperf-y += units.o
David Ahernfdf9dc42016-11-29 10:15:41 -0700108libperf-y += time-utils.o
Andi Kleen07516732017-03-20 13:17:05 -0700109libperf-y += expr-bison.o
Jin Yao992c7e92017-07-18 20:13:13 +0800110libperf-y += branch.o
Jiri Olsa4acf6142018-03-09 11:14:35 +0100111libperf-y += mem2node.o
Jiri Olsa9352aab2014-12-29 17:42:46 +0100112
Wang Nan84c86ca2015-10-14 12:41:14 +0000113libperf-$(CONFIG_LIBBPF) += bpf-loader.o
He Kuangbfc077b2015-11-16 12:10:12 +0000114libperf-$(CONFIG_BPF_PROLOGUE) += bpf-prologue.o
Jiri Olsa709e6792014-12-29 23:52:25 +0100115libperf-$(CONFIG_LIBELF) += symbol-elf.o
Masami Hiramatsu92f6c722015-07-15 18:14:07 +0900116libperf-$(CONFIG_LIBELF) += probe-file.o
Jiri Olsa709e6792014-12-29 23:52:25 +0100117libperf-$(CONFIG_LIBELF) += probe-event.o
118
119ifndef CONFIG_LIBELF
120libperf-y += symbol-minimal.o
121endif
122
Arnaldo Carvalho de Melo86bcdb52017-07-18 17:15:29 -0300123ifndef CONFIG_SETNS
124libperf-y += setns.o
125endif
126
Jiri Olsa8379fce2014-12-30 00:06:25 +0100127libperf-$(CONFIG_DWARF) += probe-finder.o
128libperf-$(CONFIG_DWARF) += dwarf-aux.o
Masami Hiramatsu293d5b42016-08-26 01:24:57 +0900129libperf-$(CONFIG_DWARF) += dwarf-regs.o
Jiri Olsa8379fce2014-12-30 00:06:25 +0100130
Jiri Olsab2e45c32014-12-30 00:11:11 +0100131libperf-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o
He Kuanga597b542016-06-03 03:33:16 +0000132libperf-$(CONFIG_LOCAL_LIBUNWIND) += unwind-libunwind-local.o
He Kuangf6d72532016-06-03 03:33:17 +0000133libperf-$(CONFIG_LIBUNWIND) += unwind-libunwind.o
He Kuang52ffe0f2016-06-03 03:33:22 +0000134libperf-$(CONFIG_LIBUNWIND_X86) += libunwind/x86_32.o
He Kuang057fbfb2016-06-03 03:33:23 +0000135libperf-$(CONFIG_LIBUNWIND_AARCH64) += libunwind/arm64.o
Jiri Olsab2e45c32014-12-30 00:11:11 +0100136
Jiri Olsaedbe9812015-02-20 23:17:00 +0100137libperf-$(CONFIG_LIBBABELTRACE) += data-convert-bt.o
138
Jiri Olsac7355f82014-12-30 13:11:32 +0100139libperf-y += scripting-engines/
140
Jiri Olsa1571b692014-12-30 13:31:12 +0100141libperf-$(CONFIG_ZLIB) += zlib.o
Jiri Olsa80a32e5b2015-01-29 13:29:39 +0100142libperf-$(CONFIG_LZMA) += lzma.o
Stephane Eraniane9c4bcd2015-11-30 10:02:20 +0100143libperf-y += demangle-java.o
David Tolnaycae15db2016-07-09 00:20:00 -0700144libperf-y += demangle-rust.o
Arnaldo Carvalho de Melo46dad052016-03-07 18:48:45 -0300145
Jiri Olsae12b2022016-03-10 17:41:13 +0100146ifdef CONFIG_JITDUMP
Stephane Eranian9b07e272015-11-30 10:02:21 +0100147libperf-$(CONFIG_LIBELF) += jitdump.o
148libperf-$(CONFIG_LIBELF) += genelf.o
Maciej Debski621cb4e2016-10-13 03:59:36 -0700149libperf-$(CONFIG_DWARF) += genelf_debug.o
Arnaldo Carvalho de Melo46dad052016-03-07 18:48:45 -0300150endif
Jiri Olsa3bc33742014-12-30 13:30:04 +0100151
Wang Nana0748652016-11-26 07:03:28 +0000152libperf-y += perf-hooks.o
153
Wang Nan00b86692016-11-26 07:03:34 +0000154libperf-$(CONFIG_CXX) += c++/
155
Jiri Olsa9352aab2014-12-29 17:42:46 +0100156CFLAGS_config.o += -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
Arnaldo Carvalho de Melo1b16fff2018-05-04 10:37:27 -0300157CFLAGS_llvm-utils.o += -DPERF_INCLUDE_DIR="BUILD_STR($(perf_include_dir_SQ))"
158
Stephane Eranian598b7c62015-11-30 10:02:23 +0100159# avoid compiler warnings in 32-bit mode
160CFLAGS_genelf_debug.o += -Wno-packed
Jiri Olsa9352aab2014-12-29 17:42:46 +0100161
162$(OUTPUT)util/parse-events-flex.c: util/parse-events.l $(OUTPUT)util/parse-events-bison.c
Jiri Olsa19993072014-12-30 18:44:38 +0100163 $(call rule_mkdir)
Jiri Olsa70923bd2015-05-14 12:31:48 -0300164 $(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 +0100165
166$(OUTPUT)util/parse-events-bison.c: util/parse-events.y
Jiri Olsa19993072014-12-30 18:44:38 +0100167 $(call rule_mkdir)
Jiri Olsa70923bd2015-05-14 12:31:48 -0300168 $(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 +0100169
Andi Kleen07516732017-03-20 13:17:05 -0700170$(OUTPUT)util/expr-bison.c: util/expr.y
171 $(call rule_mkdir)
172 $(Q)$(call echo-cmd,bison)$(BISON) -v util/expr.y -d $(PARSER_DEBUG_BISON) -o $@ -p expr__
173
Jiri Olsa9352aab2014-12-29 17:42:46 +0100174$(OUTPUT)util/pmu-flex.c: util/pmu.l $(OUTPUT)util/pmu-bison.c
Jiri Olsa19993072014-12-30 18:44:38 +0100175 $(call rule_mkdir)
Jiri Olsa70923bd2015-05-14 12:31:48 -0300176 $(Q)$(call echo-cmd,flex)$(FLEX) -o $@ --header-file=$(OUTPUT)util/pmu-flex.h util/pmu.l
Jiri Olsa9352aab2014-12-29 17:42:46 +0100177
178$(OUTPUT)util/pmu-bison.c: util/pmu.y
Jiri Olsa19993072014-12-30 18:44:38 +0100179 $(call rule_mkdir)
Jiri Olsa70923bd2015-05-14 12:31:48 -0300180 $(Q)$(call echo-cmd,bison)$(BISON) -v util/pmu.y -d -o $@ -p perf_pmu_
Jiri Olsa9352aab2014-12-29 17:42:46 +0100181
182CFLAGS_parse-events-flex.o += -w
183CFLAGS_pmu-flex.o += -w
Namhyung Kim539f3aa2015-04-29 12:55:00 -0300184CFLAGS_parse-events-bison.o += -DYYENABLE_NLS=0 -w
Jiri Olsa9352aab2014-12-29 17:42:46 +0100185CFLAGS_pmu-bison.o += -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -w
Andi Kleen07516732017-03-20 13:17:05 -0700186CFLAGS_expr-bison.o += -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -w
Jiri Olsa9352aab2014-12-29 17:42:46 +0100187
188$(OUTPUT)util/parse-events.o: $(OUTPUT)util/parse-events-flex.c $(OUTPUT)util/parse-events-bison.c
189$(OUTPUT)util/pmu.o: $(OUTPUT)util/pmu-flex.c $(OUTPUT)util/pmu-bison.c
190
Arnaldo Carvalho de Melo915b0882016-01-08 12:33:37 -0300191CFLAGS_bitmap.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
Arnaldo Carvalho de Melo552eb9752016-01-08 10:46:52 -0300192CFLAGS_find_bit.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
Jiri Olsa9352aab2014-12-29 17:42:46 +0100193CFLAGS_rbtree.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
Arnaldo Carvalho de Melo4ddd3272015-11-16 11:36:29 -0300194CFLAGS_libstring.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
Jiri Olsa9352aab2014-12-29 17:42:46 +0100195CFLAGS_hweight.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
196CFLAGS_parse-events.o += -Wno-redundant-decls
Soramichi AKIYAMAd25ed5d2017-01-17 00:22:37 +0900197CFLAGS_header.o += -include $(OUTPUT)PERF-VERSION-FILE
Jiri Olsa9352aab2014-12-29 17:42:46 +0100198
199$(OUTPUT)util/kallsyms.o: ../lib/symbol/kallsyms.c FORCE
Jiri Olsa19993072014-12-30 18:44:38 +0100200 $(call rule_mkdir)
Jiri Olsa9352aab2014-12-29 17:42:46 +0100201 $(call if_changed_dep,cc_o_c)
202
Arnaldo Carvalho de Melo915b0882016-01-08 12:33:37 -0300203$(OUTPUT)util/bitmap.o: ../lib/bitmap.c FORCE
204 $(call rule_mkdir)
205 $(call if_changed_dep,cc_o_c)
206
Arnaldo Carvalho de Melo552eb9752016-01-08 10:46:52 -0300207$(OUTPUT)util/find_bit.o: ../lib/find_bit.c FORCE
Jiri Olsa19993072014-12-30 18:44:38 +0100208 $(call rule_mkdir)
Jiri Olsa9352aab2014-12-29 17:42:46 +0100209 $(call if_changed_dep,cc_o_c)
210
Arnaldo Carvalho de Melo3f735372015-07-05 22:48:21 -0300211$(OUTPUT)util/rbtree.o: ../lib/rbtree.c FORCE
Jiri Olsa19993072014-12-30 18:44:38 +0100212 $(call rule_mkdir)
Jiri Olsa9352aab2014-12-29 17:42:46 +0100213 $(call if_changed_dep,cc_o_c)
214
Arnaldo Carvalho de Melo4ddd3272015-11-16 11:36:29 -0300215$(OUTPUT)util/libstring.o: ../lib/string.c FORCE
216 $(call rule_mkdir)
217 $(call if_changed_dep,cc_o_c)
218
Arnaldo Carvalho de Melo0aefc352015-07-09 16:27:25 -0300219$(OUTPUT)util/hweight.o: ../lib/hweight.c FORCE
Jiri Olsa19993072014-12-30 18:44:38 +0100220 $(call rule_mkdir)
Jiri Olsa9352aab2014-12-29 17:42:46 +0100221 $(call if_changed_dep,cc_o_c)
Arnaldo Carvalho de Melod0761e32016-07-07 15:42:33 -0300222
223$(OUTPUT)util/vsprintf.o: ../lib/vsprintf.c FORCE
224 $(call rule_mkdir)
225 $(call if_changed_dep,cc_o_c)