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