Jiri Olsa | 5ff3288 | 2019-02-13 13:32:39 +0100 | [diff] [blame] | 1 | perf-y += annotate.o |
Jin Yao | 6041441 | 2019-11-07 15:47:14 +0800 | [diff] [blame] | 2 | perf-y += block-info.o |
Jiri Olsa | 5ff3288 | 2019-02-13 13:32:39 +0100 | [diff] [blame] | 3 | perf-y += block-range.o |
| 4 | perf-y += build-id.o |
Arnaldo Carvalho de Melo | 1250090 | 2019-08-22 16:58:29 -0300 | [diff] [blame] | 5 | perf-y += cacheline.o |
Jiri Olsa | 5ff3288 | 2019-02-13 13:32:39 +0100 | [diff] [blame] | 6 | perf-y += config.o |
Arnaldo Carvalho de Melo | 32ff3fe | 2019-09-24 15:14:12 -0300 | [diff] [blame] | 7 | perf-y += copyfile.o |
Jiri Olsa | 5ff3288 | 2019-02-13 13:32:39 +0100 | [diff] [blame] | 8 | perf-y += ctype.o |
| 9 | perf-y += db-export.o |
| 10 | perf-y += env.o |
| 11 | perf-y += event.o |
| 12 | perf-y += evlist.o |
Jin Yao | b53a075 | 2021-04-27 15:01:26 +0800 | [diff] [blame] | 13 | perf-y += evlist-hybrid.o |
Arnaldo Carvalho de Melo | 9a39994 | 2020-05-05 12:18:21 -0300 | [diff] [blame] | 14 | perf-y += sideband_evlist.o |
Jiri Olsa | 5ff3288 | 2019-02-13 13:32:39 +0100 | [diff] [blame] | 15 | perf-y += evsel.o |
| 16 | perf-y += evsel_fprintf.o |
Arnaldo Carvalho de Melo | ca12527 | 2019-09-24 15:41:51 -0300 | [diff] [blame] | 17 | perf-y += perf_event_attr_fprintf.o |
Arnaldo Carvalho de Melo | 8829e56 | 2019-08-15 11:00:11 -0300 | [diff] [blame] | 18 | perf-y += evswitch.o |
Jiri Olsa | 5ff3288 | 2019-02-13 13:32:39 +0100 | [diff] [blame] | 19 | perf-y += find_bit.o |
| 20 | perf-y += get_current_dir_name.o |
| 21 | perf-y += kallsyms.o |
| 22 | perf-y += levenshtein.o |
| 23 | perf-y += llvm-utils.o |
| 24 | perf-y += mmap.o |
| 25 | perf-y += memswap.o |
| 26 | perf-y += parse-events.o |
Jin Yao | 9cbfa2f | 2021-04-27 15:01:21 +0800 | [diff] [blame] | 27 | perf-y += parse-events-hybrid.o |
Jiri Olsa | 5ff3288 | 2019-02-13 13:32:39 +0100 | [diff] [blame] | 28 | perf-y += perf_regs.o |
| 29 | perf-y += path.o |
| 30 | perf-y += print_binary.o |
Arnaldo Carvalho de Melo | 4975223 | 2019-07-09 14:49:26 -0300 | [diff] [blame] | 31 | perf-y += rlimit.o |
Arnaldo Carvalho de Melo | 9c10548 | 2019-06-26 15:27:58 -0300 | [diff] [blame] | 32 | perf-y += argv_split.o |
Jiri Olsa | 5ff3288 | 2019-02-13 13:32:39 +0100 | [diff] [blame] | 33 | perf-y += rbtree.o |
| 34 | perf-y += libstring.o |
| 35 | perf-y += bitmap.o |
| 36 | perf-y += hweight.o |
| 37 | perf-y += smt.o |
| 38 | perf-y += strbuf.o |
| 39 | perf-y += string.o |
| 40 | perf-y += strlist.o |
| 41 | perf-y += strfilter.o |
| 42 | perf-y += top.o |
| 43 | perf-y += usage.o |
| 44 | perf-y += dso.o |
Arnaldo Carvalho de Melo | 4a3cec8 | 2019-08-30 11:11:01 -0300 | [diff] [blame] | 45 | perf-y += dsos.o |
Jiri Olsa | 5ff3288 | 2019-02-13 13:32:39 +0100 | [diff] [blame] | 46 | perf-y += symbol.o |
| 47 | perf-y += symbol_fprintf.o |
| 48 | perf-y += color.o |
| 49 | perf-y += color_config.o |
| 50 | perf-y += metricgroup.o |
| 51 | perf-y += header.o |
| 52 | perf-y += callchain.o |
| 53 | perf-y += values.o |
| 54 | perf-y += debug.o |
Andi Kleen | d966458 | 2019-11-20 16:15:11 -0800 | [diff] [blame] | 55 | perf-y += fncache.o |
Jiri Olsa | 5ff3288 | 2019-02-13 13:32:39 +0100 | [diff] [blame] | 56 | perf-y += machine.o |
| 57 | perf-y += map.o |
| 58 | perf-y += pstack.o |
| 59 | perf-y += session.o |
| 60 | perf-y += sample-raw.o |
| 61 | perf-y += s390-sample-raw.o |
| 62 | perf-$(CONFIG_TRACE) += syscalltbl.o |
| 63 | perf-y += ordered-events.o |
| 64 | perf-y += namespaces.o |
| 65 | perf-y += comm.o |
| 66 | perf-y += thread.o |
| 67 | perf-y += thread_map.o |
| 68 | perf-y += trace-event-parse.o |
| 69 | perf-y += parse-events-flex.o |
| 70 | perf-y += parse-events-bison.o |
| 71 | perf-y += pmu.o |
| 72 | perf-y += pmu-flex.o |
| 73 | perf-y += pmu-bison.o |
Jin Yao | 4446243 | 2021-04-27 15:01:18 +0800 | [diff] [blame] | 74 | perf-y += pmu-hybrid.o |
Jiri Olsa | 5ff3288 | 2019-02-13 13:32:39 +0100 | [diff] [blame] | 75 | perf-y += trace-event-read.o |
| 76 | perf-y += trace-event-info.o |
| 77 | perf-y += trace-event-scripting.o |
| 78 | perf-y += trace-event.o |
| 79 | perf-y += svghelper.o |
| 80 | perf-y += sort.o |
| 81 | perf-y += hist.o |
| 82 | perf-y += util.o |
Jiri Olsa | 5ff3288 | 2019-02-13 13:32:39 +0100 | [diff] [blame] | 83 | perf-y += cpumap.o |
Andi Kleen | 267ed5d | 2019-11-20 16:15:12 -0800 | [diff] [blame] | 84 | perf-y += affinity.o |
Jiri Olsa | 5135d5e | 2019-02-19 10:58:13 +0100 | [diff] [blame] | 85 | perf-y += cputopo.o |
Jiri Olsa | 5ff3288 | 2019-02-13 13:32:39 +0100 | [diff] [blame] | 86 | perf-y += cgroup.o |
| 87 | perf-y += target.o |
| 88 | perf-y += rblist.o |
| 89 | perf-y += intlist.o |
| 90 | perf-y += vdso.o |
| 91 | perf-y += counts.o |
| 92 | perf-y += stat.o |
| 93 | perf-y += stat-shadow.o |
| 94 | perf-y += stat-display.o |
Arnaldo Carvalho de Melo | 40c7d24 | 2020-05-05 11:49:08 -0300 | [diff] [blame] | 95 | perf-y += perf_api_probe.o |
Jiri Olsa | 5ff3288 | 2019-02-13 13:32:39 +0100 | [diff] [blame] | 96 | perf-y += record.o |
| 97 | perf-y += srcline.o |
| 98 | perf-y += srccode.o |
Arnaldo Carvalho de Melo | 055c67e | 2019-09-18 16:08:52 -0300 | [diff] [blame] | 99 | perf-y += synthetic-events.o |
Jiri Olsa | 5ff3288 | 2019-02-13 13:32:39 +0100 | [diff] [blame] | 100 | perf-y += data.o |
| 101 | perf-y += tsc.o |
| 102 | perf-y += cloexec.o |
| 103 | perf-y += call-path.o |
| 104 | perf-y += rwsem.o |
| 105 | perf-y += thread-stack.o |
Jin Yao | cebf7d5 | 2019-09-25 09:14:46 +0800 | [diff] [blame] | 106 | perf-y += spark.o |
Kan Liang | 687986b | 2020-09-11 07:48:05 -0700 | [diff] [blame] | 107 | perf-y += topdown.o |
Alexander Antonov | f07952b | 2021-04-19 12:41:44 +0300 | [diff] [blame] | 108 | perf-y += iostat.o |
Jin Yao | 480accb | 2020-10-09 10:28:39 +0800 | [diff] [blame] | 109 | perf-y += stream.o |
Jiri Olsa | 5ff3288 | 2019-02-13 13:32:39 +0100 | [diff] [blame] | 110 | perf-$(CONFIG_AUXTRACE) += auxtrace.o |
| 111 | perf-$(CONFIG_AUXTRACE) += intel-pt-decoder/ |
| 112 | perf-$(CONFIG_AUXTRACE) += intel-pt.o |
| 113 | perf-$(CONFIG_AUXTRACE) += intel-bts.o |
| 114 | perf-$(CONFIG_AUXTRACE) += arm-spe.o |
Tan Xiaojun | 4db25f6 | 2020-05-30 20:24:40 +0800 | [diff] [blame] | 115 | perf-$(CONFIG_AUXTRACE) += arm-spe-decoder/ |
Jiri Olsa | 5ff3288 | 2019-02-13 13:32:39 +0100 | [diff] [blame] | 116 | perf-$(CONFIG_AUXTRACE) += s390-cpumsf.o |
Mathieu Poirier | 440a23b | 2018-01-17 10:52:11 -0700 | [diff] [blame] | 117 | |
| 118 | ifdef CONFIG_LIBOPENCSD |
Jiri Olsa | 5ff3288 | 2019-02-13 13:32:39 +0100 | [diff] [blame] | 119 | perf-$(CONFIG_AUXTRACE) += cs-etm.o |
| 120 | perf-$(CONFIG_AUXTRACE) += cs-etm-decoder/ |
Mathieu Poirier | 440a23b | 2018-01-17 10:52:11 -0700 | [diff] [blame] | 121 | endif |
| 122 | |
Jiri Olsa | 5ff3288 | 2019-02-13 13:32:39 +0100 | [diff] [blame] | 123 | perf-y += parse-branch-options.o |
| 124 | perf-y += dump-insn.o |
| 125 | perf-y += parse-regs-options.o |
Changbin Du | a80abe2 | 2020-08-08 10:31:30 +0800 | [diff] [blame] | 126 | perf-y += parse-sublevel-options.o |
Jiri Olsa | 5ff3288 | 2019-02-13 13:32:39 +0100 | [diff] [blame] | 127 | perf-y += term.o |
| 128 | perf-y += help-unknown-cmd.o |
Adrian Hunter | 291961f | 2021-06-27 16:18:09 +0300 | [diff] [blame] | 129 | perf-y += dlfilter.o |
Jiri Olsa | 5ff3288 | 2019-02-13 13:32:39 +0100 | [diff] [blame] | 130 | perf-y += mem-events.o |
| 131 | perf-y += vsprintf.o |
| 132 | perf-y += units.o |
| 133 | perf-y += time-utils.o |
Jiri Olsa | 26226a9 | 2020-02-28 10:36:13 +0100 | [diff] [blame] | 134 | perf-y += expr-flex.o |
Jiri Olsa | 5ff3288 | 2019-02-13 13:32:39 +0100 | [diff] [blame] | 135 | perf-y += expr-bison.o |
Jiri Olsa | 576a65b | 2020-02-28 10:36:12 +0100 | [diff] [blame] | 136 | perf-y += expr.o |
Jiri Olsa | 5ff3288 | 2019-02-13 13:32:39 +0100 | [diff] [blame] | 137 | perf-y += branch.o |
| 138 | perf-y += mem2node.o |
Jiri Olsa | 6953beb | 2020-08-05 11:34:38 +0200 | [diff] [blame] | 139 | perf-y += clockid.o |
Jiri Olsa | 9352aab | 2014-12-29 17:42:46 +0100 | [diff] [blame] | 140 | |
Jiri Olsa | 5ff3288 | 2019-02-13 13:32:39 +0100 | [diff] [blame] | 141 | perf-$(CONFIG_LIBBPF) += bpf-loader.o |
Arnaldo Carvalho de Melo | d19f8564 | 2019-02-19 16:11:56 -0300 | [diff] [blame] | 142 | perf-$(CONFIG_LIBBPF) += bpf_map.o |
Song Liu | fa853c4 | 2020-12-29 13:42:14 -0800 | [diff] [blame] | 143 | perf-$(CONFIG_PERF_BPF_SKEL) += bpf_counter.o |
Namhyung Kim | 944138f | 2021-07-01 14:12:27 -0700 | [diff] [blame^] | 144 | perf-$(CONFIG_PERF_BPF_SKEL) += bpf_counter_cgroup.o |
Jiri Olsa | 5ff3288 | 2019-02-13 13:32:39 +0100 | [diff] [blame] | 145 | perf-$(CONFIG_BPF_PROLOGUE) += bpf-prologue.o |
| 146 | perf-$(CONFIG_LIBELF) += symbol-elf.o |
| 147 | perf-$(CONFIG_LIBELF) += probe-file.o |
| 148 | perf-$(CONFIG_LIBELF) += probe-event.o |
Jiri Olsa | 709e679 | 2014-12-29 23:52:25 +0100 | [diff] [blame] | 149 | |
Jiri Olsa | ad1237c | 2021-05-08 22:50:20 +0200 | [diff] [blame] | 150 | ifdef CONFIG_LIBBPF_DYNAMIC |
| 151 | hashmap := 1 |
| 152 | endif |
Ian Rogers | eee1950 | 2020-05-15 15:17:29 -0700 | [diff] [blame] | 153 | ifndef CONFIG_LIBBPF |
Jiri Olsa | ad1237c | 2021-05-08 22:50:20 +0200 | [diff] [blame] | 154 | hashmap := 1 |
| 155 | endif |
| 156 | |
| 157 | ifdef hashmap |
Ian Rogers | eee1950 | 2020-05-15 15:17:29 -0700 | [diff] [blame] | 158 | perf-y += hashmap.o |
| 159 | endif |
| 160 | |
Jiri Olsa | 709e679 | 2014-12-29 23:52:25 +0100 | [diff] [blame] | 161 | ifndef CONFIG_LIBELF |
Jiri Olsa | 5ff3288 | 2019-02-13 13:32:39 +0100 | [diff] [blame] | 162 | perf-y += symbol-minimal.o |
Jiri Olsa | 709e679 | 2014-12-29 23:52:25 +0100 | [diff] [blame] | 163 | endif |
| 164 | |
Arnaldo Carvalho de Melo | 86bcdb5 | 2017-07-18 17:15:29 -0300 | [diff] [blame] | 165 | ifndef CONFIG_SETNS |
Jiri Olsa | 5ff3288 | 2019-02-13 13:32:39 +0100 | [diff] [blame] | 166 | perf-y += setns.o |
Arnaldo Carvalho de Melo | 86bcdb5 | 2017-07-18 17:15:29 -0300 | [diff] [blame] | 167 | endif |
| 168 | |
Jiri Olsa | 5ff3288 | 2019-02-13 13:32:39 +0100 | [diff] [blame] | 169 | perf-$(CONFIG_DWARF) += probe-finder.o |
| 170 | perf-$(CONFIG_DWARF) += dwarf-aux.o |
| 171 | perf-$(CONFIG_DWARF) += dwarf-regs.o |
Jiri Olsa | 8379fce | 2014-12-30 00:06:25 +0100 | [diff] [blame] | 172 | |
Jiri Olsa | 5ff3288 | 2019-02-13 13:32:39 +0100 | [diff] [blame] | 173 | perf-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o |
| 174 | perf-$(CONFIG_LOCAL_LIBUNWIND) += unwind-libunwind-local.o |
| 175 | perf-$(CONFIG_LIBUNWIND) += unwind-libunwind.o |
| 176 | perf-$(CONFIG_LIBUNWIND_X86) += libunwind/x86_32.o |
| 177 | perf-$(CONFIG_LIBUNWIND_AARCH64) += libunwind/arm64.o |
Jiri Olsa | b2e45c3 | 2014-12-30 00:11:11 +0100 | [diff] [blame] | 178 | |
Jiri Olsa | 5ff3288 | 2019-02-13 13:32:39 +0100 | [diff] [blame] | 179 | perf-$(CONFIG_LIBBABELTRACE) += data-convert-bt.o |
Nicholas Fraser | d0713d4 | 2021-04-26 10:47:16 -0400 | [diff] [blame] | 180 | perf-y += data-convert-json.o |
Jiri Olsa | edbe981 | 2015-02-20 23:17:00 +0100 | [diff] [blame] | 181 | |
Jiri Olsa | 5ff3288 | 2019-02-13 13:32:39 +0100 | [diff] [blame] | 182 | perf-y += scripting-engines/ |
Jiri Olsa | c7355f8 | 2014-12-30 13:11:32 +0100 | [diff] [blame] | 183 | |
Jiri Olsa | 5ff3288 | 2019-02-13 13:32:39 +0100 | [diff] [blame] | 184 | perf-$(CONFIG_ZLIB) += zlib.o |
| 185 | perf-$(CONFIG_LZMA) += lzma.o |
Alexey Budankov | f24c1d7 | 2019-03-18 20:42:55 +0300 | [diff] [blame] | 186 | perf-$(CONFIG_ZSTD) += zstd.o |
| 187 | |
Igor Lubashev | c22e150 | 2019-08-07 10:44:14 -0400 | [diff] [blame] | 188 | perf-$(CONFIG_LIBCAP) += cap.o |
| 189 | |
Fabian Hemmer | cef7af2 | 2021-02-03 16:15:37 -0500 | [diff] [blame] | 190 | perf-y += demangle-ocaml.o |
Jiri Olsa | 5ff3288 | 2019-02-13 13:32:39 +0100 | [diff] [blame] | 191 | perf-y += demangle-java.o |
| 192 | perf-y += demangle-rust.o |
Arnaldo Carvalho de Melo | 46dad05 | 2016-03-07 18:48:45 -0300 | [diff] [blame] | 193 | |
Jiri Olsa | e12b202 | 2016-03-10 17:41:13 +0100 | [diff] [blame] | 194 | ifdef CONFIG_JITDUMP |
Jiri Olsa | 5ff3288 | 2019-02-13 13:32:39 +0100 | [diff] [blame] | 195 | perf-$(CONFIG_LIBELF) += jitdump.o |
| 196 | perf-$(CONFIG_LIBELF) += genelf.o |
| 197 | perf-$(CONFIG_DWARF) += genelf_debug.o |
Arnaldo Carvalho de Melo | 46dad05 | 2016-03-07 18:48:45 -0300 | [diff] [blame] | 198 | endif |
Jiri Olsa | 3bc3374 | 2014-12-30 13:30:04 +0100 | [diff] [blame] | 199 | |
Jiri Olsa | 5ff3288 | 2019-02-13 13:32:39 +0100 | [diff] [blame] | 200 | perf-y += perf-hooks.o |
Wang Nan | a074865 | 2016-11-26 07:03:28 +0000 | [diff] [blame] | 201 | |
Jiri Olsa | 5ff3288 | 2019-02-13 13:32:39 +0100 | [diff] [blame] | 202 | perf-$(CONFIG_LIBBPF) += bpf-event.o |
Song Liu | 45178a9 | 2019-01-17 08:15:18 -0800 | [diff] [blame] | 203 | |
Jiri Olsa | 5ff3288 | 2019-02-13 13:32:39 +0100 | [diff] [blame] | 204 | perf-$(CONFIG_CXX) += c++/ |
Wang Nan | 00b8669 | 2016-11-26 07:03:34 +0000 | [diff] [blame] | 205 | |
Stephane Eranian | 7094349 | 2020-05-05 11:29:43 -0700 | [diff] [blame] | 206 | perf-$(CONFIG_LIBPFM4) += pfm.o |
| 207 | |
Jiri Olsa | 9352aab | 2014-12-29 17:42:46 +0100 | [diff] [blame] | 208 | CFLAGS_config.o += -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))" |
Arnaldo Carvalho de Melo | 1b16fff | 2018-05-04 10:37:27 -0300 | [diff] [blame] | 209 | CFLAGS_llvm-utils.o += -DPERF_INCLUDE_DIR="BUILD_STR($(perf_include_dir_SQ))" |
| 210 | |
Stephane Eranian | 598b7c6 | 2015-11-30 10:02:23 +0100 | [diff] [blame] | 211 | # avoid compiler warnings in 32-bit mode |
| 212 | CFLAGS_genelf_debug.o += -Wno-packed |
Jiri Olsa | 9352aab | 2014-12-29 17:42:46 +0100 | [diff] [blame] | 213 | |
Ian Rogers | 4b971df | 2020-06-18 21:33:51 -0700 | [diff] [blame] | 214 | $(OUTPUT)util/parse-events-flex.c $(OUTPUT)util/parse-events-flex.h: util/parse-events.l $(OUTPUT)util/parse-events-bison.c |
Jiri Olsa | 1999307 | 2014-12-30 18:44:38 +0100 | [diff] [blame] | 215 | $(call rule_mkdir) |
Ian Rogers | 4b971df | 2020-06-18 21:33:51 -0700 | [diff] [blame] | 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) $< |
Jiri Olsa | 9352aab | 2014-12-29 17:42:46 +0100 | [diff] [blame] | 218 | |
Ian Rogers | ef9894d | 2020-06-18 21:33:52 -0700 | [diff] [blame] | 219 | $(OUTPUT)util/parse-events-bison.c $(OUTPUT)util/parse-events-bison.h: util/parse-events.y |
Jiri Olsa | 1999307 | 2014-12-30 18:44:38 +0100 | [diff] [blame] | 220 | $(call rule_mkdir) |
Denys Zagorui | 6793672 | 2021-05-24 04:15:14 -0700 | [diff] [blame] | 221 | $(Q)$(call echo-cmd,bison)$(BISON) -v $< -d $(PARSER_DEBUG_BISON) $(BISON_FILE_PREFIX_MAP) \ |
Ian Rogers | ef9894d | 2020-06-18 21:33:52 -0700 | [diff] [blame] | 222 | -o $(OUTPUT)util/parse-events-bison.c -p parse_events_ |
Jiri Olsa | 9352aab | 2014-12-29 17:42:46 +0100 | [diff] [blame] | 223 | |
Ian Rogers | 4b971df | 2020-06-18 21:33:51 -0700 | [diff] [blame] | 224 | $(OUTPUT)util/expr-flex.c $(OUTPUT)util/expr-flex.h: util/expr.l $(OUTPUT)util/expr-bison.c |
Jiri Olsa | 26226a9 | 2020-02-28 10:36:13 +0100 | [diff] [blame] | 225 | $(call rule_mkdir) |
Ian Rogers | 4b971df | 2020-06-18 21:33:51 -0700 | [diff] [blame] | 226 | $(Q)$(call echo-cmd,flex)$(FLEX) -o $(OUTPUT)util/expr-flex.c \ |
| 227 | --header-file=$(OUTPUT)util/expr-flex.h $(PARSER_DEBUG_FLEX) $< |
Jiri Olsa | 26226a9 | 2020-02-28 10:36:13 +0100 | [diff] [blame] | 228 | |
Ian Rogers | ef9894d | 2020-06-18 21:33:52 -0700 | [diff] [blame] | 229 | $(OUTPUT)util/expr-bison.c $(OUTPUT)util/expr-bison.h: util/expr.y |
Andi Kleen | 0751673 | 2017-03-20 13:17:05 -0700 | [diff] [blame] | 230 | $(call rule_mkdir) |
Denys Zagorui | 6793672 | 2021-05-24 04:15:14 -0700 | [diff] [blame] | 231 | $(Q)$(call echo-cmd,bison)$(BISON) -v $< -d $(PARSER_DEBUG_BISON) $(BISON_FILE_PREFIX_MAP) \ |
Ian Rogers | ef9894d | 2020-06-18 21:33:52 -0700 | [diff] [blame] | 232 | -o $(OUTPUT)util/expr-bison.c -p expr_ |
Andi Kleen | 0751673 | 2017-03-20 13:17:05 -0700 | [diff] [blame] | 233 | |
Ian Rogers | 4b971df | 2020-06-18 21:33:51 -0700 | [diff] [blame] | 234 | $(OUTPUT)util/pmu-flex.c $(OUTPUT)util/pmu-flex.h: util/pmu.l $(OUTPUT)util/pmu-bison.c |
Jiri Olsa | 1999307 | 2014-12-30 18:44:38 +0100 | [diff] [blame] | 235 | $(call rule_mkdir) |
Ian Rogers | 4b971df | 2020-06-18 21:33:51 -0700 | [diff] [blame] | 236 | $(Q)$(call echo-cmd,flex)$(FLEX) -o $(OUTPUT)util/pmu-flex.c \ |
| 237 | --header-file=$(OUTPUT)util/pmu-flex.h $(PARSER_DEBUG_FLEX) $< |
Jiri Olsa | 9352aab | 2014-12-29 17:42:46 +0100 | [diff] [blame] | 238 | |
Ian Rogers | ef9894d | 2020-06-18 21:33:52 -0700 | [diff] [blame] | 239 | $(OUTPUT)util/pmu-bison.c $(OUTPUT)util/pmu-bison.h: util/pmu.y |
Jiri Olsa | 1999307 | 2014-12-30 18:44:38 +0100 | [diff] [blame] | 240 | $(call rule_mkdir) |
Denys Zagorui | 6793672 | 2021-05-24 04:15:14 -0700 | [diff] [blame] | 241 | $(Q)$(call echo-cmd,bison)$(BISON) -v $< -d $(PARSER_DEBUG_BISON) $(BISON_FILE_PREFIX_MAP) \ |
Ian Rogers | ef9894d | 2020-06-18 21:33:52 -0700 | [diff] [blame] | 242 | -o $(OUTPUT)util/pmu-bison.c -p perf_pmu_ |
Jiri Olsa | 9352aab | 2014-12-29 17:42:46 +0100 | [diff] [blame] | 243 | |
Ian Rogers | 304d7a9 | 2020-06-18 21:33:53 -0700 | [diff] [blame] | 244 | FLEX_GE_26 := $(shell expr $(shell $(FLEX) --version | sed -e 's/flex \([0-9]\+\).\([0-9]\+\)/\1\2/g') \>\= 26) |
| 245 | ifeq ($(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 |
| 251 | else |
| 252 | flex_flags := -w |
| 253 | endif |
| 254 | CFLAGS_parse-events-flex.o += $(flex_flags) |
| 255 | CFLAGS_pmu-flex.o += $(flex_flags) |
| 256 | CFLAGS_expr-flex.o += $(flex_flags) |
Ian Rogers | 1f16fca | 2020-06-18 21:33:56 -0700 | [diff] [blame] | 257 | |
| 258 | bison_flags := -DYYENABLE_NLS=0 |
| 259 | BISON_GE_35 := $(shell expr $(shell $(BISON) --version | grep bison | sed -e 's/.\+ \([0-9]\+\).\([0-9]\+\)/\1\2/g') \>\= 35) |
| 260 | ifeq ($(BISON_GE_35),1) |
| 261 | bison_flags += -Wno-unused-parameter -Wno-nested-externs -Wno-implicit-function-declaration -Wno-switch-enum |
| 262 | else |
| 263 | bison_flags += -w |
| 264 | endif |
| 265 | CFLAGS_parse-events-bison.o += $(bison_flags) |
| 266 | CFLAGS_pmu-bison.o += -DYYLTYPE_IS_TRIVIAL=0 $(bison_flags) |
| 267 | CFLAGS_expr-bison.o += -DYYLTYPE_IS_TRIVIAL=0 $(bison_flags) |
Jiri Olsa | 9352aab | 2014-12-29 17:42:46 +0100 | [diff] [blame] | 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 |
Jiri Olsa | 26226a9 | 2020-02-28 10:36:13 +0100 | [diff] [blame] | 271 | $(OUTPUT)util/expr.o: $(OUTPUT)util/expr-flex.c $(OUTPUT)util/expr-bison.c |
Jiri Olsa | 9352aab | 2014-12-29 17:42:46 +0100 | [diff] [blame] | 272 | |
Arnaldo Carvalho de Melo | 915b088 | 2016-01-08 12:33:37 -0300 | [diff] [blame] | 273 | CFLAGS_bitmap.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))" |
Arnaldo Carvalho de Melo | 552eb975 | 2016-01-08 10:46:52 -0300 | [diff] [blame] | 274 | CFLAGS_find_bit.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))" |
Jiri Olsa | 9352aab | 2014-12-29 17:42:46 +0100 | [diff] [blame] | 275 | CFLAGS_rbtree.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))" |
Arnaldo Carvalho de Melo | 4ddd327 | 2015-11-16 11:36:29 -0300 | [diff] [blame] | 276 | CFLAGS_libstring.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))" |
Jiri Olsa | 9352aab | 2014-12-29 17:42:46 +0100 | [diff] [blame] | 277 | CFLAGS_hweight.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))" |
| 278 | CFLAGS_parse-events.o += -Wno-redundant-decls |
Jiri Olsa | 26226a9 | 2020-02-28 10:36:13 +0100 | [diff] [blame] | 279 | CFLAGS_expr.o += -Wno-redundant-decls |
Soramichi AKIYAMA | d25ed5d | 2017-01-17 00:22:37 +0900 | [diff] [blame] | 280 | CFLAGS_header.o += -include $(OUTPUT)PERF-VERSION-FILE |
Jiri Olsa | 9352aab | 2014-12-29 17:42:46 +0100 | [diff] [blame] | 281 | |
| 282 | $(OUTPUT)util/kallsyms.o: ../lib/symbol/kallsyms.c FORCE |
Jiri Olsa | 1999307 | 2014-12-30 18:44:38 +0100 | [diff] [blame] | 283 | $(call rule_mkdir) |
Jiri Olsa | 9352aab | 2014-12-29 17:42:46 +0100 | [diff] [blame] | 284 | $(call if_changed_dep,cc_o_c) |
| 285 | |
Arnaldo Carvalho de Melo | 9c10548 | 2019-06-26 15:27:58 -0300 | [diff] [blame] | 286 | $(OUTPUT)util/argv_split.o: ../lib/argv_split.c FORCE |
| 287 | $(call rule_mkdir) |
| 288 | $(call if_changed_dep,cc_o_c) |
| 289 | |
Arnaldo Carvalho de Melo | 915b088 | 2016-01-08 12:33:37 -0300 | [diff] [blame] | 290 | $(OUTPUT)util/bitmap.o: ../lib/bitmap.c FORCE |
| 291 | $(call rule_mkdir) |
| 292 | $(call if_changed_dep,cc_o_c) |
| 293 | |
Arnaldo Carvalho de Melo | 3052ba5 | 2019-06-25 17:27:31 -0300 | [diff] [blame] | 294 | $(OUTPUT)util/ctype.o: ../lib/ctype.c FORCE |
| 295 | $(call rule_mkdir) |
| 296 | $(call if_changed_dep,cc_o_c) |
| 297 | |
Arnaldo Carvalho de Melo | 552eb975 | 2016-01-08 10:46:52 -0300 | [diff] [blame] | 298 | $(OUTPUT)util/find_bit.o: ../lib/find_bit.c FORCE |
Jiri Olsa | 1999307 | 2014-12-30 18:44:38 +0100 | [diff] [blame] | 299 | $(call rule_mkdir) |
Jiri Olsa | 9352aab | 2014-12-29 17:42:46 +0100 | [diff] [blame] | 300 | $(call if_changed_dep,cc_o_c) |
| 301 | |
Arnaldo Carvalho de Melo | 3f73537 | 2015-07-05 22:48:21 -0300 | [diff] [blame] | 302 | $(OUTPUT)util/rbtree.o: ../lib/rbtree.c FORCE |
Jiri Olsa | 1999307 | 2014-12-30 18:44:38 +0100 | [diff] [blame] | 303 | $(call rule_mkdir) |
Jiri Olsa | 9352aab | 2014-12-29 17:42:46 +0100 | [diff] [blame] | 304 | $(call if_changed_dep,cc_o_c) |
| 305 | |
Arnaldo Carvalho de Melo | 4ddd327 | 2015-11-16 11:36:29 -0300 | [diff] [blame] | 306 | $(OUTPUT)util/libstring.o: ../lib/string.c FORCE |
| 307 | $(call rule_mkdir) |
| 308 | $(call if_changed_dep,cc_o_c) |
| 309 | |
Arnaldo Carvalho de Melo | 0aefc35 | 2015-07-09 16:27:25 -0300 | [diff] [blame] | 310 | $(OUTPUT)util/hweight.o: ../lib/hweight.c FORCE |
Jiri Olsa | 1999307 | 2014-12-30 18:44:38 +0100 | [diff] [blame] | 311 | $(call rule_mkdir) |
Jiri Olsa | 9352aab | 2014-12-29 17:42:46 +0100 | [diff] [blame] | 312 | $(call if_changed_dep,cc_o_c) |
Arnaldo Carvalho de Melo | d0761e3 | 2016-07-07 15:42:33 -0300 | [diff] [blame] | 313 | |
| 314 | $(OUTPUT)util/vsprintf.o: ../lib/vsprintf.c FORCE |
| 315 | $(call rule_mkdir) |
| 316 | $(call if_changed_dep,cc_o_c) |