blob: 2ea5ee179a3b1a162d4cad72ef7557bddc3d32f7 [file] [log] [blame]
Jiri Olsa9352aab2014-12-29 17:42:46 +01001libperf-y += alias.o
2libperf-y += annotate.o
Peter Zijlstra70fbe052016-09-05 16:08:12 -03003libperf-y += block-range.o
Jiri Olsa9352aab2014-12-29 17:42:46 +01004libperf-y += build-id.o
5libperf-y += config.o
6libperf-y += ctype.o
7libperf-y += db-export.o
Arnaldo Carvalho de Melof0ce8882015-09-08 13:30:00 -03008libperf-y += env.o
Jiri Olsa9352aab2014-12-29 17:42:46 +01009libperf-y += event.o
10libperf-y += evlist.o
11libperf-y += evsel.o
Arnaldo Carvalho de Melo25da4fa2016-04-14 19:45:01 -030012libperf-y += evsel_fprintf.o
Arnaldo Carvalho de Melo552eb9752016-01-08 10:46:52 -030013libperf-y += find_bit.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
Jiri Olsa9352aab2014-12-29 17:42:46 +010017libperf-y += parse-events.o
Sukadev Bhattiprolueb56db52015-09-24 17:53:49 -040018libperf-y += perf_regs.o
Jiri Olsa9352aab2014-12-29 17:42:46 +010019libperf-y += path.o
20libperf-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
Stephane Eranianbcc84ec2015-08-31 18:41:12 +020085libperf-y += parse-regs-options.o
Josh Poimboeuf1fe143c2015-12-07 22:21:42 -060086libperf-y += term.o
Josh Poimboeuf5feaac22015-12-13 22:18:09 -060087libperf-y += help-unknown-cmd.o
Jiri Olsaacbe6132016-02-15 09:34:34 +010088libperf-y += mem-events.o
Arnaldo Carvalho de Melod0761e32016-07-07 15:42:33 -030089libperf-y += vsprintf.o
Mathieu Poirier859442b2016-09-16 09:50:02 -060090libperf-y += drv_configs.o
David Ahernfdf9dc42016-11-29 10:15:41 -070091libperf-y += time-utils.o
Jiri Olsa9352aab2014-12-29 17:42:46 +010092
Wang Nan84c86ca2015-10-14 12:41:14 +000093libperf-$(CONFIG_LIBBPF) += bpf-loader.o
He Kuangbfc077b2015-11-16 12:10:12 +000094libperf-$(CONFIG_BPF_PROLOGUE) += bpf-prologue.o
Jiri Olsa709e6792014-12-29 23:52:25 +010095libperf-$(CONFIG_LIBELF) += symbol-elf.o
Masami Hiramatsu92f6c722015-07-15 18:14:07 +090096libperf-$(CONFIG_LIBELF) += probe-file.o
Jiri Olsa709e6792014-12-29 23:52:25 +010097libperf-$(CONFIG_LIBELF) += probe-event.o
98
99ifndef CONFIG_LIBELF
100libperf-y += symbol-minimal.o
101endif
102
Jiri Olsa8379fce2014-12-30 00:06:25 +0100103libperf-$(CONFIG_DWARF) += probe-finder.o
104libperf-$(CONFIG_DWARF) += dwarf-aux.o
Masami Hiramatsu293d5b42016-08-26 01:24:57 +0900105libperf-$(CONFIG_DWARF) += dwarf-regs.o
Jiri Olsa8379fce2014-12-30 00:06:25 +0100106
Jiri Olsab2e45c32014-12-30 00:11:11 +0100107libperf-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o
He Kuanga597b542016-06-03 03:33:16 +0000108libperf-$(CONFIG_LOCAL_LIBUNWIND) += unwind-libunwind-local.o
He Kuangf6d72532016-06-03 03:33:17 +0000109libperf-$(CONFIG_LIBUNWIND) += unwind-libunwind.o
He Kuang52ffe0f2016-06-03 03:33:22 +0000110libperf-$(CONFIG_LIBUNWIND_X86) += libunwind/x86_32.o
He Kuang057fbfb2016-06-03 03:33:23 +0000111libperf-$(CONFIG_LIBUNWIND_AARCH64) += libunwind/arm64.o
Jiri Olsab2e45c32014-12-30 00:11:11 +0100112
Jiri Olsaedbe9812015-02-20 23:17:00 +0100113libperf-$(CONFIG_LIBBABELTRACE) += data-convert-bt.o
114
Jiri Olsac7355f82014-12-30 13:11:32 +0100115libperf-y += scripting-engines/
116
Jiri Olsa1571b692014-12-30 13:31:12 +0100117libperf-$(CONFIG_ZLIB) += zlib.o
Jiri Olsa80a32e5b2015-01-29 13:29:39 +0100118libperf-$(CONFIG_LZMA) += lzma.o
Stephane Eraniane9c4bcd2015-11-30 10:02:20 +0100119libperf-y += demangle-java.o
David Tolnaycae15db2016-07-09 00:20:00 -0700120libperf-y += demangle-rust.o
Arnaldo Carvalho de Melo46dad052016-03-07 18:48:45 -0300121
Jiri Olsae12b2022016-03-10 17:41:13 +0100122ifdef CONFIG_JITDUMP
Stephane Eranian9b07e272015-11-30 10:02:21 +0100123libperf-$(CONFIG_LIBELF) += jitdump.o
124libperf-$(CONFIG_LIBELF) += genelf.o
Maciej Debski621cb4e2016-10-13 03:59:36 -0700125libperf-$(CONFIG_DWARF) += genelf_debug.o
Arnaldo Carvalho de Melo46dad052016-03-07 18:48:45 -0300126endif
Jiri Olsa3bc33742014-12-30 13:30:04 +0100127
Wang Nana0748652016-11-26 07:03:28 +0000128libperf-y += perf-hooks.o
129
Wang Nan00b86692016-11-26 07:03:34 +0000130libperf-$(CONFIG_CXX) += c++/
131
Jiri Olsa9352aab2014-12-29 17:42:46 +0100132CFLAGS_config.o += -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
Stephane Eranian598b7c62015-11-30 10:02:23 +0100133# avoid compiler warnings in 32-bit mode
134CFLAGS_genelf_debug.o += -Wno-packed
Jiri Olsa9352aab2014-12-29 17:42:46 +0100135
136$(OUTPUT)util/parse-events-flex.c: util/parse-events.l $(OUTPUT)util/parse-events-bison.c
Jiri Olsa19993072014-12-30 18:44:38 +0100137 $(call rule_mkdir)
Jiri Olsa70923bd2015-05-14 12:31:48 -0300138 $(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 +0100139
140$(OUTPUT)util/parse-events-bison.c: util/parse-events.y
Jiri Olsa19993072014-12-30 18:44:38 +0100141 $(call rule_mkdir)
Jiri Olsa70923bd2015-05-14 12:31:48 -0300142 $(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 +0100143
144$(OUTPUT)util/pmu-flex.c: util/pmu.l $(OUTPUT)util/pmu-bison.c
Jiri Olsa19993072014-12-30 18:44:38 +0100145 $(call rule_mkdir)
Jiri Olsa70923bd2015-05-14 12:31:48 -0300146 $(Q)$(call echo-cmd,flex)$(FLEX) -o $@ --header-file=$(OUTPUT)util/pmu-flex.h util/pmu.l
Jiri Olsa9352aab2014-12-29 17:42:46 +0100147
148$(OUTPUT)util/pmu-bison.c: util/pmu.y
Jiri Olsa19993072014-12-30 18:44:38 +0100149 $(call rule_mkdir)
Jiri Olsa70923bd2015-05-14 12:31:48 -0300150 $(Q)$(call echo-cmd,bison)$(BISON) -v util/pmu.y -d -o $@ -p perf_pmu_
Jiri Olsa9352aab2014-12-29 17:42:46 +0100151
152CFLAGS_parse-events-flex.o += -w
153CFLAGS_pmu-flex.o += -w
Namhyung Kim539f3aa2015-04-29 12:55:00 -0300154CFLAGS_parse-events-bison.o += -DYYENABLE_NLS=0 -w
Jiri Olsa9352aab2014-12-29 17:42:46 +0100155CFLAGS_pmu-bison.o += -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -w
156
157$(OUTPUT)util/parse-events.o: $(OUTPUT)util/parse-events-flex.c $(OUTPUT)util/parse-events-bison.c
158$(OUTPUT)util/pmu.o: $(OUTPUT)util/pmu-flex.c $(OUTPUT)util/pmu-bison.c
159
Arnaldo Carvalho de Melo915b0882016-01-08 12:33:37 -0300160CFLAGS_bitmap.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
Arnaldo Carvalho de Melo552eb9752016-01-08 10:46:52 -0300161CFLAGS_find_bit.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
Jiri Olsa9352aab2014-12-29 17:42:46 +0100162CFLAGS_rbtree.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
Arnaldo Carvalho de Melo4ddd3272015-11-16 11:36:29 -0300163CFLAGS_libstring.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
Jiri Olsa9352aab2014-12-29 17:42:46 +0100164CFLAGS_hweight.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
165CFLAGS_parse-events.o += -Wno-redundant-decls
Soramichi AKIYAMAd25ed5d2017-01-17 00:22:37 +0900166CFLAGS_header.o += -include $(OUTPUT)PERF-VERSION-FILE
Jiri Olsa9352aab2014-12-29 17:42:46 +0100167
168$(OUTPUT)util/kallsyms.o: ../lib/symbol/kallsyms.c FORCE
Jiri Olsa19993072014-12-30 18:44:38 +0100169 $(call rule_mkdir)
Jiri Olsa9352aab2014-12-29 17:42:46 +0100170 $(call if_changed_dep,cc_o_c)
171
Arnaldo Carvalho de Melo915b0882016-01-08 12:33:37 -0300172$(OUTPUT)util/bitmap.o: ../lib/bitmap.c FORCE
173 $(call rule_mkdir)
174 $(call if_changed_dep,cc_o_c)
175
Arnaldo Carvalho de Melo552eb9752016-01-08 10:46:52 -0300176$(OUTPUT)util/find_bit.o: ../lib/find_bit.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 Melo3f735372015-07-05 22:48:21 -0300180$(OUTPUT)util/rbtree.o: ../lib/rbtree.c FORCE
Jiri Olsa19993072014-12-30 18:44:38 +0100181 $(call rule_mkdir)
Jiri Olsa9352aab2014-12-29 17:42:46 +0100182 $(call if_changed_dep,cc_o_c)
183
Arnaldo Carvalho de Melo4ddd3272015-11-16 11:36:29 -0300184$(OUTPUT)util/libstring.o: ../lib/string.c FORCE
185 $(call rule_mkdir)
186 $(call if_changed_dep,cc_o_c)
187
Arnaldo Carvalho de Melo0aefc352015-07-09 16:27:25 -0300188$(OUTPUT)util/hweight.o: ../lib/hweight.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)
Arnaldo Carvalho de Melod0761e32016-07-07 15:42:33 -0300191
192$(OUTPUT)util/vsprintf.o: ../lib/vsprintf.c FORCE
193 $(call rule_mkdir)
194 $(call if_changed_dep,cc_o_c)