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