tools/lib/lockdep: drop liblockdep
[linux-2.6-block.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 14 @echo ' cgroup - cgroup tools'
08609989 15 @echo ' counter - counter tools'
20a7add8 16 @echo ' cpupower - a tool for all things x86 CPU power'
4ab5a5d2 17 @echo ' debugging - tools for debugging'
20a7add8 18 @echo ' firewire - the userspace part of nosy, an IEEE-1394 traffic sniffer'
1e510603 19 @echo ' firmware - Firmware tools'
20a7add8 20 @echo ' freefall - laptop accelerometer program for disk protection'
6d591c46 21 @echo ' gpio - GPIO tools'
20a7add8
JP
22 @echo ' hv - tools used when in Hyper-V clients'
23 @echo ' iio - IIO tools'
3fb4f7cd 24 @echo ' intel-speed-select - Intel Speed Select tool'
f9bc9e65 25 @echo ' kvm_stat - top-like utility for displaying kvm statistics'
fa7f3242 26 @echo ' leds - LEDs tools'
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 33 @echo ' tmon - thermal monitoring and tuning tool'
e23db805 34 @echo ' tracing - misc tracing tools'
20a7add8
JP
35 @echo ' turbostat - Intel CPU idle stats and freq reporting tool'
36 @echo ' usb - USB testing tools'
37 @echo ' virtio - vhost test module'
38 @echo ' vm - misc vm tools'
9d64fc08 39 @echo ' wmi - WMI interface examples'
d5dd8afb
BP
40 @echo ' x86_energy_perf_policy - Intel energy policy tool'
41 @echo ''
ea01fa9f 42 @echo 'You can do:'
7e010562 43 @echo ' $$ make -C tools/ <tool>_install'
ea01fa9f
BP
44 @echo ''
45 @echo ' from the kernel command line to build and install one of'
46 @echo ' the tools above'
47 @echo ''
f6ba98c5
KM
48 @echo ' $$ make tools/all'
49 @echo ''
50 @echo ' builds all tools.'
51 @echo ''
ea01fa9f
BP
52 @echo ' $$ make tools/install'
53 @echo ''
54 @echo ' installs all tools.'
55 @echo ''
d5dd8afb
BP
56 @echo 'Cleaning targets:'
57 @echo ''
58 @echo ' all of the above with the "_clean" string appended cleans'
59 @echo ' the respective build directory.'
60 @echo ' clean: a summary clean target to clean _all_ folders'
61
a0c4acc0
LZ
62acpi: FORCE
63 $(call descend,power/$@)
64
2363ecb1 65cpupower: FORCE
ca9dfc6c 66 $(call descend,power/$@)
2363ecb1 67
08609989 68cgroup counter firewire hv guest bootconfig spi usb virtio vm bpf iio gpio objtool leds wmi pci firmware debugging tracing: FORCE
85c66be1
BP
69 $(call descend,$@)
70
33a57ce0
JO
71bpf/%: FORCE
72 $(call descend,$@)
73
379a9a28 74libapi: FORCE
553873e1 75 $(call descend,lib/api)
85c66be1 76
16671c1e
JO
77# The perf build does not follow the descend function setup,
78# invoking it via it's own make rule.
79PERF_O = $(if $(O),$(O)/tools/perf,)
80
379a9a28 81perf: FORCE
16671c1e
JO
82 $(Q)mkdir -p $(PERF_O) .
83 $(Q)$(MAKE) --no-print-directory -C perf O=$(PERF_O) subdir=
2363ecb1
BP
84
85selftests: FORCE
ca9dfc6c 86 $(call descend,testing/$@)
2363ecb1 87
3fb4f7cd 88turbostat x86_energy_perf_policy intel-speed-select: FORCE
ca9dfc6c 89 $(call descend,power/x86/$@)
2363ecb1 90
94f69966
JP
91tmon: FORCE
92 $(call descend,thermal/$@)
93
b3fd7368
PR
94freefall: FORCE
95 $(call descend,laptop/$@)
96
ee5f7d79
JF
97kvm_stat: FORCE
98 $(call descend,kvm/$@)
99
7246f4dc 100all: acpi cgroup counter cpupower gpio hv firewire \
950313eb 101 perf selftests bootconfig spi turbostat usb \
a92bb546 102 virtio vm bpf x86_energy_perf_policy \
4ab5a5d2 103 tmon freefall iio objtool kvm_stat wmi \
e23db805 104 pci debugging tracing
f6ba98c5 105
a0c4acc0
LZ
106acpi_install:
107 $(call descend,power/$(@:_install=),install)
108
2363ecb1 109cpupower_install:
ca9dfc6c 110 $(call descend,power/$(@:_install=),install)
2363ecb1 111
08609989 112cgroup_install counter_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 tracing_install:
ca9dfc6c 113 $(call descend,$(@:_install=),install)
2363ecb1
BP
114
115selftests_install:
9a13c658 116 $(call descend,testing/$(@:_install=),install)
2363ecb1 117
3fb4f7cd 118turbostat_install x86_energy_perf_policy_install intel-speed-select_install:
ca9dfc6c 119 $(call descend,power/x86/$(@:_install=),install)
2363ecb1 120
94f69966
JP
121tmon_install:
122 $(call descend,thermal/$(@:_install=),install)
123
b3fd7368
PR
124freefall_install:
125 $(call descend,laptop/$(@:_install=),install)
126
f9bc9e65
JF
127kvm_stat_install:
128 $(call descend,kvm/$(@:_install=),install)
129
08609989 130install: acpi_install cgroup_install counter_install cpupower_install gpio_install \
7246f4dc 131 hv_install firewire_install iio_install \
92e015b1 132 perf_install selftests_install turbostat_install usb_install \
a92bb546 133 virtio_install vm_install bpf_install x86_energy_perf_policy_install \
9d64fc08 134 tmon_install freefall_install objtool_install kvm_stat_install \
e23db805
VR
135 wmi_install pci_install debugging_install intel-speed-select_install \
136 tracing_install
2363ecb1 137
a0c4acc0
LZ
138acpi_clean:
139 $(call descend,power/acpi,clean)
140
2363ecb1 141cpupower_clean:
ca9dfc6c 142 $(call descend,power/cpupower,clean)
2363ecb1 143
08609989 144cgroup_clean counter_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 tracing_clean:
85c66be1
BP
145 $(call descend,$(@:_clean=),clean)
146
379a9a28 147libapi_clean:
553873e1 148 $(call descend,lib/api,clean)
85c66be1 149
2f5a7f1d
JO
150libbpf_clean:
151 $(call descend,lib/bpf,clean)
152
153libsubcmd_clean:
154 $(call descend,lib/subcmd,clean)
155
379a9a28 156perf_clean:
ab362f5a
JO
157 $(Q)mkdir -p $(PERF_O) .
158 $(Q)$(MAKE) --no-print-directory -C perf O=$(PERF_O) subdir= clean
2363ecb1
BP
159
160selftests_clean:
ca9dfc6c 161 $(call descend,testing/$(@:_clean=),clean)
2363ecb1 162
3fb4f7cd 163turbostat_clean x86_energy_perf_policy_clean intel-speed-select_clean:
ca9dfc6c 164 $(call descend,power/x86/$(@:_clean=),clean)
2363ecb1 165
94f69966
JP
166tmon_clean:
167 $(call descend,thermal/tmon,clean)
168
b3fd7368
PR
169freefall_clean:
170 $(call descend,laptop/freefall,clean)
171
2f5a7f1d
JO
172build_clean:
173 $(call descend,build,clean)
174
08609989 175clean: acpi_clean cgroup_clean counter_clean cpupower_clean hv_clean firewire_clean \
950313eb 176 perf_clean selftests_clean turbostat_clean bootconfig_clean spi_clean usb_clean virtio_clean \
a92bb546 177 vm_clean bpf_clean iio_clean x86_energy_perf_policy_clean tmon_clean \
7246f4dc 178 freefall_clean build_clean libbpf_clean libsubcmd_clean \
3fb4f7cd 179 gpio_clean objtool_clean leds_clean wmi_clean pci_clean firmware_clean debugging_clean \
e23db805 180 intel-speed-select_clean tracing_clean
2363ecb1
BP
181
182.PHONY: FORCE