]>
Commit | Line | Data |
---|---|---|
16671c1e JO |
1 | # Some of the tools (perf) use same make variables |
2 | # as in kernel build. | |
3 | export srctree= | |
4 | export objtree= | |
5 | ||
2363ecb1 BP |
6 | include scripts/Makefile.include |
7 | ||
d5dd8afb BP |
8 | help: |
9 | @echo 'Possible targets:' | |
10 | @echo '' | |
20a7add8 JP |
11 | @echo ' acpi - ACPI tools' |
12 | @echo ' cgroup - cgroup tools' | |
13 | @echo ' cpupower - a tool for all things x86 CPU power' | |
14 | @echo ' firewire - the userspace part of nosy, an IEEE-1394 traffic sniffer' | |
15 | @echo ' freefall - laptop accelerometer program for disk protection' | |
16 | @echo ' hv - tools used when in Hyper-V clients' | |
17 | @echo ' iio - IIO tools' | |
18 | @echo ' lguest - a minimal 32-bit x86 hypervisor' | |
19 | @echo ' net - misc networking tools' | |
20 | @echo ' perf - Linux performance measurement and analysis tool' | |
21 | @echo ' selftests - various kernel selftests' | |
747a9b0a | 22 | @echo ' spi - spi tools' |
442f04c3 | 23 | @echo ' objtool - an ELF object analysis tool' |
20a7add8 JP |
24 | @echo ' tmon - thermal monitoring and tuning tool' |
25 | @echo ' turbostat - Intel CPU idle stats and freq reporting tool' | |
26 | @echo ' usb - USB testing tools' | |
27 | @echo ' virtio - vhost test module' | |
28 | @echo ' vm - misc vm tools' | |
d5dd8afb BP |
29 | @echo ' x86_energy_perf_policy - Intel energy policy tool' |
30 | @echo '' | |
ea01fa9f | 31 | @echo 'You can do:' |
7e010562 | 32 | @echo ' $$ make -C tools/ <tool>_install' |
ea01fa9f BP |
33 | @echo '' |
34 | @echo ' from the kernel command line to build and install one of' | |
35 | @echo ' the tools above' | |
36 | @echo '' | |
f6ba98c5 KM |
37 | @echo ' $$ make tools/all' |
38 | @echo '' | |
39 | @echo ' builds all tools.' | |
40 | @echo '' | |
ea01fa9f BP |
41 | @echo ' $$ make tools/install' |
42 | @echo '' | |
43 | @echo ' installs all tools.' | |
44 | @echo '' | |
d5dd8afb BP |
45 | @echo 'Cleaning targets:' |
46 | @echo '' | |
47 | @echo ' all of the above with the "_clean" string appended cleans' | |
48 | @echo ' the respective build directory.' | |
49 | @echo ' clean: a summary clean target to clean _all_ folders' | |
50 | ||
a0c4acc0 LZ |
51 | acpi: FORCE |
52 | $(call descend,power/$@) | |
53 | ||
2363ecb1 | 54 | cpupower: FORCE |
ca9dfc6c | 55 | $(call descend,power/$@) |
2363ecb1 | 56 | |
442f04c3 | 57 | cgroup firewire hv guest spi usb virtio vm net iio objtool: FORCE |
85c66be1 BP |
58 | $(call descend,$@) |
59 | ||
0041898e LC |
60 | liblockdep: FORCE |
61 | $(call descend,lib/lockdep) | |
62 | ||
379a9a28 | 63 | libapi: FORCE |
553873e1 | 64 | $(call descend,lib/api) |
85c66be1 | 65 | |
16671c1e JO |
66 | # The perf build does not follow the descend function setup, |
67 | # invoking it via it's own make rule. | |
68 | PERF_O = $(if $(O),$(O)/tools/perf,) | |
69 | ||
379a9a28 | 70 | perf: FORCE |
16671c1e JO |
71 | $(Q)mkdir -p $(PERF_O) . |
72 | $(Q)$(MAKE) --no-print-directory -C perf O=$(PERF_O) subdir= | |
2363ecb1 BP |
73 | |
74 | selftests: FORCE | |
ca9dfc6c | 75 | $(call descend,testing/$@) |
2363ecb1 BP |
76 | |
77 | turbostat x86_energy_perf_policy: FORCE | |
ca9dfc6c | 78 | $(call descend,power/x86/$@) |
2363ecb1 | 79 | |
94f69966 JP |
80 | tmon: FORCE |
81 | $(call descend,thermal/$@) | |
82 | ||
b3fd7368 PR |
83 | freefall: FORCE |
84 | $(call descend,laptop/$@) | |
85 | ||
f6ba98c5 KM |
86 | all: acpi cgroup cpupower hv firewire lguest \ |
87 | perf selftests turbostat usb \ | |
88 | virtio vm net x86_energy_perf_policy \ | |
442f04c3 | 89 | tmon freefall objtool |
f6ba98c5 | 90 | |
a0c4acc0 LZ |
91 | acpi_install: |
92 | $(call descend,power/$(@:_install=),install) | |
93 | ||
2363ecb1 | 94 | cpupower_install: |
ca9dfc6c | 95 | $(call descend,power/$(@:_install=),install) |
2363ecb1 | 96 | |
442f04c3 | 97 | cgroup_install firewire_install hv_install lguest_install perf_install usb_install virtio_install vm_install net_install objtool_install: |
ca9dfc6c | 98 | $(call descend,$(@:_install=),install) |
2363ecb1 BP |
99 | |
100 | selftests_install: | |
9a13c658 | 101 | $(call descend,testing/$(@:_install=),install) |
2363ecb1 BP |
102 | |
103 | turbostat_install x86_energy_perf_policy_install: | |
ca9dfc6c | 104 | $(call descend,power/x86/$(@:_install=),install) |
2363ecb1 | 105 | |
94f69966 JP |
106 | tmon_install: |
107 | $(call descend,thermal/$(@:_install=),install) | |
108 | ||
b3fd7368 PR |
109 | freefall_install: |
110 | $(call descend,laptop/$(@:_install=),install) | |
111 | ||
3eb2094c | 112 | install: acpi_install cgroup_install cpupower_install hv_install firewire_install lguest_install \ |
92e015b1 | 113 | perf_install selftests_install turbostat_install usb_install \ |
94f69966 | 114 | virtio_install vm_install net_install x86_energy_perf_policy_install \ |
442f04c3 | 115 | tmon_install freefall_install objtool_install |
2363ecb1 | 116 | |
a0c4acc0 LZ |
117 | acpi_clean: |
118 | $(call descend,power/acpi,clean) | |
119 | ||
2363ecb1 | 120 | cpupower_clean: |
ca9dfc6c | 121 | $(call descend,power/cpupower,clean) |
2363ecb1 | 122 | |
442f04c3 | 123 | cgroup_clean hv_clean firewire_clean lguest_clean spi_clean usb_clean virtio_clean vm_clean net_clean iio_clean objtool_clean: |
85c66be1 BP |
124 | $(call descend,$(@:_clean=),clean) |
125 | ||
0041898e LC |
126 | liblockdep_clean: |
127 | $(call descend,lib/lockdep,clean) | |
128 | ||
379a9a28 | 129 | libapi_clean: |
553873e1 | 130 | $(call descend,lib/api,clean) |
85c66be1 | 131 | |
2f5a7f1d JO |
132 | libbpf_clean: |
133 | $(call descend,lib/bpf,clean) | |
134 | ||
135 | libsubcmd_clean: | |
136 | $(call descend,lib/subcmd,clean) | |
137 | ||
379a9a28 | 138 | perf_clean: |
ca9dfc6c | 139 | $(call descend,$(@:_clean=),clean) |
2363ecb1 BP |
140 | |
141 | selftests_clean: | |
ca9dfc6c | 142 | $(call descend,testing/$(@:_clean=),clean) |
2363ecb1 BP |
143 | |
144 | turbostat_clean x86_energy_perf_policy_clean: | |
ca9dfc6c | 145 | $(call descend,power/x86/$(@:_clean=),clean) |
2363ecb1 | 146 | |
94f69966 JP |
147 | tmon_clean: |
148 | $(call descend,thermal/tmon,clean) | |
149 | ||
b3fd7368 PR |
150 | freefall_clean: |
151 | $(call descend,laptop/freefall,clean) | |
152 | ||
2f5a7f1d JO |
153 | build_clean: |
154 | $(call descend,build,clean) | |
155 | ||
3eb2094c | 156 | clean: acpi_clean cgroup_clean cpupower_clean hv_clean firewire_clean lguest_clean \ |
5eca4d84 | 157 | perf_clean selftests_clean turbostat_clean spi_clean usb_clean virtio_clean \ |
23908db4 | 158 | vm_clean net_clean iio_clean x86_energy_perf_policy_clean tmon_clean \ |
442f04c3 JP |
159 | freefall_clean build_clean libbpf_clean libsubcmd_clean liblockdep_clean \ |
160 | objtool_clean | |
2363ecb1 BP |
161 | |
162 | .PHONY: FORCE |