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