xref: /linux/tools/perf/Build (revision 8bc7c5e525584903ea83332e18a2118ed3b1985e)
1perf-bench-y += builtin-bench.o
2perf-y += builtin-annotate.o
3perf-y += builtin-config.o
4perf-y += builtin-diff.o
5perf-y += builtin-evlist.o
6perf-y += builtin-ftrace.o
7perf-y += builtin-help.o
8perf-y += builtin-buildid-list.o
9perf-y += builtin-buildid-cache.o
10perf-y += builtin-kallsyms.o
11perf-y += builtin-list.o
12perf-y += builtin-record.o
13perf-y += builtin-report.o
14perf-y += builtin-stat.o
15perf-y += builtin-top.o
16perf-y += builtin-script.o
17perf-y += builtin-kvm.o
18perf-y += builtin-inject.o
19perf-y += builtin-mem.o
20perf-y += builtin-data.o
21perf-y += builtin-version.o
22perf-y += builtin-c2c.o
23perf-y += builtin-daemon.o
24
25perf-$(CONFIG_LIBTRACEEVENT) += builtin-kmem.o
26perf-$(CONFIG_LIBTRACEEVENT) += builtin-kwork.o
27perf-$(CONFIG_LIBTRACEEVENT) += builtin-lock.o
28perf-$(CONFIG_LIBTRACEEVENT) += builtin-sched.o
29perf-$(CONFIG_LIBTRACEEVENT) += builtin-timechart.o
30
31ifeq ($(CONFIG_LIBTRACEEVENT),y)
32  perf-$(CONFIG_TRACE) += builtin-trace.o
33  perf-$(CONFIG_TRACE) += trace/beauty/
34endif
35
36perf-$(CONFIG_LIBELF) += builtin-probe.o
37
38perf-bench-y += bench/
39perf-test-y += tests/
40
41perf-y += perf.o
42
43paths += -DPERF_HTML_PATH="BUILD_STR($(htmldir_SQ))"
44paths += -DPERF_INFO_PATH="BUILD_STR($(infodir_SQ))"
45paths += -DPERF_MAN_PATH="BUILD_STR($(mandir_SQ))"
46
47CFLAGS_builtin-help.o      += $(paths)
48CFLAGS_builtin-timechart.o += $(paths)
49CFLAGS_perf.o              += -DPERF_HTML_PATH="BUILD_STR($(htmldir_SQ))"	\
50			      -DPERF_EXEC_PATH="BUILD_STR($(perfexecdir_SQ))"	\
51			      -DPREFIX="BUILD_STR($(prefix_SQ))"
52CFLAGS_builtin-trace.o	   += -DSTRACE_GROUPS_DIR="BUILD_STR($(STRACE_GROUPS_DIR_SQ))"
53CFLAGS_builtin-report.o	   += -DTIPDIR="BUILD_STR($(tipdir_SQ))"
54CFLAGS_builtin-report.o	   += -DDOCDIR="BUILD_STR($(srcdir_SQ)/Documentation)"
55
56perf-util-y += util/
57perf-util-y += arch/
58perf-y += arch/
59perf-test-y += arch/
60perf-ui-y += ui/
61perf-util-y += scripts/
62
63gtk-y += ui/gtk/
64
65ifdef SHELLCHECK
66  SHELL_TESTS := $(wildcard *.sh)
67  TEST_LOGS := $(SHELL_TESTS:%=%.shellcheck_log)
68else
69  SHELL_TESTS :=
70  TEST_LOGS :=
71endif
72
73$(OUTPUT)%.shellcheck_log: %
74	$(call rule_mkdir)
75	$(Q)$(call echo-cmd,test)shellcheck -s bash -a -S warning "$<" > $@ || (cat $@ && rm $@ && false)
76
77perf-y += $(TEST_LOGS)
78