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