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