blob: 94b1099f2c223f356f3dbee71690eff77bec6aa0 [file] [log] [blame]
Jiri Olsa9352aab2014-12-29 17:42:46 +01001libperf-y += abspath.o
2libperf-y += alias.o
3libperf-y += annotate.o
4libperf-y += build-id.o
5libperf-y += config.o
6libperf-y += ctype.o
7libperf-y += db-export.o
Arnaldo Carvalho de Melof0ce8882015-09-08 13:30:00 -03008libperf-y += env.o
Jiri Olsa9352aab2014-12-29 17:42:46 +01009libperf-y += event.o
10libperf-y += evlist.o
11libperf-y += evsel.o
Jiri Olsa9352aab2014-12-29 17:42:46 +010012libperf-y += find_next_bit.o
Jiri Olsa9352aab2014-12-29 17:42:46 +010013libperf-y += kallsyms.o
14libperf-y += levenshtein.o
Wang Nanaa61fd02015-07-21 11:13:34 +000015libperf-y += llvm-utils.o
Jiri Olsa9352aab2014-12-29 17:42:46 +010016libperf-y += parse-events.o
Sukadev Bhattiprolueb56db52015-09-24 17:53:49 -040017libperf-y += perf_regs.o
Jiri Olsa9352aab2014-12-29 17:42:46 +010018libperf-y += path.o
19libperf-y += rbtree.o
Arnaldo Carvalho de Melo4ddd3272015-11-16 11:36:29 -030020libperf-y += libstring.o
Jiri Olsa9352aab2014-12-29 17:42:46 +010021libperf-y += bitmap.o
22libperf-y += hweight.o
Jiri Olsa9352aab2014-12-29 17:42:46 +010023libperf-y += quote.o
24libperf-y += strbuf.o
25libperf-y += string.o
26libperf-y += strlist.o
27libperf-y += strfilter.o
28libperf-y += top.o
29libperf-y += usage.o
30libperf-y += wrapper.o
Jiri Olsa9352aab2014-12-29 17:42:46 +010031libperf-y += dso.o
32libperf-y += symbol.o
33libperf-y += color.o
Jiri Olsa9352aab2014-12-29 17:42:46 +010034libperf-y += header.o
35libperf-y += callchain.o
36libperf-y += values.o
37libperf-y += debug.o
38libperf-y += machine.o
39libperf-y += map.o
40libperf-y += pstack.o
41libperf-y += session.o
42libperf-y += ordered-events.o
43libperf-y += comm.o
44libperf-y += thread.o
45libperf-y += thread_map.o
46libperf-y += trace-event-parse.o
47libperf-y += parse-events-flex.o
48libperf-y += parse-events-bison.o
49libperf-y += pmu.o
50libperf-y += pmu-flex.o
51libperf-y += pmu-bison.o
52libperf-y += trace-event-read.o
53libperf-y += trace-event-info.o
54libperf-y += trace-event-scripting.o
55libperf-y += trace-event.o
56libperf-y += svghelper.o
57libperf-y += sort.o
58libperf-y += hist.o
59libperf-y += util.o
60libperf-y += xyarray.o
61libperf-y += cpumap.o
62libperf-y += cgroup.o
63libperf-y += target.o
64libperf-y += rblist.o
65libperf-y += intlist.o
66libperf-y += vdso.o
Jiri Olsad8095602015-08-07 12:51:03 +020067libperf-y += counts.o
Jiri Olsa9352aab2014-12-29 17:42:46 +010068libperf-y += stat.o
Jiri Olsaf87027b2015-06-03 16:25:59 +020069libperf-y += stat-shadow.o
Jiri Olsa9352aab2014-12-29 17:42:46 +010070libperf-y += record.o
71libperf-y += srcline.o
72libperf-y += data.o
David Ahernecefde62015-02-19 13:22:33 -050073libperf-$(CONFIG_X86) += tsc.o
Adrian Hunter97db6202015-08-31 21:39:44 +030074libperf-$(CONFIG_AUXTRACE) += tsc.o
Jiri Olsa9352aab2014-12-29 17:42:46 +010075libperf-y += cloexec.o
76libperf-y += thread-stack.o
Adrian Huntere31f0d02015-04-30 17:37:27 +030077libperf-$(CONFIG_AUXTRACE) += auxtrace.o
Adrian Huntera4e92592015-07-17 19:33:37 +030078libperf-$(CONFIG_AUXTRACE) += intel-pt-decoder/
Adrian Hunter90e457f2015-07-17 19:33:41 +030079libperf-$(CONFIG_AUXTRACE) += intel-pt.o
Adrian Hunterd0170af2015-07-17 19:33:43 +030080libperf-$(CONFIG_AUXTRACE) += intel-bts.o
Andi Kleenf00898f2015-05-27 10:51:51 -070081libperf-y += parse-branch-options.o
Stephane Eranianbcc84ec2015-08-31 18:41:12 +020082libperf-y += parse-regs-options.o
Josh Poimboeuf1fe143c2015-12-07 22:21:42 -060083libperf-y += term.o
Josh Poimboeuf5feaac22015-12-13 22:18:09 -060084libperf-y += help-unknown-cmd.o
Jiri Olsa9352aab2014-12-29 17:42:46 +010085
Wang Nan84c86ca2015-10-14 12:41:14 +000086libperf-$(CONFIG_LIBBPF) += bpf-loader.o
He Kuangbfc077b2015-11-16 12:10:12 +000087libperf-$(CONFIG_BPF_PROLOGUE) += bpf-prologue.o
Jiri Olsa709e6792014-12-29 23:52:25 +010088libperf-$(CONFIG_LIBELF) += symbol-elf.o
Masami Hiramatsu92f6c722015-07-15 18:14:07 +090089libperf-$(CONFIG_LIBELF) += probe-file.o
Jiri Olsa709e6792014-12-29 23:52:25 +010090libperf-$(CONFIG_LIBELF) += probe-event.o
91
92ifndef CONFIG_LIBELF
93libperf-y += symbol-minimal.o
94endif
95
Jiri Olsa8379fce2014-12-30 00:06:25 +010096libperf-$(CONFIG_DWARF) += probe-finder.o
97libperf-$(CONFIG_DWARF) += dwarf-aux.o
98
Jiri Olsab2e45c32014-12-30 00:11:11 +010099libperf-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o
100libperf-$(CONFIG_LIBUNWIND) += unwind-libunwind.o
101
Jiri Olsaedbe9812015-02-20 23:17:00 +0100102libperf-$(CONFIG_LIBBABELTRACE) += data-convert-bt.o
103
Jiri Olsac7355f82014-12-30 13:11:32 +0100104libperf-y += scripting-engines/
105
Jiri Olsa1571b692014-12-30 13:31:12 +0100106libperf-$(CONFIG_ZLIB) += zlib.o
Jiri Olsa80a32e5b2015-01-29 13:29:39 +0100107libperf-$(CONFIG_LZMA) += lzma.o
Jiri Olsa3bc33742014-12-30 13:30:04 +0100108
Jiri Olsa9352aab2014-12-29 17:42:46 +0100109CFLAGS_config.o += -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
Jiri Olsa9352aab2014-12-29 17:42:46 +0100110
111$(OUTPUT)util/parse-events-flex.c: util/parse-events.l $(OUTPUT)util/parse-events-bison.c
Jiri Olsa19993072014-12-30 18:44:38 +0100112 $(call rule_mkdir)
Jiri Olsa70923bd2015-05-14 12:31:48 -0300113 $(Q)$(call echo-cmd,flex)$(FLEX) -o $@ --header-file=$(OUTPUT)util/parse-events-flex.h $(PARSER_DEBUG_FLEX) util/parse-events.l
Jiri Olsa9352aab2014-12-29 17:42:46 +0100114
115$(OUTPUT)util/parse-events-bison.c: util/parse-events.y
Jiri Olsa19993072014-12-30 18:44:38 +0100116 $(call rule_mkdir)
Jiri Olsa70923bd2015-05-14 12:31:48 -0300117 $(Q)$(call echo-cmd,bison)$(BISON) -v util/parse-events.y -d $(PARSER_DEBUG_BISON) -o $@ -p parse_events_
Jiri Olsa9352aab2014-12-29 17:42:46 +0100118
119$(OUTPUT)util/pmu-flex.c: util/pmu.l $(OUTPUT)util/pmu-bison.c
Jiri Olsa19993072014-12-30 18:44:38 +0100120 $(call rule_mkdir)
Jiri Olsa70923bd2015-05-14 12:31:48 -0300121 $(Q)$(call echo-cmd,flex)$(FLEX) -o $@ --header-file=$(OUTPUT)util/pmu-flex.h util/pmu.l
Jiri Olsa9352aab2014-12-29 17:42:46 +0100122
123$(OUTPUT)util/pmu-bison.c: util/pmu.y
Jiri Olsa19993072014-12-30 18:44:38 +0100124 $(call rule_mkdir)
Jiri Olsa70923bd2015-05-14 12:31:48 -0300125 $(Q)$(call echo-cmd,bison)$(BISON) -v util/pmu.y -d -o $@ -p perf_pmu_
Jiri Olsa9352aab2014-12-29 17:42:46 +0100126
127CFLAGS_parse-events-flex.o += -w
128CFLAGS_pmu-flex.o += -w
Namhyung Kim539f3aa2015-04-29 12:55:00 -0300129CFLAGS_parse-events-bison.o += -DYYENABLE_NLS=0 -w
Jiri Olsa9352aab2014-12-29 17:42:46 +0100130CFLAGS_pmu-bison.o += -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -w
131
132$(OUTPUT)util/parse-events.o: $(OUTPUT)util/parse-events-flex.c $(OUTPUT)util/parse-events-bison.c
133$(OUTPUT)util/pmu.o: $(OUTPUT)util/pmu-flex.c $(OUTPUT)util/pmu-bison.c
134
135CFLAGS_find_next_bit.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
136CFLAGS_rbtree.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
Arnaldo Carvalho de Melo4ddd3272015-11-16 11:36:29 -0300137CFLAGS_libstring.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
Jiri Olsa9352aab2014-12-29 17:42:46 +0100138CFLAGS_hweight.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
139CFLAGS_parse-events.o += -Wno-redundant-decls
140
141$(OUTPUT)util/kallsyms.o: ../lib/symbol/kallsyms.c FORCE
Jiri Olsa19993072014-12-30 18:44:38 +0100142 $(call rule_mkdir)
Jiri Olsa9352aab2014-12-29 17:42:46 +0100143 $(call if_changed_dep,cc_o_c)
144
145$(OUTPUT)util/find_next_bit.o: ../lib/util/find_next_bit.c FORCE
Jiri Olsa19993072014-12-30 18:44:38 +0100146 $(call rule_mkdir)
Jiri Olsa9352aab2014-12-29 17:42:46 +0100147 $(call if_changed_dep,cc_o_c)
148
Arnaldo Carvalho de Melo3f735372015-07-05 22:48:21 -0300149$(OUTPUT)util/rbtree.o: ../lib/rbtree.c FORCE
Jiri Olsa19993072014-12-30 18:44:38 +0100150 $(call rule_mkdir)
Jiri Olsa9352aab2014-12-29 17:42:46 +0100151 $(call if_changed_dep,cc_o_c)
152
Arnaldo Carvalho de Melo4ddd3272015-11-16 11:36:29 -0300153$(OUTPUT)util/libstring.o: ../lib/string.c FORCE
154 $(call rule_mkdir)
155 $(call if_changed_dep,cc_o_c)
156
Arnaldo Carvalho de Melo0aefc352015-07-09 16:27:25 -0300157$(OUTPUT)util/hweight.o: ../lib/hweight.c FORCE
Jiri Olsa19993072014-12-30 18:44:38 +0100158 $(call rule_mkdir)
Jiri Olsa9352aab2014-12-29 17:42:46 +0100159 $(call if_changed_dep,cc_o_c)