blob: 601d11440596dfd2b1d5244f56e972487d3fecff [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
8libperf-y += environment.o
9libperf-y += event.o
10libperf-y += evlist.o
11libperf-y += evsel.o
12libperf-y += exec_cmd.o
13libperf-y += find_next_bit.o
14libperf-y += help.o
15libperf-y += kallsyms.o
16libperf-y += levenshtein.o
17libperf-y += parse-options.o
18libperf-y += parse-events.o
19libperf-y += path.o
20libperf-y += rbtree.o
21libperf-y += bitmap.o
22libperf-y += hweight.o
23libperf-y += run-command.o
24libperf-y += quote.o
25libperf-y += strbuf.o
26libperf-y += string.o
27libperf-y += strlist.o
28libperf-y += strfilter.o
29libperf-y += top.o
30libperf-y += usage.o
31libperf-y += wrapper.o
32libperf-y += sigchain.o
33libperf-y += dso.o
34libperf-y += symbol.o
35libperf-y += color.o
36libperf-y += pager.o
37libperf-y += header.o
38libperf-y += callchain.o
39libperf-y += values.o
40libperf-y += debug.o
41libperf-y += machine.o
42libperf-y += map.o
43libperf-y += pstack.o
44libperf-y += session.o
45libperf-y += ordered-events.o
46libperf-y += comm.o
47libperf-y += thread.o
48libperf-y += thread_map.o
49libperf-y += trace-event-parse.o
50libperf-y += parse-events-flex.o
51libperf-y += parse-events-bison.o
52libperf-y += pmu.o
53libperf-y += pmu-flex.o
54libperf-y += pmu-bison.o
55libperf-y += trace-event-read.o
56libperf-y += trace-event-info.o
57libperf-y += trace-event-scripting.o
58libperf-y += trace-event.o
59libperf-y += svghelper.o
60libperf-y += sort.o
61libperf-y += hist.o
62libperf-y += util.o
63libperf-y += xyarray.o
64libperf-y += cpumap.o
65libperf-y += cgroup.o
66libperf-y += target.o
67libperf-y += rblist.o
68libperf-y += intlist.o
69libperf-y += vdso.o
70libperf-y += stat.o
Jiri Olsaf87027b2015-06-03 16:25:59 +020071libperf-y += stat-shadow.o
Jiri Olsa9352aab2014-12-29 17:42:46 +010072libperf-y += record.o
73libperf-y += srcline.o
74libperf-y += data.o
David Ahernecefde62015-02-19 13:22:33 -050075libperf-$(CONFIG_X86) += tsc.o
Jiri Olsa9352aab2014-12-29 17:42:46 +010076libperf-y += cloexec.o
77libperf-y += thread-stack.o
Adrian Huntere31f0d02015-04-30 17:37:27 +030078libperf-$(CONFIG_AUXTRACE) += auxtrace.o
Andi Kleenf00898f2015-05-27 10:51:51 -070079libperf-y += parse-branch-options.o
Jiri Olsa9352aab2014-12-29 17:42:46 +010080
Jiri Olsa709e6792014-12-29 23:52:25 +010081libperf-$(CONFIG_LIBELF) += symbol-elf.o
82libperf-$(CONFIG_LIBELF) += probe-event.o
83
84ifndef CONFIG_LIBELF
85libperf-y += symbol-minimal.o
86endif
87
Jiri Olsa8379fce2014-12-30 00:06:25 +010088libperf-$(CONFIG_DWARF) += probe-finder.o
89libperf-$(CONFIG_DWARF) += dwarf-aux.o
90
Jiri Olsab2e45c32014-12-30 00:11:11 +010091libperf-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o
92libperf-$(CONFIG_LIBUNWIND) += unwind-libunwind.o
93
Jiri Olsaedbe9812015-02-20 23:17:00 +010094libperf-$(CONFIG_LIBBABELTRACE) += data-convert-bt.o
95
Jiri Olsac7355f82014-12-30 13:11:32 +010096libperf-y += scripting-engines/
97
Jiri Olsa3bc33742014-12-30 13:30:04 +010098libperf-$(CONFIG_PERF_REGS) += perf_regs.o
Jiri Olsa1571b692014-12-30 13:31:12 +010099libperf-$(CONFIG_ZLIB) += zlib.o
Jiri Olsa80a32e5b2015-01-29 13:29:39 +0100100libperf-$(CONFIG_LZMA) += lzma.o
Jiri Olsa3bc33742014-12-30 13:30:04 +0100101
Jiri Olsa9352aab2014-12-29 17:42:46 +0100102CFLAGS_config.o += -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
103CFLAGS_exec_cmd.o += -DPERF_EXEC_PATH="BUILD_STR($(perfexecdir_SQ))" -DPREFIX="BUILD_STR($(prefix_SQ))"
104
105$(OUTPUT)util/parse-events-flex.c: util/parse-events.l $(OUTPUT)util/parse-events-bison.c
Jiri Olsa19993072014-12-30 18:44:38 +0100106 $(call rule_mkdir)
Jiri Olsa70923bd2015-05-14 12:31:48 -0300107 $(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 +0100108
109$(OUTPUT)util/parse-events-bison.c: util/parse-events.y
Jiri Olsa19993072014-12-30 18:44:38 +0100110 $(call rule_mkdir)
Jiri Olsa70923bd2015-05-14 12:31:48 -0300111 $(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 +0100112
113$(OUTPUT)util/pmu-flex.c: util/pmu.l $(OUTPUT)util/pmu-bison.c
Jiri Olsa19993072014-12-30 18:44:38 +0100114 $(call rule_mkdir)
Jiri Olsa70923bd2015-05-14 12:31:48 -0300115 $(Q)$(call echo-cmd,flex)$(FLEX) -o $@ --header-file=$(OUTPUT)util/pmu-flex.h util/pmu.l
Jiri Olsa9352aab2014-12-29 17:42:46 +0100116
117$(OUTPUT)util/pmu-bison.c: util/pmu.y
Jiri Olsa19993072014-12-30 18:44:38 +0100118 $(call rule_mkdir)
Jiri Olsa70923bd2015-05-14 12:31:48 -0300119 $(Q)$(call echo-cmd,bison)$(BISON) -v util/pmu.y -d -o $@ -p perf_pmu_
Jiri Olsa9352aab2014-12-29 17:42:46 +0100120
121CFLAGS_parse-events-flex.o += -w
122CFLAGS_pmu-flex.o += -w
Namhyung Kim539f3aa2015-04-29 12:55:00 -0300123CFLAGS_parse-events-bison.o += -DYYENABLE_NLS=0 -w
Jiri Olsa9352aab2014-12-29 17:42:46 +0100124CFLAGS_pmu-bison.o += -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -w
125
126$(OUTPUT)util/parse-events.o: $(OUTPUT)util/parse-events-flex.c $(OUTPUT)util/parse-events-bison.c
127$(OUTPUT)util/pmu.o: $(OUTPUT)util/pmu-flex.c $(OUTPUT)util/pmu-bison.c
128
129CFLAGS_find_next_bit.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
130CFLAGS_rbtree.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
131CFLAGS_hweight.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
132CFLAGS_parse-events.o += -Wno-redundant-decls
133
134$(OUTPUT)util/kallsyms.o: ../lib/symbol/kallsyms.c FORCE
Jiri Olsa19993072014-12-30 18:44:38 +0100135 $(call rule_mkdir)
Jiri Olsa9352aab2014-12-29 17:42:46 +0100136 $(call if_changed_dep,cc_o_c)
137
138$(OUTPUT)util/find_next_bit.o: ../lib/util/find_next_bit.c FORCE
Jiri Olsa19993072014-12-30 18:44:38 +0100139 $(call rule_mkdir)
Jiri Olsa9352aab2014-12-29 17:42:46 +0100140 $(call if_changed_dep,cc_o_c)
141
Arnaldo Carvalho de Melo3f735372015-07-05 22:48:21 -0300142$(OUTPUT)util/rbtree.o: ../lib/rbtree.c FORCE
Jiri Olsa19993072014-12-30 18:44:38 +0100143 $(call rule_mkdir)
Jiri Olsa9352aab2014-12-29 17:42:46 +0100144 $(call if_changed_dep,cc_o_c)
145
146$(OUTPUT)util/hweight.o: ../../lib/hweight.c FORCE
Jiri Olsa19993072014-12-30 18:44:38 +0100147 $(call rule_mkdir)
Jiri Olsa9352aab2014-12-29 17:42:46 +0100148 $(call if_changed_dep,cc_o_c)