]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blame - tools/Makefile
Merge tag 'drm-fixes-2020-11-16' of git://anongit.freedesktop.org/drm/drm
[mirror_ubuntu-hirsute-kernel.git] / tools / Makefile
CommitLineData
b2441318 1# SPDX-License-Identifier: GPL-2.0
16671c1e
JO
2# Some of the tools (perf) use same make variables
3# as in kernel build.
4export srctree=
5export objtree=
6
2363ecb1
BP
7include scripts/Makefile.include
8
d5dd8afb
BP
9help:
10 @echo 'Possible targets:'
11 @echo ''
20a7add8 12 @echo ' acpi - ACPI tools'
38fe26b4 13 @echo ' bpf - misc BPF tools'
20a7add8
JP
14 @echo ' cgroup - cgroup tools'
15 @echo ' cpupower - a tool for all things x86 CPU power'
4ab5a5d2 16 @echo ' debugging - tools for debugging'
20a7add8 17 @echo ' firewire - the userspace part of nosy, an IEEE-1394 traffic sniffer'
1e510603 18 @echo ' firmware - Firmware tools'
20a7add8 19 @echo ' freefall - laptop accelerometer program for disk protection'
6d591c46 20 @echo ' gpio - GPIO tools'
20a7add8
JP
21 @echo ' hv - tools used when in Hyper-V clients'
22 @echo ' iio - IIO tools'
3fb4f7cd 23 @echo ' intel-speed-select - Intel Speed Select tool'
f9bc9e65 24 @echo ' kvm_stat - top-like utility for displaying kvm statistics'
fa7f3242 25 @echo ' leds - LEDs tools'
24b4d0a1 26 @echo ' liblockdep - user-space wrapper for kernel locking-validator'
38fe26b4 27 @echo ' objtool - an ELF object analysis tool'
1ce78ce0 28 @echo ' pci - PCI tools'
20a7add8
JP
29 @echo ' perf - Linux performance measurement and analysis tool'
30 @echo ' selftests - various kernel selftests'
950313eb 31 @echo ' bootconfig - boot config tool'
747a9b0a 32 @echo ' spi - spi tools'
20a7add8
JP
33 @echo ' tmon - thermal monitoring and tuning tool'
34 @echo ' turbostat - Intel CPU idle stats and freq reporting tool'
35 @echo ' usb - USB testing tools'
36 @echo ' virtio - vhost test module'
37 @echo ' vm - misc vm tools'
9d64fc08 38 @echo ' wmi - WMI interface examples'
d5dd8afb
BP
39 @echo ' x86_energy_perf_policy - Intel energy policy tool'
40 @echo ''
ea01fa9f 41 @echo 'You can do:'
7e010562 42 @echo ' $$ make -C tools/ <tool>_install'
ea01fa9f
BP
43 @echo ''
44 @echo ' from the kernel command line to build and install one of'
45 @echo ' the tools above'
46 @echo ''
f6ba98c5
KM
47 @echo ' $$ make tools/all'
48 @echo ''
49 @echo ' builds all tools.'
50 @echo ''
ea01fa9f
BP
51 @echo ' $$ make tools/install'
52 @echo ''
53 @echo ' installs all tools.'
54 @echo ''
d5dd8afb
BP
55 @echo 'Cleaning targets:'
56 @echo ''
57 @echo ' all of the above with the "_clean" string appended cleans'
58 @echo ' the respective build directory.'
59 @echo ' clean: a summary clean target to clean _all_ folders'
60
a0c4acc0
LZ
61acpi: FORCE
62 $(call descend,power/$@)
63
2363ecb1 64cpupower: FORCE
ca9dfc6c 65 $(call descend,power/$@)
2363ecb1 66
950313eb 67cgroup firewire hv guest bootconfig spi usb virtio vm bpf iio gpio objtool leds wmi pci firmware debugging: FORCE
85c66be1
BP
68 $(call descend,$@)
69
33a57ce0
JO
70bpf/%: FORCE
71 $(call descend,$@)
72
0041898e
LC
73liblockdep: FORCE
74 $(call descend,lib/lockdep)
75
379a9a28 76libapi: FORCE
553873e1 77 $(call descend,lib/api)
85c66be1 78
16671c1e
JO
79# The perf build does not follow the descend function setup,
80# invoking it via it's own make rule.
81PERF_O = $(if $(O),$(O)/tools/perf,)
82
379a9a28 83perf: FORCE
16671c1e
JO
84 $(Q)mkdir -p $(PERF_O) .
85 $(Q)$(MAKE) --no-print-directory -C perf O=$(PERF_O) subdir=
2363ecb1
BP
86
87selftests: FORCE
ca9dfc6c 88 $(call descend,testing/$@)
2363ecb1 89
3fb4f7cd 90turbostat x86_energy_perf_policy intel-speed-select: FORCE
ca9dfc6c 91 $(call descend,power/x86/$@)
2363ecb1 92
94f69966
JP
93tmon: FORCE
94 $(call descend,thermal/$@)
95
b3fd7368
PR
96freefall: FORCE
97 $(call descend,laptop/$@)
98
ee5f7d79
JF
99kvm_stat: FORCE
100 $(call descend,kvm/$@)
101
ecda85e7 102all: acpi cgroup cpupower gpio hv firewire liblockdep \
950313eb 103 perf selftests bootconfig spi turbostat usb \
a92bb546 104 virtio vm bpf x86_energy_perf_policy \
4ab5a5d2
TL
105 tmon freefall iio objtool kvm_stat wmi \
106 pci debugging
f6ba98c5 107
a0c4acc0
LZ
108acpi_install:
109 $(call descend,power/$(@:_install=),install)
110
2363ecb1 111cpupower_install:
ca9dfc6c 112 $(call descend,power/$(@:_install=),install)
2363ecb1 113
950313eb 114cgroup_install firewire_install gpio_install hv_install iio_install perf_install bootconfig_install spi_install usb_install virtio_install vm_install bpf_install objtool_install wmi_install pci_install debugging_install:
ca9dfc6c 115 $(call descend,$(@:_install=),install)
2363ecb1 116
24b4d0a1
AS
117liblockdep_install:
118 $(call descend,lib/lockdep,install)
119
2363ecb1 120selftests_install:
9a13c658 121 $(call descend,testing/$(@:_install=),install)
2363ecb1 122
3fb4f7cd 123turbostat_install x86_energy_perf_policy_install intel-speed-select_install:
ca9dfc6c 124 $(call descend,power/x86/$(@:_install=),install)
2363ecb1 125
94f69966
JP
126tmon_install:
127 $(call descend,thermal/$(@:_install=),install)
128
b3fd7368
PR
129freefall_install:
130 $(call descend,laptop/$(@:_install=),install)
131
f9bc9e65
JF
132kvm_stat_install:
133 $(call descend,kvm/$(@:_install=),install)
134
53499109 135install: acpi_install cgroup_install cpupower_install gpio_install \
bf1d6b2c 136 hv_install firewire_install iio_install liblockdep_install \
92e015b1 137 perf_install selftests_install turbostat_install usb_install \
a92bb546 138 virtio_install vm_install bpf_install x86_energy_perf_policy_install \
9d64fc08 139 tmon_install freefall_install objtool_install kvm_stat_install \
3fb4f7cd 140 wmi_install pci_install debugging_install intel-speed-select_install
2363ecb1 141
a0c4acc0
LZ
142acpi_clean:
143 $(call descend,power/acpi,clean)
144
2363ecb1 145cpupower_clean:
ca9dfc6c 146 $(call descend,power/cpupower,clean)
2363ecb1 147
950313eb 148cgroup_clean hv_clean firewire_clean bootconfig_clean spi_clean usb_clean virtio_clean vm_clean wmi_clean bpf_clean iio_clean gpio_clean objtool_clean leds_clean pci_clean firmware_clean debugging_clean:
85c66be1
BP
149 $(call descend,$(@:_clean=),clean)
150
0041898e
LC
151liblockdep_clean:
152 $(call descend,lib/lockdep,clean)
153
379a9a28 154libapi_clean:
553873e1 155 $(call descend,lib/api,clean)
85c66be1 156
2f5a7f1d
JO
157libbpf_clean:
158 $(call descend,lib/bpf,clean)
159
160libsubcmd_clean:
161 $(call descend,lib/subcmd,clean)
162
379a9a28 163perf_clean:
ab362f5a
JO
164 $(Q)mkdir -p $(PERF_O) .
165 $(Q)$(MAKE) --no-print-directory -C perf O=$(PERF_O) subdir= clean
2363ecb1
BP
166
167selftests_clean:
ca9dfc6c 168 $(call descend,testing/$(@:_clean=),clean)
2363ecb1 169
3fb4f7cd 170turbostat_clean x86_energy_perf_policy_clean intel-speed-select_clean:
ca9dfc6c 171 $(call descend,power/x86/$(@:_clean=),clean)
2363ecb1 172
94f69966
JP
173tmon_clean:
174 $(call descend,thermal/tmon,clean)
175
b3fd7368
PR
176freefall_clean:
177 $(call descend,laptop/freefall,clean)
178
2f5a7f1d
JO
179build_clean:
180 $(call descend,build,clean)
181
ecda85e7 182clean: acpi_clean cgroup_clean cpupower_clean hv_clean firewire_clean \
950313eb 183 perf_clean selftests_clean turbostat_clean bootconfig_clean spi_clean usb_clean virtio_clean \
a92bb546 184 vm_clean bpf_clean iio_clean x86_energy_perf_policy_clean tmon_clean \
6d591c46 185 freefall_clean build_clean libbpf_clean libsubcmd_clean liblockdep_clean \
3fb4f7cd
SP
186 gpio_clean objtool_clean leds_clean wmi_clean pci_clean firmware_clean debugging_clean \
187 intel-speed-select_clean
2363ecb1
BP
188
189.PHONY: FORCE