xref: /openbmc/linux/tools/perf/util/Build (revision 78beef62)
1perf-y += annotate.o
2perf-y += block-range.o
3perf-y += build-id.o
4perf-y += cacheline.o
5perf-y += config.o
6perf-y += ctype.o
7perf-y += db-export.o
8perf-y += env.o
9perf-y += event.o
10perf-y += evlist.o
11perf-y += evsel.o
12perf-y += evsel_fprintf.o
13perf-y += evswitch.o
14perf-y += find_bit.o
15perf-y += get_current_dir_name.o
16perf-y += kallsyms.o
17perf-y += levenshtein.o
18perf-y += llvm-utils.o
19perf-y += mmap.o
20perf-y += memswap.o
21perf-y += parse-events.o
22perf-y += perf_regs.o
23perf-y += path.o
24perf-y += print_binary.o
25perf-y += rlimit.o
26perf-y += argv_split.o
27perf-y += rbtree.o
28perf-y += libstring.o
29perf-y += bitmap.o
30perf-y += hweight.o
31perf-y += smt.o
32perf-y += strbuf.o
33perf-y += string.o
34perf-y += strlist.o
35perf-y += strfilter.o
36perf-y += top.o
37perf-y += usage.o
38perf-y += dso.o
39perf-y += dsos.o
40perf-y += symbol.o
41perf-y += symbol_fprintf.o
42perf-y += color.o
43perf-y += color_config.o
44perf-y += metricgroup.o
45perf-y += header.o
46perf-y += callchain.o
47perf-y += values.o
48perf-y += debug.o
49perf-y += machine.o
50perf-y += map.o
51perf-y += pstack.o
52perf-y += session.o
53perf-y += sample-raw.o
54perf-y += s390-sample-raw.o
55perf-$(CONFIG_TRACE) += syscalltbl.o
56perf-y += ordered-events.o
57perf-y += namespaces.o
58perf-y += comm.o
59perf-y += thread.o
60perf-y += thread_map.o
61perf-y += trace-event-parse.o
62perf-y += parse-events-flex.o
63perf-y += parse-events-bison.o
64perf-y += pmu.o
65perf-y += pmu-flex.o
66perf-y += pmu-bison.o
67perf-y += trace-event-read.o
68perf-y += trace-event-info.o
69perf-y += trace-event-scripting.o
70perf-y += trace-event.o
71perf-y += svghelper.o
72perf-y += sort.o
73perf-y += hist.o
74perf-y += util.o
75perf-y += cpumap.o
76perf-y += cputopo.o
77perf-y += cgroup.o
78perf-y += target.o
79perf-y += rblist.o
80perf-y += intlist.o
81perf-y += vdso.o
82perf-y += counts.o
83perf-y += stat.o
84perf-y += stat-shadow.o
85perf-y += stat-display.o
86perf-y += record.o
87perf-y += srcline.o
88perf-y += srccode.o
89perf-y += data.o
90perf-y += tsc.o
91perf-y += cloexec.o
92perf-y += call-path.o
93perf-y += rwsem.o
94perf-y += thread-stack.o
95perf-$(CONFIG_AUXTRACE) += auxtrace.o
96perf-$(CONFIG_AUXTRACE) += intel-pt-decoder/
97perf-$(CONFIG_AUXTRACE) += intel-pt.o
98perf-$(CONFIG_AUXTRACE) += intel-bts.o
99perf-$(CONFIG_AUXTRACE) += arm-spe.o
100perf-$(CONFIG_AUXTRACE) += arm-spe-pkt-decoder.o
101perf-$(CONFIG_AUXTRACE) += s390-cpumsf.o
102
103ifdef CONFIG_LIBOPENCSD
104perf-$(CONFIG_AUXTRACE) += cs-etm.o
105perf-$(CONFIG_AUXTRACE) += cs-etm-decoder/
106endif
107
108perf-y += parse-branch-options.o
109perf-y += dump-insn.o
110perf-y += parse-regs-options.o
111perf-y += term.o
112perf-y += help-unknown-cmd.o
113perf-y += mem-events.o
114perf-y += vsprintf.o
115perf-y += units.o
116perf-y += time-utils.o
117perf-y += expr-bison.o
118perf-y += branch.o
119perf-y += mem2node.o
120
121perf-$(CONFIG_LIBBPF) += bpf-loader.o
122perf-$(CONFIG_LIBBPF) += bpf_map.o
123perf-$(CONFIG_BPF_PROLOGUE) += bpf-prologue.o
124perf-$(CONFIG_LIBELF) += symbol-elf.o
125perf-$(CONFIG_LIBELF) += probe-file.o
126perf-$(CONFIG_LIBELF) += probe-event.o
127
128ifndef CONFIG_LIBELF
129perf-y += symbol-minimal.o
130endif
131
132ifndef CONFIG_SETNS
133perf-y += setns.o
134endif
135
136perf-$(CONFIG_DWARF) += probe-finder.o
137perf-$(CONFIG_DWARF) += dwarf-aux.o
138perf-$(CONFIG_DWARF) += dwarf-regs.o
139
140perf-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o
141perf-$(CONFIG_LOCAL_LIBUNWIND)    += unwind-libunwind-local.o
142perf-$(CONFIG_LIBUNWIND)          += unwind-libunwind.o
143perf-$(CONFIG_LIBUNWIND_X86)      += libunwind/x86_32.o
144perf-$(CONFIG_LIBUNWIND_AARCH64)  += libunwind/arm64.o
145
146perf-$(CONFIG_LIBBABELTRACE) += data-convert-bt.o
147
148perf-y += scripting-engines/
149
150perf-$(CONFIG_ZLIB) += zlib.o
151perf-$(CONFIG_LZMA) += lzma.o
152perf-$(CONFIG_ZSTD) += zstd.o
153
154perf-$(CONFIG_LIBCAP) += cap.o
155
156perf-y += demangle-java.o
157perf-y += demangle-rust.o
158
159ifdef CONFIG_JITDUMP
160perf-$(CONFIG_LIBELF) += jitdump.o
161perf-$(CONFIG_LIBELF) += genelf.o
162perf-$(CONFIG_DWARF) += genelf_debug.o
163endif
164
165perf-y += perf-hooks.o
166
167perf-$(CONFIG_LIBBPF) += bpf-event.o
168
169perf-$(CONFIG_CXX) += c++/
170
171CFLAGS_config.o   += -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
172CFLAGS_llvm-utils.o += -DPERF_INCLUDE_DIR="BUILD_STR($(perf_include_dir_SQ))"
173
174# avoid compiler warnings in 32-bit mode
175CFLAGS_genelf_debug.o  += -Wno-packed
176
177$(OUTPUT)util/parse-events-flex.c: util/parse-events.l $(OUTPUT)util/parse-events-bison.c
178	$(call rule_mkdir)
179	$(Q)$(call echo-cmd,flex)$(FLEX) -o $@ --header-file=$(OUTPUT)util/parse-events-flex.h $(PARSER_DEBUG_FLEX) util/parse-events.l
180
181$(OUTPUT)util/parse-events-bison.c: util/parse-events.y
182	$(call rule_mkdir)
183	$(Q)$(call echo-cmd,bison)$(BISON) -v util/parse-events.y -d $(PARSER_DEBUG_BISON) -o $@ -p parse_events_
184
185$(OUTPUT)util/expr-bison.c: util/expr.y
186	$(call rule_mkdir)
187	$(Q)$(call echo-cmd,bison)$(BISON) -v util/expr.y -d $(PARSER_DEBUG_BISON) -o $@ -p expr__
188
189$(OUTPUT)util/pmu-flex.c: util/pmu.l $(OUTPUT)util/pmu-bison.c
190	$(call rule_mkdir)
191	$(Q)$(call echo-cmd,flex)$(FLEX) -o $@ --header-file=$(OUTPUT)util/pmu-flex.h util/pmu.l
192
193$(OUTPUT)util/pmu-bison.c: util/pmu.y
194	$(call rule_mkdir)
195	$(Q)$(call echo-cmd,bison)$(BISON) -v util/pmu.y -d -o $@ -p perf_pmu_
196
197CFLAGS_parse-events-flex.o  += -w
198CFLAGS_pmu-flex.o           += -w
199CFLAGS_parse-events-bison.o += -DYYENABLE_NLS=0 -w
200CFLAGS_pmu-bison.o          += -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -w
201CFLAGS_expr-bison.o         += -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -w
202
203$(OUTPUT)util/parse-events.o: $(OUTPUT)util/parse-events-flex.c $(OUTPUT)util/parse-events-bison.c
204$(OUTPUT)util/pmu.o: $(OUTPUT)util/pmu-flex.c $(OUTPUT)util/pmu-bison.c
205
206CFLAGS_bitmap.o        += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
207CFLAGS_find_bit.o      += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
208CFLAGS_rbtree.o        += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
209CFLAGS_libstring.o     += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
210CFLAGS_hweight.o       += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
211CFLAGS_parse-events.o  += -Wno-redundant-decls
212CFLAGS_header.o        += -include $(OUTPUT)PERF-VERSION-FILE
213
214$(OUTPUT)util/kallsyms.o: ../lib/symbol/kallsyms.c FORCE
215	$(call rule_mkdir)
216	$(call if_changed_dep,cc_o_c)
217
218$(OUTPUT)util/argv_split.o: ../lib/argv_split.c FORCE
219	$(call rule_mkdir)
220	$(call if_changed_dep,cc_o_c)
221
222$(OUTPUT)util/bitmap.o: ../lib/bitmap.c FORCE
223	$(call rule_mkdir)
224	$(call if_changed_dep,cc_o_c)
225
226$(OUTPUT)util/ctype.o: ../lib/ctype.c FORCE
227	$(call rule_mkdir)
228	$(call if_changed_dep,cc_o_c)
229
230$(OUTPUT)util/find_bit.o: ../lib/find_bit.c FORCE
231	$(call rule_mkdir)
232	$(call if_changed_dep,cc_o_c)
233
234$(OUTPUT)util/rbtree.o: ../lib/rbtree.c FORCE
235	$(call rule_mkdir)
236	$(call if_changed_dep,cc_o_c)
237
238$(OUTPUT)util/libstring.o: ../lib/string.c FORCE
239	$(call rule_mkdir)
240	$(call if_changed_dep,cc_o_c)
241
242$(OUTPUT)util/hweight.o: ../lib/hweight.c FORCE
243	$(call rule_mkdir)
244	$(call if_changed_dep,cc_o_c)
245
246$(OUTPUT)util/vsprintf.o: ../lib/vsprintf.c FORCE
247	$(call rule_mkdir)
248	$(call if_changed_dep,cc_o_c)
249