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