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