blob: c054ff802efbd29e15117c5f87192095742f767d [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
Jiri Olsa9352aab2014-12-29 17:42:46 +010013libperf-y += kallsyms.o
14libperf-y += levenshtein.o
Wang Nanaa61fd02015-07-21 11:13:34 +000015libperf-y += llvm-utils.o
Arnaldo Carvalho de Melo16958492017-10-06 10:31:47 -030016libperf-y += mmap.o
Arnaldo Carvalho de Melo98521b32017-04-25 15:45:35 -030017libperf-y += memswap.o
Jiri Olsa9352aab2014-12-29 17:42:46 +010018libperf-y += parse-events.o
Sukadev Bhattiprolueb56db52015-09-24 17:53:49 -040019libperf-y += perf_regs.o
Jiri Olsa9352aab2014-12-29 17:42:46 +010020libperf-y += path.o
Arnaldo Carvalho de Melofea01392017-04-17 16:23:22 -030021libperf-y += print_binary.o
Jiri Olsa9352aab2014-12-29 17:42:46 +010022libperf-y += rbtree.o
Arnaldo Carvalho de Melo4ddd3272015-11-16 11:36:29 -030023libperf-y += libstring.o
Jiri Olsa9352aab2014-12-29 17:42:46 +010024libperf-y += bitmap.o
25libperf-y += hweight.o
Andi Kleende5077c2017-08-11 16:26:22 -070026libperf-y += smt.o
Jiri Olsa9352aab2014-12-29 17:42:46 +010027libperf-y += quote.o
28libperf-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 Olsa9352aab2014-12-29 17:42:46 +010077libperf-y += record.o
78libperf-y += srcline.o
79libperf-y += data.o
Adrian Hunter2a28e232016-03-08 10:38:50 +020080libperf-y += tsc.o
Jiri Olsa9352aab2014-12-29 17:42:46 +010081libperf-y += cloexec.o
Chris Phlipot451db122016-04-28 01:19:07 -070082libperf-y += call-path.o
Arnaldo Carvalho de Melo0a7c74e2017-04-04 13:15:04 -030083libperf-y += rwsem.o
Jiri Olsa9352aab2014-12-29 17:42:46 +010084libperf-y += thread-stack.o
Adrian Huntere31f0d02015-04-30 17:37:27 +030085libperf-$(CONFIG_AUXTRACE) += auxtrace.o
Adrian Huntera4e92592015-07-17 19:33:37 +030086libperf-$(CONFIG_AUXTRACE) += intel-pt-decoder/
Adrian Hunter90e457f2015-07-17 19:33:41 +030087libperf-$(CONFIG_AUXTRACE) += intel-pt.o
Adrian Hunterd0170af2015-07-17 19:33:43 +030088libperf-$(CONFIG_AUXTRACE) += intel-bts.o
Kim Phillipsffd3d182018-01-14 13:28:50 -060089libperf-$(CONFIG_AUXTRACE) += arm-spe.o
90libperf-$(CONFIG_AUXTRACE) += arm-spe-pkt-decoder.o
Mathieu Poirier440a23b2018-01-17 10:52:11 -070091
92ifdef CONFIG_LIBOPENCSD
93libperf-$(CONFIG_AUXTRACE) += cs-etm.o
94endif
95
Andi Kleenf00898f2015-05-27 10:51:51 -070096libperf-y += parse-branch-options.o
Andi Kleen48d02a12017-02-23 15:46:34 -080097libperf-y += dump-insn.o
Stephane Eranianbcc84ec2015-08-31 18:41:12 +020098libperf-y += parse-regs-options.o
Josh Poimboeuf1fe143c2015-12-07 22:21:42 -060099libperf-y += term.o
Josh Poimboeuf5feaac22015-12-13 22:18:09 -0600100libperf-y += help-unknown-cmd.o
Jiri Olsaacbe6132016-02-15 09:34:34 +0100101libperf-y += mem-events.o
Arnaldo Carvalho de Melod0761e32016-07-07 15:42:33 -0300102libperf-y += vsprintf.o
Mathieu Poirier859442b2016-09-16 09:50:02 -0600103libperf-y += drv_configs.o
Arnaldo Carvalho de Melo58db1d62017-04-19 16:05:56 -0300104libperf-y += units.o
David Ahernfdf9dc42016-11-29 10:15:41 -0700105libperf-y += time-utils.o
Andi Kleen07516732017-03-20 13:17:05 -0700106libperf-y += expr-bison.o
Jin Yao992c7e92017-07-18 20:13:13 +0800107libperf-y += branch.o
Jiri Olsa9352aab2014-12-29 17:42:46 +0100108
Wang Nan84c86ca2015-10-14 12:41:14 +0000109libperf-$(CONFIG_LIBBPF) += bpf-loader.o
He Kuangbfc077b2015-11-16 12:10:12 +0000110libperf-$(CONFIG_BPF_PROLOGUE) += bpf-prologue.o
Jiri Olsa709e6792014-12-29 23:52:25 +0100111libperf-$(CONFIG_LIBELF) += symbol-elf.o
Masami Hiramatsu92f6c722015-07-15 18:14:07 +0900112libperf-$(CONFIG_LIBELF) += probe-file.o
Jiri Olsa709e6792014-12-29 23:52:25 +0100113libperf-$(CONFIG_LIBELF) += probe-event.o
114
115ifndef CONFIG_LIBELF
116libperf-y += symbol-minimal.o
117endif
118
Arnaldo Carvalho de Melo86bcdb52017-07-18 17:15:29 -0300119ifndef CONFIG_SETNS
120libperf-y += setns.o
121endif
122
Jiri Olsa8379fce2014-12-30 00:06:25 +0100123libperf-$(CONFIG_DWARF) += probe-finder.o
124libperf-$(CONFIG_DWARF) += dwarf-aux.o
Masami Hiramatsu293d5b42016-08-26 01:24:57 +0900125libperf-$(CONFIG_DWARF) += dwarf-regs.o
Jiri Olsa8379fce2014-12-30 00:06:25 +0100126
Jiri Olsab2e45c32014-12-30 00:11:11 +0100127libperf-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o
He Kuanga597b542016-06-03 03:33:16 +0000128libperf-$(CONFIG_LOCAL_LIBUNWIND) += unwind-libunwind-local.o
He Kuangf6d72532016-06-03 03:33:17 +0000129libperf-$(CONFIG_LIBUNWIND) += unwind-libunwind.o
He Kuang52ffe0f2016-06-03 03:33:22 +0000130libperf-$(CONFIG_LIBUNWIND_X86) += libunwind/x86_32.o
He Kuang057fbfb2016-06-03 03:33:23 +0000131libperf-$(CONFIG_LIBUNWIND_AARCH64) += libunwind/arm64.o
Jiri Olsab2e45c32014-12-30 00:11:11 +0100132
Jiri Olsaedbe9812015-02-20 23:17:00 +0100133libperf-$(CONFIG_LIBBABELTRACE) += data-convert-bt.o
134
Jiri Olsac7355f82014-12-30 13:11:32 +0100135libperf-y += scripting-engines/
136
Jiri Olsa1571b692014-12-30 13:31:12 +0100137libperf-$(CONFIG_ZLIB) += zlib.o
Jiri Olsa80a32e5b2015-01-29 13:29:39 +0100138libperf-$(CONFIG_LZMA) += lzma.o
Stephane Eraniane9c4bcd2015-11-30 10:02:20 +0100139libperf-y += demangle-java.o
David Tolnaycae15db2016-07-09 00:20:00 -0700140libperf-y += demangle-rust.o
Arnaldo Carvalho de Melo46dad052016-03-07 18:48:45 -0300141
Jiri Olsae12b2022016-03-10 17:41:13 +0100142ifdef CONFIG_JITDUMP
Stephane Eranian9b07e272015-11-30 10:02:21 +0100143libperf-$(CONFIG_LIBELF) += jitdump.o
144libperf-$(CONFIG_LIBELF) += genelf.o
Maciej Debski621cb4e2016-10-13 03:59:36 -0700145libperf-$(CONFIG_DWARF) += genelf_debug.o
Arnaldo Carvalho de Melo46dad052016-03-07 18:48:45 -0300146endif
Jiri Olsa3bc33742014-12-30 13:30:04 +0100147
Wang Nana0748652016-11-26 07:03:28 +0000148libperf-y += perf-hooks.o
149
Wang Nan00b86692016-11-26 07:03:34 +0000150libperf-$(CONFIG_CXX) += c++/
151
Jiri Olsa9352aab2014-12-29 17:42:46 +0100152CFLAGS_config.o += -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
Stephane Eranian598b7c62015-11-30 10:02:23 +0100153# avoid compiler warnings in 32-bit mode
154CFLAGS_genelf_debug.o += -Wno-packed
Jiri Olsa9352aab2014-12-29 17:42:46 +0100155
156$(OUTPUT)util/parse-events-flex.c: util/parse-events.l $(OUTPUT)util/parse-events-bison.c
Jiri Olsa19993072014-12-30 18:44:38 +0100157 $(call rule_mkdir)
Jiri Olsa70923bd2015-05-14 12:31:48 -0300158 $(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 +0100159
160$(OUTPUT)util/parse-events-bison.c: util/parse-events.y
Jiri Olsa19993072014-12-30 18:44:38 +0100161 $(call rule_mkdir)
Jiri Olsa70923bd2015-05-14 12:31:48 -0300162 $(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 +0100163
Andi Kleen07516732017-03-20 13:17:05 -0700164$(OUTPUT)util/expr-bison.c: util/expr.y
165 $(call rule_mkdir)
166 $(Q)$(call echo-cmd,bison)$(BISON) -v util/expr.y -d $(PARSER_DEBUG_BISON) -o $@ -p expr__
167
Jiri Olsa9352aab2014-12-29 17:42:46 +0100168$(OUTPUT)util/pmu-flex.c: util/pmu.l $(OUTPUT)util/pmu-bison.c
Jiri Olsa19993072014-12-30 18:44:38 +0100169 $(call rule_mkdir)
Jiri Olsa70923bd2015-05-14 12:31:48 -0300170 $(Q)$(call echo-cmd,flex)$(FLEX) -o $@ --header-file=$(OUTPUT)util/pmu-flex.h util/pmu.l
Jiri Olsa9352aab2014-12-29 17:42:46 +0100171
172$(OUTPUT)util/pmu-bison.c: util/pmu.y
Jiri Olsa19993072014-12-30 18:44:38 +0100173 $(call rule_mkdir)
Jiri Olsa70923bd2015-05-14 12:31:48 -0300174 $(Q)$(call echo-cmd,bison)$(BISON) -v util/pmu.y -d -o $@ -p perf_pmu_
Jiri Olsa9352aab2014-12-29 17:42:46 +0100175
176CFLAGS_parse-events-flex.o += -w
177CFLAGS_pmu-flex.o += -w
Namhyung Kim539f3aa2015-04-29 12:55:00 -0300178CFLAGS_parse-events-bison.o += -DYYENABLE_NLS=0 -w
Jiri Olsa9352aab2014-12-29 17:42:46 +0100179CFLAGS_pmu-bison.o += -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -w
Andi Kleen07516732017-03-20 13:17:05 -0700180CFLAGS_expr-bison.o += -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -w
Jiri Olsa9352aab2014-12-29 17:42:46 +0100181
182$(OUTPUT)util/parse-events.o: $(OUTPUT)util/parse-events-flex.c $(OUTPUT)util/parse-events-bison.c
183$(OUTPUT)util/pmu.o: $(OUTPUT)util/pmu-flex.c $(OUTPUT)util/pmu-bison.c
184
Arnaldo Carvalho de Melo915b0882016-01-08 12:33:37 -0300185CFLAGS_bitmap.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
Arnaldo Carvalho de Melo552eb9752016-01-08 10:46:52 -0300186CFLAGS_find_bit.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
Jiri Olsa9352aab2014-12-29 17:42:46 +0100187CFLAGS_rbtree.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
Arnaldo Carvalho de Melo4ddd3272015-11-16 11:36:29 -0300188CFLAGS_libstring.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
Jiri Olsa9352aab2014-12-29 17:42:46 +0100189CFLAGS_hweight.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
190CFLAGS_parse-events.o += -Wno-redundant-decls
Soramichi AKIYAMAd25ed5d2017-01-17 00:22:37 +0900191CFLAGS_header.o += -include $(OUTPUT)PERF-VERSION-FILE
Jiri Olsa9352aab2014-12-29 17:42:46 +0100192
193$(OUTPUT)util/kallsyms.o: ../lib/symbol/kallsyms.c FORCE
Jiri Olsa19993072014-12-30 18:44:38 +0100194 $(call rule_mkdir)
Jiri Olsa9352aab2014-12-29 17:42:46 +0100195 $(call if_changed_dep,cc_o_c)
196
Arnaldo Carvalho de Melo915b0882016-01-08 12:33:37 -0300197$(OUTPUT)util/bitmap.o: ../lib/bitmap.c FORCE
198 $(call rule_mkdir)
199 $(call if_changed_dep,cc_o_c)
200
Arnaldo Carvalho de Melo552eb9752016-01-08 10:46:52 -0300201$(OUTPUT)util/find_bit.o: ../lib/find_bit.c FORCE
Jiri Olsa19993072014-12-30 18:44:38 +0100202 $(call rule_mkdir)
Jiri Olsa9352aab2014-12-29 17:42:46 +0100203 $(call if_changed_dep,cc_o_c)
204
Arnaldo Carvalho de Melo3f735372015-07-05 22:48:21 -0300205$(OUTPUT)util/rbtree.o: ../lib/rbtree.c FORCE
Jiri Olsa19993072014-12-30 18:44:38 +0100206 $(call rule_mkdir)
Jiri Olsa9352aab2014-12-29 17:42:46 +0100207 $(call if_changed_dep,cc_o_c)
208
Arnaldo Carvalho de Melo4ddd3272015-11-16 11:36:29 -0300209$(OUTPUT)util/libstring.o: ../lib/string.c FORCE
210 $(call rule_mkdir)
211 $(call if_changed_dep,cc_o_c)
212
Arnaldo Carvalho de Melo0aefc352015-07-09 16:27:25 -0300213$(OUTPUT)util/hweight.o: ../lib/hweight.c FORCE
Jiri Olsa19993072014-12-30 18:44:38 +0100214 $(call rule_mkdir)
Jiri Olsa9352aab2014-12-29 17:42:46 +0100215 $(call if_changed_dep,cc_o_c)
Arnaldo Carvalho de Melod0761e32016-07-07 15:42:33 -0300216
217$(OUTPUT)util/vsprintf.o: ../lib/vsprintf.c FORCE
218 $(call rule_mkdir)
219 $(call if_changed_dep,cc_o_c)