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