xref: /openbmc/linux/tools/perf/util/Build (revision 94cdda6b)
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 += 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
71libperf-y += record.o
72libperf-y += srcline.o
73libperf-y += data.o
74libperf-$(CONFIG_X86) += tsc.o
75libperf-y += cloexec.o
76libperf-y += thread-stack.o
77libperf-$(CONFIG_AUXTRACE) += auxtrace.o
78
79libperf-$(CONFIG_LIBELF) += symbol-elf.o
80libperf-$(CONFIG_LIBELF) += probe-event.o
81
82ifndef CONFIG_LIBELF
83libperf-y += symbol-minimal.o
84endif
85
86libperf-$(CONFIG_DWARF) += probe-finder.o
87libperf-$(CONFIG_DWARF) += dwarf-aux.o
88
89libperf-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o
90libperf-$(CONFIG_LIBUNWIND)          += unwind-libunwind.o
91
92libperf-$(CONFIG_LIBBABELTRACE) += data-convert-bt.o
93
94libperf-y += scripting-engines/
95
96libperf-$(CONFIG_PERF_REGS) += perf_regs.o
97libperf-$(CONFIG_ZLIB) += zlib.o
98libperf-$(CONFIG_LZMA) += lzma.o
99
100CFLAGS_config.o   += -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
101CFLAGS_exec_cmd.o += -DPERF_EXEC_PATH="BUILD_STR($(perfexecdir_SQ))" -DPREFIX="BUILD_STR($(prefix_SQ))"
102
103$(OUTPUT)util/parse-events-flex.c: util/parse-events.l $(OUTPUT)util/parse-events-bison.c
104	$(call rule_mkdir)
105	@$(call echo-cmd,flex)$(FLEX) -o $@ --header-file=$(OUTPUT)util/parse-events-flex.h $(PARSER_DEBUG_FLEX) util/parse-events.l
106
107$(OUTPUT)util/parse-events-bison.c: util/parse-events.y
108	$(call rule_mkdir)
109	@$(call echo-cmd,bison)$(BISON) -v util/parse-events.y -d $(PARSER_DEBUG_BISON) -o $@ -p parse_events_
110
111$(OUTPUT)util/pmu-flex.c: util/pmu.l $(OUTPUT)util/pmu-bison.c
112	$(call rule_mkdir)
113	@$(call echo-cmd,flex)$(FLEX) -o $@ --header-file=$(OUTPUT)util/pmu-flex.h util/pmu.l
114
115$(OUTPUT)util/pmu-bison.c: util/pmu.y
116	$(call rule_mkdir)
117	@$(call echo-cmd,bison)$(BISON) -v util/pmu.y -d -o $@ -p perf_pmu_
118
119CFLAGS_parse-events-flex.o  += -w
120CFLAGS_pmu-flex.o           += -w
121CFLAGS_parse-events-bison.o += -DYYENABLE_NLS=0 -w
122CFLAGS_pmu-bison.o          += -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -w
123
124$(OUTPUT)util/parse-events.o: $(OUTPUT)util/parse-events-flex.c $(OUTPUT)util/parse-events-bison.c
125$(OUTPUT)util/pmu.o: $(OUTPUT)util/pmu-flex.c $(OUTPUT)util/pmu-bison.c
126
127CFLAGS_find_next_bit.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
128CFLAGS_rbtree.o        += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
129CFLAGS_hweight.o       += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
130CFLAGS_parse-events.o  += -Wno-redundant-decls
131
132$(OUTPUT)util/kallsyms.o: ../lib/symbol/kallsyms.c FORCE
133	$(call rule_mkdir)
134	$(call if_changed_dep,cc_o_c)
135
136$(OUTPUT)util/find_next_bit.o: ../lib/util/find_next_bit.c FORCE
137	$(call rule_mkdir)
138	$(call if_changed_dep,cc_o_c)
139
140$(OUTPUT)util/rbtree.o: ../../lib/rbtree.c FORCE
141	$(call rule_mkdir)
142	$(call if_changed_dep,cc_o_c)
143
144$(OUTPUT)util/hweight.o: ../../lib/hweight.c FORCE
145	$(call rule_mkdir)
146	$(call if_changed_dep,cc_o_c)
147