3 perf-y += block-range.o
13 perf-y += sideband_evlist.o
15 perf-y += evsel_fprintf.o
16 perf-y += perf_event_attr_fprintf.o
19 perf-y += get_current_dir_name.o
21 perf-y += levenshtein.o
22 perf-y += llvm-utils.o
25 perf-y += parse-events.o
28 perf-y += print_binary.o
30 perf-y += argv_split.o
45 perf-y += symbol_fprintf.o
47 perf-y += color_config.o
48 perf-y += metricgroup.o
58 perf-y += sample-raw.o
59 perf-y += s390-sample-raw.o
60 perf-$(CONFIG_TRACE) += syscalltbl.o
61 perf-y += ordered-events.o
62 perf-y += namespaces.o
65 perf-y += thread_map.o
66 perf-y += trace-event-parse.o
67 perf-y += parse-events-flex.o
68 perf-y += parse-events-bison.o
72 perf-y += trace-event-read.o
73 perf-y += trace-event-info.o
74 perf-y += trace-event-scripting.o
75 perf-y += trace-event.o
90 perf-y += stat-shadow.o
91 perf-y += stat-display.o
92 perf-y += perf_api_probe.o
96 perf-y += synthetic-events.o
100 perf-y += call-path.o
102 perf-y += thread-stack.o
104 perf-$(CONFIG_AUXTRACE) += auxtrace.o
105 perf-$(CONFIG_AUXTRACE) += intel-pt-decoder/
106 perf-$(CONFIG_AUXTRACE) += intel-pt.o
107 perf-$(CONFIG_AUXTRACE) += intel-bts.o
108 perf-$(CONFIG_AUXTRACE) += arm-spe.o
109 perf-$(CONFIG_AUXTRACE) += arm-spe-decoder/
110 perf-$(CONFIG_AUXTRACE) += s390-cpumsf.o
112 ifdef CONFIG_LIBOPENCSD
113 perf-$(CONFIG_AUXTRACE) += cs-etm.o
114 perf-$(CONFIG_AUXTRACE) += cs-etm-decoder/
117 perf-y += parse-branch-options.o
118 perf-y += dump-insn.o
119 perf-y += parse-regs-options.o
120 perf-y += parse-sublevel-options.o
122 perf-y += help-unknown-cmd.o
123 perf-y += mem-events.o
126 perf-y += time-utils.o
127 perf-y += expr-flex.o
128 perf-y += expr-bison.o
134 perf-$(CONFIG_LIBBPF) += bpf-loader.o
135 perf-$(CONFIG_LIBBPF) += bpf_map.o
136 perf-$(CONFIG_BPF_PROLOGUE) += bpf-prologue.o
137 perf-$(CONFIG_LIBELF) += symbol-elf.o
138 perf-$(CONFIG_LIBELF) += probe-file.o
139 perf-$(CONFIG_LIBELF) += probe-event.o
146 perf-y += symbol-minimal.o
153 perf-$(CONFIG_DWARF) += probe-finder.o
154 perf-$(CONFIG_DWARF) += dwarf-aux.o
155 perf-$(CONFIG_DWARF) += dwarf-regs.o
157 perf-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o
158 perf-$(CONFIG_LOCAL_LIBUNWIND) += unwind-libunwind-local.o
159 perf-$(CONFIG_LIBUNWIND) += unwind-libunwind.o
160 perf-$(CONFIG_LIBUNWIND_X86) += libunwind/x86_32.o
161 perf-$(CONFIG_LIBUNWIND_AARCH64) += libunwind/arm64.o
163 perf-$(CONFIG_LIBBABELTRACE) += data-convert-bt.o
165 perf-y += scripting-engines/
167 perf-$(CONFIG_ZLIB) += zlib.o
168 perf-$(CONFIG_LZMA) += lzma.o
169 perf-$(CONFIG_ZSTD) += zstd.o
171 perf-$(CONFIG_LIBCAP) += cap.o
173 perf-y += demangle-java.o
174 perf-y += demangle-rust.o
177 perf-$(CONFIG_LIBELF) += jitdump.o
178 perf-$(CONFIG_LIBELF) += genelf.o
179 perf-$(CONFIG_DWARF) += genelf_debug.o
182 perf-y += perf-hooks.o
184 perf-$(CONFIG_LIBBPF) += bpf-event.o
186 perf-$(CONFIG_CXX) += c++/
188 perf-$(CONFIG_LIBPFM4) += pfm.o
190 CFLAGS_config.o += -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
191 CFLAGS_llvm-utils.o += -DPERF_INCLUDE_DIR="BUILD_STR($(perf_include_dir_SQ))"
193 # avoid compiler warnings in 32-bit mode
194 CFLAGS_genelf_debug.o += -Wno-packed
196 $(OUTPUT)util/parse-events-flex.c $(OUTPUT)util/parse-events-flex.h: util/parse-events.l $(OUTPUT)util/parse-events-bison.c
198 $(Q)$(call echo-cmd,flex)$(FLEX) -o $(OUTPUT)util/parse-events-flex.c \
199 --header-file=$(OUTPUT)util/parse-events-flex.h $(PARSER_DEBUG_FLEX) $<
201 $(OUTPUT)util/parse-events-bison.c $(OUTPUT)util/parse-events-bison.h: util/parse-events.y
203 $(Q)$(call echo-cmd,bison)$(BISON) -v $< -d $(PARSER_DEBUG_BISON) \
204 -o $(OUTPUT)util/parse-events-bison.c -p parse_events_
206 $(OUTPUT)util/expr-flex.c $(OUTPUT)util/expr-flex.h: util/expr.l $(OUTPUT)util/expr-bison.c
208 $(Q)$(call echo-cmd,flex)$(FLEX) -o $(OUTPUT)util/expr-flex.c \
209 --header-file=$(OUTPUT)util/expr-flex.h $(PARSER_DEBUG_FLEX) $<
211 $(OUTPUT)util/expr-bison.c $(OUTPUT)util/expr-bison.h: util/expr.y
213 $(Q)$(call echo-cmd,bison)$(BISON) -v $< -d $(PARSER_DEBUG_BISON) \
214 -o $(OUTPUT)util/expr-bison.c -p expr_
216 $(OUTPUT)util/pmu-flex.c $(OUTPUT)util/pmu-flex.h: util/pmu.l $(OUTPUT)util/pmu-bison.c
218 $(Q)$(call echo-cmd,flex)$(FLEX) -o $(OUTPUT)util/pmu-flex.c \
219 --header-file=$(OUTPUT)util/pmu-flex.h $(PARSER_DEBUG_FLEX) $<
221 $(OUTPUT)util/pmu-bison.c $(OUTPUT)util/pmu-bison.h: util/pmu.y
223 $(Q)$(call echo-cmd,bison)$(BISON) -v $< -d $(PARSER_DEBUG_BISON) \
224 -o $(OUTPUT)util/pmu-bison.c -p perf_pmu_
226 FLEX_GE_26 := $(shell expr $(shell $(FLEX) --version | sed -e 's/flex \([0-9]\+\).\([0-9]\+\)/\1\2/g') \>\= 26)
227 ifeq ($(FLEX_GE_26),1)
228 flex_flags := -Wno-switch-enum -Wno-switch-default -Wno-unused-function -Wno-redundant-decls -Wno-sign-compare -Wno-unused-parameter -Wno-missing-prototypes -Wno-missing-declarations
229 CC_HASNT_MISLEADING_INDENTATION := $(shell echo "int main(void) { return 0 }" | $(CC) -Werror -Wno-misleading-indentation -o /dev/null -xc - 2>&1 | grep -q -- -Wno-misleading-indentation ; echo $$?)
230 ifeq ($(CC_HASNT_MISLEADING_INDENTATION), 1)
231 flex_flags += -Wno-misleading-indentation
236 CFLAGS_parse-events-flex.o += $(flex_flags)
237 CFLAGS_pmu-flex.o += $(flex_flags)
238 CFLAGS_expr-flex.o += $(flex_flags)
240 bison_flags := -DYYENABLE_NLS=0
241 BISON_GE_35 := $(shell expr $(shell $(BISON) --version | grep bison | sed -e 's/.\+ \([0-9]\+\).\([0-9]\+\)/\1\2/g') \>\= 35)
242 ifeq ($(BISON_GE_35),1)
243 bison_flags += -Wno-unused-parameter -Wno-nested-externs -Wno-implicit-function-declaration -Wno-switch-enum
247 CFLAGS_parse-events-bison.o += $(bison_flags)
248 CFLAGS_pmu-bison.o += -DYYLTYPE_IS_TRIVIAL=0 $(bison_flags)
249 CFLAGS_expr-bison.o += -DYYLTYPE_IS_TRIVIAL=0 $(bison_flags)
251 $(OUTPUT)util/parse-events.o: $(OUTPUT)util/parse-events-flex.c $(OUTPUT)util/parse-events-bison.c
252 $(OUTPUT)util/pmu.o: $(OUTPUT)util/pmu-flex.c $(OUTPUT)util/pmu-bison.c
253 $(OUTPUT)util/expr.o: $(OUTPUT)util/expr-flex.c $(OUTPUT)util/expr-bison.c
255 CFLAGS_bitmap.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
256 CFLAGS_find_bit.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
257 CFLAGS_rbtree.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
258 CFLAGS_libstring.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
259 CFLAGS_hweight.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
260 CFLAGS_parse-events.o += -Wno-redundant-decls
261 CFLAGS_expr.o += -Wno-redundant-decls
262 CFLAGS_header.o += -include $(OUTPUT)PERF-VERSION-FILE
264 $(OUTPUT)util/kallsyms.o: ../lib/symbol/kallsyms.c FORCE
266 $(call if_changed_dep,cc_o_c)
268 $(OUTPUT)util/argv_split.o: ../lib/argv_split.c FORCE
270 $(call if_changed_dep,cc_o_c)
272 $(OUTPUT)util/bitmap.o: ../lib/bitmap.c FORCE
274 $(call if_changed_dep,cc_o_c)
276 $(OUTPUT)util/ctype.o: ../lib/ctype.c FORCE
278 $(call if_changed_dep,cc_o_c)
280 $(OUTPUT)util/find_bit.o: ../lib/find_bit.c FORCE
282 $(call if_changed_dep,cc_o_c)
284 $(OUTPUT)util/rbtree.o: ../lib/rbtree.c FORCE
286 $(call if_changed_dep,cc_o_c)
288 $(OUTPUT)util/libstring.o: ../lib/string.c FORCE
290 $(call if_changed_dep,cc_o_c)
292 $(OUTPUT)util/hweight.o: ../lib/hweight.c FORCE
294 $(call if_changed_dep,cc_o_c)
296 $(OUTPUT)util/vsprintf.o: ../lib/vsprintf.c FORCE
298 $(call if_changed_dep,cc_o_c)