xref: /linux/tools/perf/util/Build (revision ca55b2fef3a9373fcfc30f82fd26bc7fccbda732)
1libperf-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 += llvm-utils.o
18libperf-y += parse-options.o
19libperf-y += parse-events.o
20libperf-y += perf_regs.o
21libperf-y += path.o
22libperf-y += rbtree.o
23libperf-y += bitmap.o
24libperf-y += hweight.o
25libperf-y += run-command.o
26libperf-y += quote.o
27libperf-y += strbuf.o
28libperf-y += string.o
29libperf-y += strlist.o
30libperf-y += strfilter.o
31libperf-y += top.o
32libperf-y += usage.o
33libperf-y += wrapper.o
34libperf-y += sigchain.o
35libperf-y += dso.o
36libperf-y += symbol.o
37libperf-y += color.o
38libperf-y += pager.o
39libperf-y += header.o
40libperf-y += callchain.o
41libperf-y += values.o
42libperf-y += debug.o
43libperf-y += machine.o
44libperf-y += map.o
45libperf-y += pstack.o
46libperf-y += session.o
47libperf-y += ordered-events.o
48libperf-y += comm.o
49libperf-y += thread.o
50libperf-y += thread_map.o
51libperf-y += trace-event-parse.o
52libperf-y += parse-events-flex.o
53libperf-y += parse-events-bison.o
54libperf-y += pmu.o
55libperf-y += pmu-flex.o
56libperf-y += pmu-bison.o
57libperf-y += trace-event-read.o
58libperf-y += trace-event-info.o
59libperf-y += trace-event-scripting.o
60libperf-y += trace-event.o
61libperf-y += svghelper.o
62libperf-y += sort.o
63libperf-y += hist.o
64libperf-y += util.o
65libperf-y += xyarray.o
66libperf-y += cpumap.o
67libperf-y += cgroup.o
68libperf-y += target.o
69libperf-y += rblist.o
70libperf-y += intlist.o
71libperf-y += vdso.o
72libperf-y += counts.o
73libperf-y += stat.o
74libperf-y += stat-shadow.o
75libperf-y += record.o
76libperf-y += srcline.o
77libperf-y += data.o
78libperf-$(CONFIG_X86) += tsc.o
79libperf-$(CONFIG_AUXTRACE) += tsc.o
80libperf-y += cloexec.o
81libperf-y += thread-stack.o
82libperf-$(CONFIG_AUXTRACE) += auxtrace.o
83libperf-$(CONFIG_AUXTRACE) += intel-pt-decoder/
84libperf-$(CONFIG_AUXTRACE) += intel-pt.o
85libperf-$(CONFIG_AUXTRACE) += intel-bts.o
86libperf-y += parse-branch-options.o
87libperf-y += parse-regs-options.o
88
89libperf-$(CONFIG_LIBELF) += symbol-elf.o
90libperf-$(CONFIG_LIBELF) += probe-file.o
91libperf-$(CONFIG_LIBELF) += probe-event.o
92
93ifndef CONFIG_LIBELF
94libperf-y += symbol-minimal.o
95endif
96
97libperf-$(CONFIG_DWARF) += probe-finder.o
98libperf-$(CONFIG_DWARF) += dwarf-aux.o
99
100libperf-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o
101libperf-$(CONFIG_LIBUNWIND)          += unwind-libunwind.o
102
103libperf-$(CONFIG_LIBBABELTRACE) += data-convert-bt.o
104
105libperf-y += scripting-engines/
106
107libperf-$(CONFIG_ZLIB) += zlib.o
108libperf-$(CONFIG_LZMA) += lzma.o
109
110CFLAGS_config.o   += -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
111CFLAGS_exec_cmd.o += -DPERF_EXEC_PATH="BUILD_STR($(perfexecdir_SQ))" -DPREFIX="BUILD_STR($(prefix_SQ))"
112
113$(OUTPUT)util/parse-events-flex.c: util/parse-events.l $(OUTPUT)util/parse-events-bison.c
114	$(call rule_mkdir)
115	$(Q)$(call echo-cmd,flex)$(FLEX) -o $@ --header-file=$(OUTPUT)util/parse-events-flex.h $(PARSER_DEBUG_FLEX) util/parse-events.l
116
117$(OUTPUT)util/parse-events-bison.c: util/parse-events.y
118	$(call rule_mkdir)
119	$(Q)$(call echo-cmd,bison)$(BISON) -v util/parse-events.y -d $(PARSER_DEBUG_BISON) -o $@ -p parse_events_
120
121$(OUTPUT)util/pmu-flex.c: util/pmu.l $(OUTPUT)util/pmu-bison.c
122	$(call rule_mkdir)
123	$(Q)$(call echo-cmd,flex)$(FLEX) -o $@ --header-file=$(OUTPUT)util/pmu-flex.h util/pmu.l
124
125$(OUTPUT)util/pmu-bison.c: util/pmu.y
126	$(call rule_mkdir)
127	$(Q)$(call echo-cmd,bison)$(BISON) -v util/pmu.y -d -o $@ -p perf_pmu_
128
129CFLAGS_parse-events-flex.o  += -w
130CFLAGS_pmu-flex.o           += -w
131CFLAGS_parse-events-bison.o += -DYYENABLE_NLS=0 -w
132CFLAGS_pmu-bison.o          += -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -w
133
134$(OUTPUT)util/parse-events.o: $(OUTPUT)util/parse-events-flex.c $(OUTPUT)util/parse-events-bison.c
135$(OUTPUT)util/pmu.o: $(OUTPUT)util/pmu-flex.c $(OUTPUT)util/pmu-bison.c
136
137CFLAGS_find_next_bit.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
138CFLAGS_rbtree.o        += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
139CFLAGS_hweight.o       += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
140CFLAGS_parse-events.o  += -Wno-redundant-decls
141
142$(OUTPUT)util/kallsyms.o: ../lib/symbol/kallsyms.c FORCE
143	$(call rule_mkdir)
144	$(call if_changed_dep,cc_o_c)
145
146$(OUTPUT)util/find_next_bit.o: ../lib/util/find_next_bit.c FORCE
147	$(call rule_mkdir)
148	$(call if_changed_dep,cc_o_c)
149
150$(OUTPUT)util/rbtree.o: ../lib/rbtree.c FORCE
151	$(call rule_mkdir)
152	$(call if_changed_dep,cc_o_c)
153
154$(OUTPUT)util/hweight.o: ../lib/hweight.c FORCE
155	$(call rule_mkdir)
156	$(call if_changed_dep,cc_o_c)
157