1perf-y += annotate.o 2perf-y += block-info.o 3perf-y += block-range.o 4perf-y += build-id.o 5perf-y += cacheline.o 6perf-y += config.o 7perf-y += copyfile.o 8perf-y += ctype.o 9perf-y += db-export.o 10perf-y += env.o 11perf-y += event.o 12perf-y += evlist.o 13perf-y += evlist-hybrid.o 14perf-y += sideband_evlist.o 15perf-y += evsel.o 16perf-y += evsel_fprintf.o 17perf-y += perf_event_attr_fprintf.o 18perf-y += evswitch.o 19perf-y += find_bit.o 20perf-y += get_current_dir_name.o 21perf-y += kallsyms.o 22perf-y += levenshtein.o 23perf-y += llvm-utils.o 24perf-y += mmap.o 25perf-y += memswap.o 26perf-y += parse-events.o 27perf-y += parse-events-hybrid.o 28perf-y += perf_regs.o 29perf-y += path.o 30perf-y += print_binary.o 31perf-y += rlimit.o 32perf-y += argv_split.o 33perf-y += rbtree.o 34perf-y += libstring.o 35perf-y += bitmap.o 36perf-y += hweight.o 37perf-y += smt.o 38perf-y += strbuf.o 39perf-y += string.o 40perf-y += strlist.o 41perf-y += strfilter.o 42perf-y += top.o 43perf-y += usage.o 44perf-y += dso.o 45perf-y += dsos.o 46perf-y += symbol.o 47perf-y += symbol_fprintf.o 48perf-y += color.o 49perf-y += color_config.o 50perf-y += metricgroup.o 51perf-y += header.o 52perf-y += callchain.o 53perf-y += values.o 54perf-y += debug.o 55perf-y += fncache.o 56perf-y += machine.o 57perf-y += map.o 58perf-y += pstack.o 59perf-y += session.o 60perf-y += sample-raw.o 61perf-y += s390-sample-raw.o 62perf-$(CONFIG_TRACE) += syscalltbl.o 63perf-y += ordered-events.o 64perf-y += namespaces.o 65perf-y += comm.o 66perf-y += thread.o 67perf-y += thread_map.o 68perf-y += trace-event-parse.o 69perf-y += parse-events-flex.o 70perf-y += parse-events-bison.o 71perf-y += pmu.o 72perf-y += pmu-flex.o 73perf-y += pmu-bison.o 74perf-y += pmu-hybrid.o 75perf-y += trace-event-read.o 76perf-y += trace-event-info.o 77perf-y += trace-event-scripting.o 78perf-y += trace-event.o 79perf-y += svghelper.o 80perf-y += sort.o 81perf-y += hist.o 82perf-y += util.o 83perf-y += cpumap.o 84perf-y += affinity.o 85perf-y += cputopo.o 86perf-y += cgroup.o 87perf-y += target.o 88perf-y += rblist.o 89perf-y += intlist.o 90perf-y += vdso.o 91perf-y += counts.o 92perf-y += stat.o 93perf-y += stat-shadow.o 94perf-y += stat-display.o 95perf-y += perf_api_probe.o 96perf-y += record.o 97perf-y += srcline.o 98perf-y += srccode.o 99perf-y += synthetic-events.o 100perf-y += data.o 101perf-y += tsc.o 102perf-y += cloexec.o 103perf-y += call-path.o 104perf-y += rwsem.o 105perf-y += thread-stack.o 106perf-y += spark.o 107perf-y += topdown.o 108perf-y += iostat.o 109perf-y += stream.o 110perf-$(CONFIG_AUXTRACE) += auxtrace.o 111perf-$(CONFIG_AUXTRACE) += intel-pt-decoder/ 112perf-$(CONFIG_AUXTRACE) += intel-pt.o 113perf-$(CONFIG_AUXTRACE) += intel-bts.o 114perf-$(CONFIG_AUXTRACE) += arm-spe.o 115perf-$(CONFIG_AUXTRACE) += arm-spe-decoder/ 116perf-$(CONFIG_AUXTRACE) += s390-cpumsf.o 117 118ifdef CONFIG_LIBOPENCSD 119perf-$(CONFIG_AUXTRACE) += cs-etm.o 120perf-$(CONFIG_AUXTRACE) += cs-etm-decoder/ 121endif 122 123perf-y += parse-branch-options.o 124perf-y += dump-insn.o 125perf-y += parse-regs-options.o 126perf-y += parse-sublevel-options.o 127perf-y += term.o 128perf-y += help-unknown-cmd.o 129perf-y += dlfilter.o 130perf-y += mem-events.o 131perf-y += vsprintf.o 132perf-y += units.o 133perf-y += time-utils.o 134perf-y += expr-flex.o 135perf-y += expr-bison.o 136perf-y += expr.o 137perf-y += branch.o 138perf-y += mem2node.o 139perf-y += clockid.o 140 141perf-$(CONFIG_LIBBPF) += bpf-loader.o 142perf-$(CONFIG_LIBBPF) += bpf_map.o 143perf-$(CONFIG_PERF_BPF_SKEL) += bpf_counter.o 144perf-$(CONFIG_PERF_BPF_SKEL) += bpf_counter_cgroup.o 145perf-$(CONFIG_BPF_PROLOGUE) += bpf-prologue.o 146perf-$(CONFIG_LIBELF) += symbol-elf.o 147perf-$(CONFIG_LIBELF) += probe-file.o 148perf-$(CONFIG_LIBELF) += probe-event.o 149 150ifdef CONFIG_LIBBPF_DYNAMIC 151 hashmap := 1 152endif 153ifndef CONFIG_LIBBPF 154 hashmap := 1 155endif 156 157ifdef hashmap 158perf-y += hashmap.o 159endif 160 161ifndef CONFIG_LIBELF 162perf-y += symbol-minimal.o 163endif 164 165ifndef CONFIG_SETNS 166perf-y += setns.o 167endif 168 169perf-$(CONFIG_DWARF) += probe-finder.o 170perf-$(CONFIG_DWARF) += dwarf-aux.o 171perf-$(CONFIG_DWARF) += dwarf-regs.o 172 173perf-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o 174perf-$(CONFIG_LOCAL_LIBUNWIND) += unwind-libunwind-local.o 175perf-$(CONFIG_LIBUNWIND) += unwind-libunwind.o 176perf-$(CONFIG_LIBUNWIND_X86) += libunwind/x86_32.o 177perf-$(CONFIG_LIBUNWIND_AARCH64) += libunwind/arm64.o 178 179perf-$(CONFIG_LIBBABELTRACE) += data-convert-bt.o 180perf-y += data-convert-json.o 181 182perf-y += scripting-engines/ 183 184perf-$(CONFIG_ZLIB) += zlib.o 185perf-$(CONFIG_LZMA) += lzma.o 186perf-$(CONFIG_ZSTD) += zstd.o 187 188perf-$(CONFIG_LIBCAP) += cap.o 189 190perf-y += demangle-ocaml.o 191perf-y += demangle-java.o 192perf-y += demangle-rust.o 193 194ifdef CONFIG_JITDUMP 195perf-$(CONFIG_LIBELF) += jitdump.o 196perf-$(CONFIG_LIBELF) += genelf.o 197perf-$(CONFIG_DWARF) += genelf_debug.o 198endif 199 200perf-y += perf-hooks.o 201 202perf-$(CONFIG_LIBBPF) += bpf-event.o 203 204perf-$(CONFIG_CXX) += c++/ 205 206perf-$(CONFIG_LIBPFM4) += pfm.o 207 208CFLAGS_config.o += -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))" 209CFLAGS_llvm-utils.o += -DPERF_INCLUDE_DIR="BUILD_STR($(perf_include_dir_SQ))" 210 211# avoid compiler warnings in 32-bit mode 212CFLAGS_genelf_debug.o += -Wno-packed 213 214$(OUTPUT)util/parse-events-flex.c $(OUTPUT)util/parse-events-flex.h: util/parse-events.l $(OUTPUT)util/parse-events-bison.c 215 $(call rule_mkdir) 216 $(Q)$(call echo-cmd,flex)$(FLEX) -o $(OUTPUT)util/parse-events-flex.c \ 217 --header-file=$(OUTPUT)util/parse-events-flex.h $(PARSER_DEBUG_FLEX) $< 218 219$(OUTPUT)util/parse-events-bison.c $(OUTPUT)util/parse-events-bison.h: util/parse-events.y 220 $(call rule_mkdir) 221 $(Q)$(call echo-cmd,bison)$(BISON) -v $< -d $(PARSER_DEBUG_BISON) $(BISON_FILE_PREFIX_MAP) \ 222 -o $(OUTPUT)util/parse-events-bison.c -p parse_events_ 223 224$(OUTPUT)util/expr-flex.c $(OUTPUT)util/expr-flex.h: util/expr.l $(OUTPUT)util/expr-bison.c 225 $(call rule_mkdir) 226 $(Q)$(call echo-cmd,flex)$(FLEX) -o $(OUTPUT)util/expr-flex.c \ 227 --header-file=$(OUTPUT)util/expr-flex.h $(PARSER_DEBUG_FLEX) $< 228 229$(OUTPUT)util/expr-bison.c $(OUTPUT)util/expr-bison.h: util/expr.y 230 $(call rule_mkdir) 231 $(Q)$(call echo-cmd,bison)$(BISON) -v $< -d $(PARSER_DEBUG_BISON) $(BISON_FILE_PREFIX_MAP) \ 232 -o $(OUTPUT)util/expr-bison.c -p expr_ 233 234$(OUTPUT)util/pmu-flex.c $(OUTPUT)util/pmu-flex.h: util/pmu.l $(OUTPUT)util/pmu-bison.c 235 $(call rule_mkdir) 236 $(Q)$(call echo-cmd,flex)$(FLEX) -o $(OUTPUT)util/pmu-flex.c \ 237 --header-file=$(OUTPUT)util/pmu-flex.h $(PARSER_DEBUG_FLEX) $< 238 239$(OUTPUT)util/pmu-bison.c $(OUTPUT)util/pmu-bison.h: util/pmu.y 240 $(call rule_mkdir) 241 $(Q)$(call echo-cmd,bison)$(BISON) -v $< -d $(PARSER_DEBUG_BISON) $(BISON_FILE_PREFIX_MAP) \ 242 -o $(OUTPUT)util/pmu-bison.c -p perf_pmu_ 243 244FLEX_GE_26 := $(shell expr $(shell $(FLEX) --version | sed -e 's/flex \([0-9]\+\).\([0-9]\+\)/\1\2/g') \>\= 26) 245ifeq ($(FLEX_GE_26),1) 246 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 247 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 $$?) 248 ifeq ($(CC_HASNT_MISLEADING_INDENTATION), 1) 249 flex_flags += -Wno-misleading-indentation 250 endif 251else 252 flex_flags := -w 253endif 254CFLAGS_parse-events-flex.o += $(flex_flags) 255CFLAGS_pmu-flex.o += $(flex_flags) 256CFLAGS_expr-flex.o += $(flex_flags) 257 258bison_flags := -DYYENABLE_NLS=0 259BISON_GE_35 := $(shell expr $(shell $(BISON) --version | grep bison | sed -e 's/.\+ \([0-9]\+\).\([0-9]\+\)/\1\2/g') \>\= 35) 260ifeq ($(BISON_GE_35),1) 261 bison_flags += -Wno-unused-parameter -Wno-nested-externs -Wno-implicit-function-declaration -Wno-switch-enum 262else 263 bison_flags += -w 264endif 265CFLAGS_parse-events-bison.o += $(bison_flags) 266CFLAGS_pmu-bison.o += -DYYLTYPE_IS_TRIVIAL=0 $(bison_flags) 267CFLAGS_expr-bison.o += -DYYLTYPE_IS_TRIVIAL=0 $(bison_flags) 268 269$(OUTPUT)util/parse-events.o: $(OUTPUT)util/parse-events-flex.c $(OUTPUT)util/parse-events-bison.c 270$(OUTPUT)util/pmu.o: $(OUTPUT)util/pmu-flex.c $(OUTPUT)util/pmu-bison.c 271$(OUTPUT)util/expr.o: $(OUTPUT)util/expr-flex.c $(OUTPUT)util/expr-bison.c 272 273CFLAGS_bitmap.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))" 274CFLAGS_find_bit.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))" 275CFLAGS_rbtree.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))" 276CFLAGS_libstring.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))" 277CFLAGS_hweight.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))" 278CFLAGS_parse-events.o += -Wno-redundant-decls 279CFLAGS_expr.o += -Wno-redundant-decls 280CFLAGS_header.o += -include $(OUTPUT)PERF-VERSION-FILE 281 282$(OUTPUT)util/kallsyms.o: ../lib/symbol/kallsyms.c FORCE 283 $(call rule_mkdir) 284 $(call if_changed_dep,cc_o_c) 285 286$(OUTPUT)util/argv_split.o: ../lib/argv_split.c FORCE 287 $(call rule_mkdir) 288 $(call if_changed_dep,cc_o_c) 289 290$(OUTPUT)util/bitmap.o: ../lib/bitmap.c FORCE 291 $(call rule_mkdir) 292 $(call if_changed_dep,cc_o_c) 293 294$(OUTPUT)util/ctype.o: ../lib/ctype.c FORCE 295 $(call rule_mkdir) 296 $(call if_changed_dep,cc_o_c) 297 298$(OUTPUT)util/find_bit.o: ../lib/find_bit.c FORCE 299 $(call rule_mkdir) 300 $(call if_changed_dep,cc_o_c) 301 302$(OUTPUT)util/rbtree.o: ../lib/rbtree.c FORCE 303 $(call rule_mkdir) 304 $(call if_changed_dep,cc_o_c) 305 306$(OUTPUT)util/libstring.o: ../lib/string.c FORCE 307 $(call rule_mkdir) 308 $(call if_changed_dep,cc_o_c) 309 310$(OUTPUT)util/hweight.o: ../lib/hweight.c FORCE 311 $(call rule_mkdir) 312 $(call if_changed_dep,cc_o_c) 313 314$(OUTPUT)util/vsprintf.o: ../lib/vsprintf.c FORCE 315 $(call rule_mkdir) 316 $(call if_changed_dep,cc_o_c) 317