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