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
106 perf-$(CONFIG_AUXTRACE) += auxtrace.o
107 perf-$(CONFIG_AUXTRACE) += intel-pt-decoder/
108 perf-$(CONFIG_AUXTRACE) += intel-pt.o
109 perf-$(CONFIG_AUXTRACE) += intel-bts.o
110 perf-$(CONFIG_AUXTRACE) += arm-spe.o
111 perf-$(CONFIG_AUXTRACE) += arm-spe-decoder/
112 perf-$(CONFIG_AUXTRACE) += s390-cpumsf.o
114 ifdef CONFIG_LIBOPENCSD
115 perf-$(CONFIG_AUXTRACE) += cs-etm.o
116 perf-$(CONFIG_AUXTRACE) += cs-etm-decoder/
119 perf-y += parse-branch-options.o
120 perf-y += dump-insn.o
121 perf-y += parse-regs-options.o
122 perf-y += parse-sublevel-options.o
124 perf-y += help-unknown-cmd.o
125 perf-y += mem-events.o
128 perf-y += time-utils.o
129 perf-y += expr-flex.o
130 perf-y += expr-bison.o
136 perf-$(CONFIG_LIBBPF) += bpf-loader.o
137 perf-$(CONFIG_LIBBPF) += bpf_map.o
138 perf-$(CONFIG_BPF_PROLOGUE) += bpf-prologue.o
139 perf-$(CONFIG_LIBELF) += symbol-elf.o
140 perf-$(CONFIG_LIBELF) += probe-file.o
141 perf-$(CONFIG_LIBELF) += probe-event.o
148 perf-y += symbol-minimal.o
155 perf-$(CONFIG_DWARF) += probe-finder.o
156 perf-$(CONFIG_DWARF) += dwarf-aux.o
157 perf-$(CONFIG_DWARF) += dwarf-regs.o
159 perf-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o
160 perf-$(CONFIG_LOCAL_LIBUNWIND) += unwind-libunwind-local.o
161 perf-$(CONFIG_LIBUNWIND) += unwind-libunwind.o
162 perf-$(CONFIG_LIBUNWIND_X86) += libunwind/x86_32.o
163 perf-$(CONFIG_LIBUNWIND_AARCH64) += libunwind/arm64.o
165 perf-$(CONFIG_LIBBABELTRACE) += data-convert-bt.o
167 perf-y += scripting-engines/
169 perf-$(CONFIG_ZLIB) += zlib.o
170 perf-$(CONFIG_LZMA) += lzma.o
171 perf-$(CONFIG_ZSTD) += zstd.o
173 perf-$(CONFIG_LIBCAP) += cap.o
175 perf-y += demangle-java.o
176 perf-y += demangle-rust.o
179 perf-$(CONFIG_LIBELF) += jitdump.o
180 perf-$(CONFIG_LIBELF) += genelf.o
181 perf-$(CONFIG_DWARF) += genelf_debug.o
184 perf-y += perf-hooks.o
186 perf-$(CONFIG_LIBBPF) += bpf-event.o
188 perf-$(CONFIG_CXX) += c++/
190 perf-$(CONFIG_LIBPFM4) += pfm.o
192 CFLAGS_config.o += -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
193 CFLAGS_llvm-utils.o += -DPERF_INCLUDE_DIR="BUILD_STR($(perf_include_dir_SQ))"
195 # avoid compiler warnings in 32-bit mode
196 CFLAGS_genelf_debug.o += -Wno-packed
198 $(OUTPUT)util/parse-events-flex.c $(OUTPUT)util/parse-events-flex.h: util/parse-events.l $(OUTPUT)util/parse-events-bison.c
200 $(Q)$(call echo-cmd,flex)$(FLEX) -o $(OUTPUT)util/parse-events-flex.c \
201 --header-file=$(OUTPUT)util/parse-events-flex.h $(PARSER_DEBUG_FLEX) $<
203 $(OUTPUT)util/parse-events-bison.c $(OUTPUT)util/parse-events-bison.h: util/parse-events.y
205 $(Q)$(call echo-cmd,bison)$(BISON) -v $< -d $(PARSER_DEBUG_BISON) \
206 -o $(OUTPUT)util/parse-events-bison.c -p parse_events_
208 $(OUTPUT)util/expr-flex.c $(OUTPUT)util/expr-flex.h: util/expr.l $(OUTPUT)util/expr-bison.c
210 $(Q)$(call echo-cmd,flex)$(FLEX) -o $(OUTPUT)util/expr-flex.c \
211 --header-file=$(OUTPUT)util/expr-flex.h $(PARSER_DEBUG_FLEX) $<
213 $(OUTPUT)util/expr-bison.c $(OUTPUT)util/expr-bison.h: util/expr.y
215 $(Q)$(call echo-cmd,bison)$(BISON) -v $< -d $(PARSER_DEBUG_BISON) \
216 -o $(OUTPUT)util/expr-bison.c -p expr_
218 $(OUTPUT)util/pmu-flex.c $(OUTPUT)util/pmu-flex.h: util/pmu.l $(OUTPUT)util/pmu-bison.c
220 $(Q)$(call echo-cmd,flex)$(FLEX) -o $(OUTPUT)util/pmu-flex.c \
221 --header-file=$(OUTPUT)util/pmu-flex.h $(PARSER_DEBUG_FLEX) $<
223 $(OUTPUT)util/pmu-bison.c $(OUTPUT)util/pmu-bison.h: util/pmu.y
225 $(Q)$(call echo-cmd,bison)$(BISON) -v $< -d $(PARSER_DEBUG_BISON) \
226 -o $(OUTPUT)util/pmu-bison.c -p perf_pmu_
228 FLEX_GE_26 := $(shell expr $(shell $(FLEX) --version | sed -e 's/flex \([0-9]\+\).\([0-9]\+\)/\1\2/g') \>\= 26)
229 ifeq ($(FLEX_GE_26),1)
230 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
231 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 $$?)
232 ifeq ($(CC_HASNT_MISLEADING_INDENTATION), 1)
233 flex_flags += -Wno-misleading-indentation
238 CFLAGS_parse-events-flex.o += $(flex_flags)
239 CFLAGS_pmu-flex.o += $(flex_flags)
240 CFLAGS_expr-flex.o += $(flex_flags)
242 bison_flags := -DYYENABLE_NLS=0
243 BISON_GE_35 := $(shell expr $(shell $(BISON) --version | grep bison | sed -e 's/.\+ \([0-9]\+\).\([0-9]\+\)/\1\2/g') \>\= 35)
244 ifeq ($(BISON_GE_35),1)
245 bison_flags += -Wno-unused-parameter -Wno-nested-externs -Wno-implicit-function-declaration -Wno-switch-enum
249 CFLAGS_parse-events-bison.o += $(bison_flags)
250 CFLAGS_pmu-bison.o += -DYYLTYPE_IS_TRIVIAL=0 $(bison_flags)
251 CFLAGS_expr-bison.o += -DYYLTYPE_IS_TRIVIAL=0 $(bison_flags)
253 $(OUTPUT)util/parse-events.o: $(OUTPUT)util/parse-events-flex.c $(OUTPUT)util/parse-events-bison.c
254 $(OUTPUT)util/pmu.o: $(OUTPUT)util/pmu-flex.c $(OUTPUT)util/pmu-bison.c
255 $(OUTPUT)util/expr.o: $(OUTPUT)util/expr-flex.c $(OUTPUT)util/expr-bison.c
257 CFLAGS_bitmap.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
258 CFLAGS_find_bit.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
259 CFLAGS_rbtree.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
260 CFLAGS_libstring.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
261 CFLAGS_hweight.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
262 CFLAGS_parse-events.o += -Wno-redundant-decls
263 CFLAGS_expr.o += -Wno-redundant-decls
264 CFLAGS_header.o += -include $(OUTPUT)PERF-VERSION-FILE
266 $(OUTPUT)util/kallsyms.o: ../lib/symbol/kallsyms.c FORCE
268 $(call if_changed_dep,cc_o_c)
270 $(OUTPUT)util/argv_split.o: ../lib/argv_split.c FORCE
272 $(call if_changed_dep,cc_o_c)
274 $(OUTPUT)util/bitmap.o: ../lib/bitmap.c FORCE
276 $(call if_changed_dep,cc_o_c)
278 $(OUTPUT)util/ctype.o: ../lib/ctype.c FORCE
280 $(call if_changed_dep,cc_o_c)
282 $(OUTPUT)util/find_bit.o: ../lib/find_bit.c FORCE
284 $(call if_changed_dep,cc_o_c)
286 $(OUTPUT)util/rbtree.o: ../lib/rbtree.c FORCE
288 $(call if_changed_dep,cc_o_c)
290 $(OUTPUT)util/libstring.o: ../lib/string.c FORCE
292 $(call if_changed_dep,cc_o_c)
294 $(OUTPUT)util/hweight.o: ../lib/hweight.c FORCE
296 $(call if_changed_dep,cc_o_c)
298 $(OUTPUT)util/vsprintf.o: ../lib/vsprintf.c FORCE
300 $(call if_changed_dep,cc_o_c)