xref: /linux/tools/perf/util/Build (revision f3a8b6645dc2e60d11f20c1c23afd964ff4e55ae)
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
90
91libperf-$(CONFIG_LIBBPF) += bpf-loader.o
92libperf-$(CONFIG_BPF_PROLOGUE) += bpf-prologue.o
93libperf-$(CONFIG_LIBELF) += symbol-elf.o
94libperf-$(CONFIG_LIBELF) += probe-file.o
95libperf-$(CONFIG_LIBELF) += probe-event.o
96
97ifndef CONFIG_LIBELF
98libperf-y += symbol-minimal.o
99endif
100
101libperf-$(CONFIG_DWARF) += probe-finder.o
102libperf-$(CONFIG_DWARF) += dwarf-aux.o
103libperf-$(CONFIG_DWARF) += dwarf-regs.o
104
105libperf-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o
106libperf-$(CONFIG_LOCAL_LIBUNWIND)    += unwind-libunwind-local.o
107libperf-$(CONFIG_LIBUNWIND)          += unwind-libunwind.o
108libperf-$(CONFIG_LIBUNWIND_X86)      += libunwind/x86_32.o
109libperf-$(CONFIG_LIBUNWIND_AARCH64)  += libunwind/arm64.o
110
111libperf-$(CONFIG_LIBBABELTRACE) += data-convert-bt.o
112
113libperf-y += scripting-engines/
114
115libperf-$(CONFIG_ZLIB) += zlib.o
116libperf-$(CONFIG_LZMA) += lzma.o
117libperf-y += demangle-java.o
118libperf-y += demangle-rust.o
119
120ifdef CONFIG_JITDUMP
121libperf-$(CONFIG_LIBELF) += jitdump.o
122libperf-$(CONFIG_LIBELF) += genelf.o
123libperf-$(CONFIG_LIBELF) += genelf_debug.o
124endif
125
126CFLAGS_config.o   += -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
127# avoid compiler warnings in 32-bit mode
128CFLAGS_genelf_debug.o  += -Wno-packed
129
130$(OUTPUT)util/parse-events-flex.c: util/parse-events.l $(OUTPUT)util/parse-events-bison.c
131	$(call rule_mkdir)
132	$(Q)$(call echo-cmd,flex)$(FLEX) -o $@ --header-file=$(OUTPUT)util/parse-events-flex.h $(PARSER_DEBUG_FLEX) util/parse-events.l
133
134$(OUTPUT)util/parse-events-bison.c: util/parse-events.y
135	$(call rule_mkdir)
136	$(Q)$(call echo-cmd,bison)$(BISON) -v util/parse-events.y -d $(PARSER_DEBUG_BISON) -o $@ -p parse_events_
137
138$(OUTPUT)util/pmu-flex.c: util/pmu.l $(OUTPUT)util/pmu-bison.c
139	$(call rule_mkdir)
140	$(Q)$(call echo-cmd,flex)$(FLEX) -o $@ --header-file=$(OUTPUT)util/pmu-flex.h util/pmu.l
141
142$(OUTPUT)util/pmu-bison.c: util/pmu.y
143	$(call rule_mkdir)
144	$(Q)$(call echo-cmd,bison)$(BISON) -v util/pmu.y -d -o $@ -p perf_pmu_
145
146CFLAGS_parse-events-flex.o  += -w
147CFLAGS_pmu-flex.o           += -w
148CFLAGS_parse-events-bison.o += -DYYENABLE_NLS=0 -w
149CFLAGS_pmu-bison.o          += -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -w
150
151$(OUTPUT)util/parse-events.o: $(OUTPUT)util/parse-events-flex.c $(OUTPUT)util/parse-events-bison.c
152$(OUTPUT)util/pmu.o: $(OUTPUT)util/pmu-flex.c $(OUTPUT)util/pmu-bison.c
153
154CFLAGS_bitmap.o        += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
155CFLAGS_find_bit.o      += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
156CFLAGS_rbtree.o        += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
157CFLAGS_libstring.o     += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
158CFLAGS_hweight.o       += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
159CFLAGS_parse-events.o  += -Wno-redundant-decls
160
161$(OUTPUT)util/kallsyms.o: ../lib/symbol/kallsyms.c FORCE
162	$(call rule_mkdir)
163	$(call if_changed_dep,cc_o_c)
164
165$(OUTPUT)util/bitmap.o: ../lib/bitmap.c FORCE
166	$(call rule_mkdir)
167	$(call if_changed_dep,cc_o_c)
168
169$(OUTPUT)util/find_bit.o: ../lib/find_bit.c FORCE
170	$(call rule_mkdir)
171	$(call if_changed_dep,cc_o_c)
172
173$(OUTPUT)util/rbtree.o: ../lib/rbtree.c FORCE
174	$(call rule_mkdir)
175	$(call if_changed_dep,cc_o_c)
176
177$(OUTPUT)util/libstring.o: ../lib/string.c FORCE
178	$(call rule_mkdir)
179	$(call if_changed_dep,cc_o_c)
180
181$(OUTPUT)util/hweight.o: ../lib/hweight.c FORCE
182	$(call rule_mkdir)
183	$(call if_changed_dep,cc_o_c)
184
185$(OUTPUT)util/vsprintf.o: ../lib/vsprintf.c FORCE
186	$(call rule_mkdir)
187	$(call if_changed_dep,cc_o_c)
188