blob: 069583bdc670f0bf05c3f48762a53dc412a67fae [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
Jiri Olsa9352aab2014-12-29 17:42:46 +010016libperf-y += parse-events.o
Sukadev Bhattiprolueb56db52015-09-24 17:53:49 -040017libperf-y += perf_regs.o
Jiri Olsa9352aab2014-12-29 17:42:46 +010018libperf-y += path.o
Arnaldo Carvalho de Melofea01392017-04-17 16:23:22 -030019libperf-y += print_binary.o
Jiri Olsa9352aab2014-12-29 17:42:46 +010020libperf-y += rbtree.o
Arnaldo Carvalho de Melo4ddd3272015-11-16 11:36:29 -030021libperf-y += libstring.o
Jiri Olsa9352aab2014-12-29 17:42:46 +010022libperf-y += bitmap.o
23libperf-y += hweight.o
Jiri Olsa9352aab2014-12-29 17:42:46 +010024libperf-y += quote.o
25libperf-y += strbuf.o
26libperf-y += string.o
27libperf-y += strlist.o
28libperf-y += strfilter.o
29libperf-y += top.o
30libperf-y += usage.o
Jiri Olsa9352aab2014-12-29 17:42:46 +010031libperf-y += dso.o
32libperf-y += symbol.o
Arnaldo Carvalho de Melobfbba182016-04-14 15:54:36 -030033libperf-y += symbol_fprintf.o
Jiri Olsa9352aab2014-12-29 17:42:46 +010034libperf-y += color.o
Jiri Olsa9352aab2014-12-29 17:42:46 +010035libperf-y += header.o
36libperf-y += callchain.o
37libperf-y += values.o
38libperf-y += debug.o
39libperf-y += machine.o
40libperf-y += map.o
41libperf-y += pstack.o
42libperf-y += session.o
Arnaldo Carvalho de Melofd0db102016-04-04 13:32:20 -030043libperf-$(CONFIG_AUDIT) += syscalltbl.o
Jiri Olsa9352aab2014-12-29 17:42:46 +010044libperf-y += ordered-events.o
Hari Bathinif3b36142017-03-08 02:11:43 +053045libperf-y += namespaces.o
Jiri Olsa9352aab2014-12-29 17:42:46 +010046libperf-y += comm.o
47libperf-y += thread.o
48libperf-y += thread_map.o
49libperf-y += trace-event-parse.o
50libperf-y += parse-events-flex.o
51libperf-y += parse-events-bison.o
52libperf-y += pmu.o
53libperf-y += pmu-flex.o
54libperf-y += pmu-bison.o
55libperf-y += trace-event-read.o
56libperf-y += trace-event-info.o
57libperf-y += trace-event-scripting.o
58libperf-y += trace-event.o
59libperf-y += svghelper.o
60libperf-y += sort.o
61libperf-y += hist.o
62libperf-y += util.o
63libperf-y += xyarray.o
64libperf-y += cpumap.o
65libperf-y += cgroup.o
66libperf-y += target.o
67libperf-y += rblist.o
68libperf-y += intlist.o
69libperf-y += vdso.o
Jiri Olsad8095602015-08-07 12:51:03 +020070libperf-y += counts.o
Jiri Olsa9352aab2014-12-29 17:42:46 +010071libperf-y += stat.o
Jiri Olsaf87027b2015-06-03 16:25:59 +020072libperf-y += stat-shadow.o
Jiri Olsa9352aab2014-12-29 17:42:46 +010073libperf-y += record.o
74libperf-y += srcline.o
75libperf-y += data.o
Adrian Hunter2a28e232016-03-08 10:38:50 +020076libperf-y += tsc.o
Jiri Olsa9352aab2014-12-29 17:42:46 +010077libperf-y += cloexec.o
Chris Phlipot451db122016-04-28 01:19:07 -070078libperf-y += call-path.o
Jiri Olsa9352aab2014-12-29 17:42:46 +010079libperf-y += thread-stack.o
Adrian Huntere31f0d02015-04-30 17:37:27 +030080libperf-$(CONFIG_AUXTRACE) += auxtrace.o
Adrian Huntera4e92592015-07-17 19:33:37 +030081libperf-$(CONFIG_AUXTRACE) += intel-pt-decoder/
Adrian Hunter90e457f2015-07-17 19:33:41 +030082libperf-$(CONFIG_AUXTRACE) += intel-pt.o
Adrian Hunterd0170af2015-07-17 19:33:43 +030083libperf-$(CONFIG_AUXTRACE) += intel-bts.o
Andi Kleenf00898f2015-05-27 10:51:51 -070084libperf-y += parse-branch-options.o
Andi Kleen48d02a12017-02-23 15:46:34 -080085libperf-y += dump-insn.o
Stephane Eranianbcc84ec2015-08-31 18:41:12 +020086libperf-y += parse-regs-options.o
Josh Poimboeuf1fe143c2015-12-07 22:21:42 -060087libperf-y += term.o
Josh Poimboeuf5feaac22015-12-13 22:18:09 -060088libperf-y += help-unknown-cmd.o
Jiri Olsaacbe6132016-02-15 09:34:34 +010089libperf-y += mem-events.o
Arnaldo Carvalho de Melod0761e32016-07-07 15:42:33 -030090libperf-y += vsprintf.o
Mathieu Poirier859442b2016-09-16 09:50:02 -060091libperf-y += drv_configs.o
Arnaldo Carvalho de Melo58db1d62017-04-19 16:05:56 -030092libperf-y += units.o
David Ahernfdf9dc42016-11-29 10:15:41 -070093libperf-y += time-utils.o
Andi Kleen07516732017-03-20 13:17:05 -070094libperf-y += expr-bison.o
Jiri Olsa9352aab2014-12-29 17:42:46 +010095
Wang Nan84c86ca2015-10-14 12:41:14 +000096libperf-$(CONFIG_LIBBPF) += bpf-loader.o
He Kuangbfc077b2015-11-16 12:10:12 +000097libperf-$(CONFIG_BPF_PROLOGUE) += bpf-prologue.o
Jiri Olsa709e6792014-12-29 23:52:25 +010098libperf-$(CONFIG_LIBELF) += symbol-elf.o
Masami Hiramatsu92f6c722015-07-15 18:14:07 +090099libperf-$(CONFIG_LIBELF) += probe-file.o
Jiri Olsa709e6792014-12-29 23:52:25 +0100100libperf-$(CONFIG_LIBELF) += probe-event.o
101
102ifndef CONFIG_LIBELF
103libperf-y += symbol-minimal.o
104endif
105
Jiri Olsa8379fce2014-12-30 00:06:25 +0100106libperf-$(CONFIG_DWARF) += probe-finder.o
107libperf-$(CONFIG_DWARF) += dwarf-aux.o
Masami Hiramatsu293d5b42016-08-26 01:24:57 +0900108libperf-$(CONFIG_DWARF) += dwarf-regs.o
Jiri Olsa8379fce2014-12-30 00:06:25 +0100109
Jiri Olsab2e45c32014-12-30 00:11:11 +0100110libperf-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o
He Kuanga597b542016-06-03 03:33:16 +0000111libperf-$(CONFIG_LOCAL_LIBUNWIND) += unwind-libunwind-local.o
He Kuangf6d72532016-06-03 03:33:17 +0000112libperf-$(CONFIG_LIBUNWIND) += unwind-libunwind.o
He Kuang52ffe0f2016-06-03 03:33:22 +0000113libperf-$(CONFIG_LIBUNWIND_X86) += libunwind/x86_32.o
He Kuang057fbfb2016-06-03 03:33:23 +0000114libperf-$(CONFIG_LIBUNWIND_AARCH64) += libunwind/arm64.o
Jiri Olsab2e45c32014-12-30 00:11:11 +0100115
Jiri Olsaedbe9812015-02-20 23:17:00 +0100116libperf-$(CONFIG_LIBBABELTRACE) += data-convert-bt.o
117
Jiri Olsac7355f82014-12-30 13:11:32 +0100118libperf-y += scripting-engines/
119
Jiri Olsa1571b692014-12-30 13:31:12 +0100120libperf-$(CONFIG_ZLIB) += zlib.o
Jiri Olsa80a32e5b2015-01-29 13:29:39 +0100121libperf-$(CONFIG_LZMA) += lzma.o
Stephane Eraniane9c4bcd2015-11-30 10:02:20 +0100122libperf-y += demangle-java.o
David Tolnaycae15db2016-07-09 00:20:00 -0700123libperf-y += demangle-rust.o
Arnaldo Carvalho de Melo46dad052016-03-07 18:48:45 -0300124
Jiri Olsae12b2022016-03-10 17:41:13 +0100125ifdef CONFIG_JITDUMP
Stephane Eranian9b07e272015-11-30 10:02:21 +0100126libperf-$(CONFIG_LIBELF) += jitdump.o
127libperf-$(CONFIG_LIBELF) += genelf.o
Maciej Debski621cb4e2016-10-13 03:59:36 -0700128libperf-$(CONFIG_DWARF) += genelf_debug.o
Arnaldo Carvalho de Melo46dad052016-03-07 18:48:45 -0300129endif
Jiri Olsa3bc33742014-12-30 13:30:04 +0100130
Wang Nana0748652016-11-26 07:03:28 +0000131libperf-y += perf-hooks.o
132
Wang Nan00b86692016-11-26 07:03:34 +0000133libperf-$(CONFIG_CXX) += c++/
134
Jiri Olsa9352aab2014-12-29 17:42:46 +0100135CFLAGS_config.o += -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
Stephane Eranian598b7c62015-11-30 10:02:23 +0100136# avoid compiler warnings in 32-bit mode
137CFLAGS_genelf_debug.o += -Wno-packed
Jiri Olsa9352aab2014-12-29 17:42:46 +0100138
139$(OUTPUT)util/parse-events-flex.c: util/parse-events.l $(OUTPUT)util/parse-events-bison.c
Jiri Olsa19993072014-12-30 18:44:38 +0100140 $(call rule_mkdir)
Jiri Olsa70923bd2015-05-14 12:31:48 -0300141 $(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 +0100142
143$(OUTPUT)util/parse-events-bison.c: util/parse-events.y
Jiri Olsa19993072014-12-30 18:44:38 +0100144 $(call rule_mkdir)
Jiri Olsa70923bd2015-05-14 12:31:48 -0300145 $(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 +0100146
Andi Kleen07516732017-03-20 13:17:05 -0700147$(OUTPUT)util/expr-bison.c: util/expr.y
148 $(call rule_mkdir)
149 $(Q)$(call echo-cmd,bison)$(BISON) -v util/expr.y -d $(PARSER_DEBUG_BISON) -o $@ -p expr__
150
Jiri Olsa9352aab2014-12-29 17:42:46 +0100151$(OUTPUT)util/pmu-flex.c: util/pmu.l $(OUTPUT)util/pmu-bison.c
Jiri Olsa19993072014-12-30 18:44:38 +0100152 $(call rule_mkdir)
Jiri Olsa70923bd2015-05-14 12:31:48 -0300153 $(Q)$(call echo-cmd,flex)$(FLEX) -o $@ --header-file=$(OUTPUT)util/pmu-flex.h util/pmu.l
Jiri Olsa9352aab2014-12-29 17:42:46 +0100154
155$(OUTPUT)util/pmu-bison.c: util/pmu.y
Jiri Olsa19993072014-12-30 18:44:38 +0100156 $(call rule_mkdir)
Jiri Olsa70923bd2015-05-14 12:31:48 -0300157 $(Q)$(call echo-cmd,bison)$(BISON) -v util/pmu.y -d -o $@ -p perf_pmu_
Jiri Olsa9352aab2014-12-29 17:42:46 +0100158
159CFLAGS_parse-events-flex.o += -w
160CFLAGS_pmu-flex.o += -w
Namhyung Kim539f3aa2015-04-29 12:55:00 -0300161CFLAGS_parse-events-bison.o += -DYYENABLE_NLS=0 -w
Jiri Olsa9352aab2014-12-29 17:42:46 +0100162CFLAGS_pmu-bison.o += -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -w
Andi Kleen07516732017-03-20 13:17:05 -0700163CFLAGS_expr-bison.o += -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -w
Jiri Olsa9352aab2014-12-29 17:42:46 +0100164
165$(OUTPUT)util/parse-events.o: $(OUTPUT)util/parse-events-flex.c $(OUTPUT)util/parse-events-bison.c
166$(OUTPUT)util/pmu.o: $(OUTPUT)util/pmu-flex.c $(OUTPUT)util/pmu-bison.c
167
Arnaldo Carvalho de Melo915b0882016-01-08 12:33:37 -0300168CFLAGS_bitmap.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
Arnaldo Carvalho de Melo552eb9752016-01-08 10:46:52 -0300169CFLAGS_find_bit.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
Jiri Olsa9352aab2014-12-29 17:42:46 +0100170CFLAGS_rbtree.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
Arnaldo Carvalho de Melo4ddd3272015-11-16 11:36:29 -0300171CFLAGS_libstring.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
Jiri Olsa9352aab2014-12-29 17:42:46 +0100172CFLAGS_hweight.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
173CFLAGS_parse-events.o += -Wno-redundant-decls
Soramichi AKIYAMAd25ed5d2017-01-17 00:22:37 +0900174CFLAGS_header.o += -include $(OUTPUT)PERF-VERSION-FILE
Jiri Olsa9352aab2014-12-29 17:42:46 +0100175
176$(OUTPUT)util/kallsyms.o: ../lib/symbol/kallsyms.c FORCE
Jiri Olsa19993072014-12-30 18:44:38 +0100177 $(call rule_mkdir)
Jiri Olsa9352aab2014-12-29 17:42:46 +0100178 $(call if_changed_dep,cc_o_c)
179
Arnaldo Carvalho de Melo915b0882016-01-08 12:33:37 -0300180$(OUTPUT)util/bitmap.o: ../lib/bitmap.c FORCE
181 $(call rule_mkdir)
182 $(call if_changed_dep,cc_o_c)
183
Arnaldo Carvalho de Melo552eb9752016-01-08 10:46:52 -0300184$(OUTPUT)util/find_bit.o: ../lib/find_bit.c FORCE
Jiri Olsa19993072014-12-30 18:44:38 +0100185 $(call rule_mkdir)
Jiri Olsa9352aab2014-12-29 17:42:46 +0100186 $(call if_changed_dep,cc_o_c)
187
Arnaldo Carvalho de Melo3f735372015-07-05 22:48:21 -0300188$(OUTPUT)util/rbtree.o: ../lib/rbtree.c FORCE
Jiri Olsa19993072014-12-30 18:44:38 +0100189 $(call rule_mkdir)
Jiri Olsa9352aab2014-12-29 17:42:46 +0100190 $(call if_changed_dep,cc_o_c)
191
Arnaldo Carvalho de Melo4ddd3272015-11-16 11:36:29 -0300192$(OUTPUT)util/libstring.o: ../lib/string.c FORCE
193 $(call rule_mkdir)
194 $(call if_changed_dep,cc_o_c)
195
Arnaldo Carvalho de Melo0aefc352015-07-09 16:27:25 -0300196$(OUTPUT)util/hweight.o: ../lib/hweight.c FORCE
Jiri Olsa19993072014-12-30 18:44:38 +0100197 $(call rule_mkdir)
Jiri Olsa9352aab2014-12-29 17:42:46 +0100198 $(call if_changed_dep,cc_o_c)
Arnaldo Carvalho de Melod0761e32016-07-07 15:42:33 -0300199
200$(OUTPUT)util/vsprintf.o: ../lib/vsprintf.c FORCE
201 $(call rule_mkdir)
202 $(call if_changed_dep,cc_o_c)