Build 4.4 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
libperf-y += abspath.o
libperf-y += alias.o
libperf-y += annotate.o
libperf-y += build-id.o
libperf-y += config.o
libperf-y += ctype.o
libperf-y += db-export.o
libperf-y += environment.o
libperf-y += event.o
libperf-y += evlist.o
libperf-y += evsel.o
libperf-y += exec_cmd.o
libperf-y += find_next_bit.o
libperf-y += help.o
libperf-y += kallsyms.o
libperf-y += levenshtein.o
libperf-y += parse-options.o
libperf-y += parse-events.o
libperf-y += path.o
libperf-y += rbtree.o
libperf-y += bitmap.o
libperf-y += hweight.o
libperf-y += run-command.o
libperf-y += quote.o
libperf-y += strbuf.o
libperf-y += string.o
libperf-y += strlist.o
libperf-y += strfilter.o
libperf-y += top.o
libperf-y += usage.o
libperf-y += wrapper.o
libperf-y += sigchain.o
libperf-y += dso.o
libperf-y += symbol.o
libperf-y += color.o
libperf-y += pager.o
libperf-y += header.o
libperf-y += callchain.o
libperf-y += values.o
libperf-y += debug.o
libperf-y += machine.o
libperf-y += map.o
libperf-y += pstack.o
libperf-y += session.o
libperf-y += ordered-events.o
libperf-y += comm.o
libperf-y += thread.o
libperf-y += thread_map.o
libperf-y += trace-event-parse.o
libperf-y += parse-events-flex.o
libperf-y += parse-events-bison.o
libperf-y += pmu.o
libperf-y += pmu-flex.o
libperf-y += pmu-bison.o
libperf-y += trace-event-read.o
libperf-y += trace-event-info.o
libperf-y += trace-event-scripting.o
libperf-y += trace-event.o
libperf-y += svghelper.o
libperf-y += sort.o
libperf-y += hist.o
libperf-y += util.o
libperf-y += xyarray.o
libperf-y += cpumap.o
libperf-y += cgroup.o
libperf-y += target.o
libperf-y += rblist.o
libperf-y += intlist.o
libperf-y += vdso.o
libperf-y += stat.o
71
libperf-y += stat-shadow.o
72 73 74
libperf-y += record.o
libperf-y += srcline.o
libperf-y += data.o
75
libperf-$(CONFIG_X86) += tsc.o
76 77
libperf-y += cloexec.o
libperf-y += thread-stack.o
78
libperf-$(CONFIG_AUXTRACE) += auxtrace.o
79
libperf-y += parse-branch-options.o
80

81 82 83 84 85 86 87
libperf-$(CONFIG_LIBELF) += symbol-elf.o
libperf-$(CONFIG_LIBELF) += probe-event.o

ifndef CONFIG_LIBELF
libperf-y += symbol-minimal.o
endif

88 89 90
libperf-$(CONFIG_DWARF) += probe-finder.o
libperf-$(CONFIG_DWARF) += dwarf-aux.o

91 92 93
libperf-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o
libperf-$(CONFIG_LIBUNWIND)          += unwind-libunwind.o

94 95
libperf-$(CONFIG_LIBBABELTRACE) += data-convert-bt.o

96 97
libperf-y += scripting-engines/

98
libperf-$(CONFIG_PERF_REGS) += perf_regs.o
99
libperf-$(CONFIG_ZLIB) += zlib.o
100
libperf-$(CONFIG_LZMA) += lzma.o
101

102 103 104 105
CFLAGS_config.o   += -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
CFLAGS_exec_cmd.o += -DPERF_EXEC_PATH="BUILD_STR($(perfexecdir_SQ))" -DPREFIX="BUILD_STR($(prefix_SQ))"

$(OUTPUT)util/parse-events-flex.c: util/parse-events.l $(OUTPUT)util/parse-events-bison.c
106
	$(call rule_mkdir)
107
	$(Q)$(call echo-cmd,flex)$(FLEX) -o $@ --header-file=$(OUTPUT)util/parse-events-flex.h $(PARSER_DEBUG_FLEX) util/parse-events.l
108 109

$(OUTPUT)util/parse-events-bison.c: util/parse-events.y
110
	$(call rule_mkdir)
111
	$(Q)$(call echo-cmd,bison)$(BISON) -v util/parse-events.y -d $(PARSER_DEBUG_BISON) -o $@ -p parse_events_
112 113

$(OUTPUT)util/pmu-flex.c: util/pmu.l $(OUTPUT)util/pmu-bison.c
114
	$(call rule_mkdir)
115
	$(Q)$(call echo-cmd,flex)$(FLEX) -o $@ --header-file=$(OUTPUT)util/pmu-flex.h util/pmu.l
116 117

$(OUTPUT)util/pmu-bison.c: util/pmu.y
118
	$(call rule_mkdir)
119
	$(Q)$(call echo-cmd,bison)$(BISON) -v util/pmu.y -d -o $@ -p perf_pmu_
120 121 122

CFLAGS_parse-events-flex.o  += -w
CFLAGS_pmu-flex.o           += -w
123
CFLAGS_parse-events-bison.o += -DYYENABLE_NLS=0 -w
124 125 126 127 128 129 130 131 132 133 134
CFLAGS_pmu-bison.o          += -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -w

$(OUTPUT)util/parse-events.o: $(OUTPUT)util/parse-events-flex.c $(OUTPUT)util/parse-events-bison.c
$(OUTPUT)util/pmu.o: $(OUTPUT)util/pmu-flex.c $(OUTPUT)util/pmu-bison.c

CFLAGS_find_next_bit.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
CFLAGS_rbtree.o        += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
CFLAGS_hweight.o       += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
CFLAGS_parse-events.o  += -Wno-redundant-decls

$(OUTPUT)util/kallsyms.o: ../lib/symbol/kallsyms.c FORCE
135
	$(call rule_mkdir)
136 137 138
	$(call if_changed_dep,cc_o_c)

$(OUTPUT)util/find_next_bit.o: ../lib/util/find_next_bit.c FORCE
139
	$(call rule_mkdir)
140 141
	$(call if_changed_dep,cc_o_c)

142
$(OUTPUT)util/rbtree.o: ../lib/rbtree.c FORCE
143
	$(call rule_mkdir)
144 145 146
	$(call if_changed_dep,cc_o_c)

$(OUTPUT)util/hweight.o: ../../lib/hweight.c FORCE
147
	$(call rule_mkdir)
148
	$(call if_changed_dep,cc_o_c)