]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blame - tools/Makefile
Merge tag 'devicetree-for-5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/robh...
[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
0041898e
LC
70liblockdep: FORCE
71 $(call descend,lib/lockdep)
72
379a9a28 73libapi: FORCE
553873e1 74 $(call descend,lib/api)
85c66be1 75
16671c1e
JO
76# The perf build does not follow the descend function setup,
77# invoking it via it's own make rule.
78PERF_O = $(if $(O),$(O)/tools/perf,)
79
379a9a28 80perf: FORCE
16671c1e
JO
81 $(Q)mkdir -p $(PERF_O) .
82 $(Q)$(MAKE) --no-print-directory -C perf O=$(PERF_O) subdir=
2363ecb1
BP
83
84selftests: FORCE
ca9dfc6c 85 $(call descend,testing/$@)
2363ecb1 86
3fb4f7cd 87turbostat x86_energy_perf_policy intel-speed-select: FORCE
ca9dfc6c 88 $(call descend,power/x86/$@)
2363ecb1 89
94f69966
JP
90tmon: FORCE
91 $(call descend,thermal/$@)
92
b3fd7368
PR
93freefall: FORCE
94 $(call descend,laptop/$@)
95
ee5f7d79
JF
96kvm_stat: FORCE
97 $(call descend,kvm/$@)
98
ecda85e7 99all: acpi cgroup cpupower gpio hv firewire liblockdep \
950313eb 100 perf selftests bootconfig spi turbostat usb \
a92bb546 101 virtio vm bpf x86_energy_perf_policy \
4ab5a5d2
TL
102 tmon freefall iio objtool kvm_stat wmi \
103 pci debugging
f6ba98c5 104
a0c4acc0
LZ
105acpi_install:
106 $(call descend,power/$(@:_install=),install)
107
2363ecb1 108cpupower_install:
ca9dfc6c 109 $(call descend,power/$(@:_install=),install)
2363ecb1 110
950313eb 111cgroup_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 112 $(call descend,$(@:_install=),install)
2363ecb1 113
24b4d0a1
AS
114liblockdep_install:
115 $(call descend,lib/lockdep,install)
116
2363ecb1 117selftests_install:
9a13c658 118 $(call descend,testing/$(@:_install=),install)
2363ecb1 119
3fb4f7cd 120turbostat_install x86_energy_perf_policy_install intel-speed-select_install:
ca9dfc6c 121 $(call descend,power/x86/$(@:_install=),install)
2363ecb1 122
94f69966
JP
123tmon_install:
124 $(call descend,thermal/$(@:_install=),install)
125
b3fd7368
PR
126freefall_install:
127 $(call descend,laptop/$(@:_install=),install)
128
f9bc9e65
JF
129kvm_stat_install:
130 $(call descend,kvm/$(@:_install=),install)
131
53499109 132install: acpi_install cgroup_install cpupower_install gpio_install \
bf1d6b2c 133 hv_install firewire_install iio_install liblockdep_install \
92e015b1 134 perf_install selftests_install turbostat_install usb_install \
a92bb546 135 virtio_install vm_install bpf_install x86_energy_perf_policy_install \
9d64fc08 136 tmon_install freefall_install objtool_install kvm_stat_install \
3fb4f7cd 137 wmi_install pci_install debugging_install intel-speed-select_install
2363ecb1 138
a0c4acc0
LZ
139acpi_clean:
140 $(call descend,power/acpi,clean)
141
2363ecb1 142cpupower_clean:
ca9dfc6c 143 $(call descend,power/cpupower,clean)
2363ecb1 144
950313eb 145cgroup_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
146 $(call descend,$(@:_clean=),clean)
147
0041898e
LC
148liblockdep_clean:
149 $(call descend,lib/lockdep,clean)
150
379a9a28 151libapi_clean:
553873e1 152 $(call descend,lib/api,clean)
85c66be1 153
2f5a7f1d
JO
154libbpf_clean:
155 $(call descend,lib/bpf,clean)
156
157libsubcmd_clean:
158 $(call descend,lib/subcmd,clean)
159
379a9a28 160perf_clean:
ab362f5a
JO
161 $(Q)mkdir -p $(PERF_O) .
162 $(Q)$(MAKE) --no-print-directory -C perf O=$(PERF_O) subdir= clean
2363ecb1
BP
163
164selftests_clean:
ca9dfc6c 165 $(call descend,testing/$(@:_clean=),clean)
2363ecb1 166
3fb4f7cd 167turbostat_clean x86_energy_perf_policy_clean intel-speed-select_clean:
ca9dfc6c 168 $(call descend,power/x86/$(@:_clean=),clean)
2363ecb1 169
94f69966
JP
170tmon_clean:
171 $(call descend,thermal/tmon,clean)
172
b3fd7368
PR
173freefall_clean:
174 $(call descend,laptop/freefall,clean)
175
2f5a7f1d
JO
176build_clean:
177 $(call descend,build,clean)
178
ecda85e7 179clean: acpi_clean cgroup_clean cpupower_clean hv_clean firewire_clean \
950313eb 180 perf_clean selftests_clean turbostat_clean bootconfig_clean spi_clean usb_clean virtio_clean \
a92bb546 181 vm_clean bpf_clean iio_clean x86_energy_perf_policy_clean tmon_clean \
6d591c46 182 freefall_clean build_clean libbpf_clean libsubcmd_clean liblockdep_clean \
3fb4f7cd
SP
183 gpio_clean objtool_clean leds_clean wmi_clean pci_clean firmware_clean debugging_clean \
184 intel-speed-select_clean
2363ecb1
BP
185
186.PHONY: FORCE