xref: /openbmc/linux/tools/perf/util/Build (revision a06c488d)
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 += event.o
10libperf-y += evlist.o
11libperf-y += evsel.o
12libperf-y += find_bit.o
13libperf-y += kallsyms.o
14libperf-y += levenshtein.o
15libperf-y += llvm-utils.o
16libperf-y += parse-events.o
17libperf-y += perf_regs.o
18libperf-y += path.o
19libperf-y += rbtree.o
20libperf-y += libstring.o
21libperf-y += bitmap.o
22libperf-y += hweight.o
23libperf-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
31libperf-y += dso.o
32libperf-y += symbol.o
33libperf-y += color.o
34libperf-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
67libperf-y += counts.o
68libperf-y += stat.o
69libperf-y += stat-shadow.o
70libperf-y += record.o
71libperf-y += srcline.o
72libperf-y += data.o
73libperf-$(CONFIG_X86) += tsc.o
74libperf-$(CONFIG_AUXTRACE) += tsc.o
75libperf-y += cloexec.o
76libperf-y += thread-stack.o
77libperf-$(CONFIG_AUXTRACE) += auxtrace.o
78libperf-$(CONFIG_AUXTRACE) += intel-pt-decoder/
79libperf-$(CONFIG_AUXTRACE) += intel-pt.o
80libperf-$(CONFIG_AUXTRACE) += intel-bts.o
81libperf-y += parse-branch-options.o
82libperf-y += parse-regs-options.o
83libperf-y += term.o
84libperf-y += help-unknown-cmd.o
85
86libperf-$(CONFIG_LIBBPF) += bpf-loader.o
87libperf-$(CONFIG_BPF_PROLOGUE) += bpf-prologue.o
88libperf-$(CONFIG_LIBELF) += symbol-elf.o
89libperf-$(CONFIG_LIBELF) += probe-file.o
90libperf-$(CONFIG_LIBELF) += probe-event.o
91
92ifndef CONFIG_LIBELF
93libperf-y += symbol-minimal.o
94endif
95
96libperf-$(CONFIG_DWARF) += probe-finder.o
97libperf-$(CONFIG_DWARF) += dwarf-aux.o
98
99libperf-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o
100libperf-$(CONFIG_LIBUNWIND)          += unwind-libunwind.o
101
102libperf-$(CONFIG_LIBBABELTRACE) += data-convert-bt.o
103
104libperf-y += scripting-engines/
105
106libperf-$(CONFIG_ZLIB) += zlib.o
107libperf-$(CONFIG_LZMA) += lzma.o
108
109CFLAGS_config.o   += -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
110
111$(OUTPUT)util/parse-events-flex.c: util/parse-events.l $(OUTPUT)util/parse-events-bison.c
112	$(call rule_mkdir)
113	$(Q)$(call echo-cmd,flex)$(FLEX) -o $@ --header-file=$(OUTPUT)util/parse-events-flex.h $(PARSER_DEBUG_FLEX) util/parse-events.l
114
115$(OUTPUT)util/parse-events-bison.c: util/parse-events.y
116	$(call rule_mkdir)
117	$(Q)$(call echo-cmd,bison)$(BISON) -v util/parse-events.y -d $(PARSER_DEBUG_BISON) -o $@ -p parse_events_
118
119$(OUTPUT)util/pmu-flex.c: util/pmu.l $(OUTPUT)util/pmu-bison.c
120	$(call rule_mkdir)
121	$(Q)$(call echo-cmd,flex)$(FLEX) -o $@ --header-file=$(OUTPUT)util/pmu-flex.h util/pmu.l
122
123$(OUTPUT)util/pmu-bison.c: util/pmu.y
124	$(call rule_mkdir)
125	$(Q)$(call echo-cmd,bison)$(BISON) -v util/pmu.y -d -o $@ -p perf_pmu_
126
127CFLAGS_parse-events-flex.o  += -w
128CFLAGS_pmu-flex.o           += -w
129CFLAGS_parse-events-bison.o += -DYYENABLE_NLS=0 -w
130CFLAGS_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_bitmap.o        += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
136CFLAGS_find_bit.o      += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
137CFLAGS_rbtree.o        += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
138CFLAGS_libstring.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/bitmap.o: ../lib/bitmap.c FORCE
147	$(call rule_mkdir)
148	$(call if_changed_dep,cc_o_c)
149
150$(OUTPUT)util/find_bit.o: ../lib/find_bit.c FORCE
151	$(call rule_mkdir)
152	$(call if_changed_dep,cc_o_c)
153
154$(OUTPUT)util/rbtree.o: ../lib/rbtree.c FORCE
155	$(call rule_mkdir)
156	$(call if_changed_dep,cc_o_c)
157
158$(OUTPUT)util/libstring.o: ../lib/string.c FORCE
159	$(call rule_mkdir)
160	$(call if_changed_dep,cc_o_c)
161
162$(OUTPUT)util/hweight.o: ../lib/hweight.c FORCE
163	$(call rule_mkdir)
164	$(call if_changed_dep,cc_o_c)
165