ARM: 8840/1: use a raw_spinlock_t in unwind
[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
JP
12 @echo ' acpi - ACPI tools'
13 @echo ' cgroup - cgroup tools'
14 @echo ' cpupower - a tool for all things x86 CPU power'
15 @echo ' firewire - the userspace part of nosy, an IEEE-1394 traffic sniffer'
1e510603 16 @echo ' firmware - Firmware tools'
20a7add8 17 @echo ' freefall - laptop accelerometer program for disk protection'
6d591c46 18 @echo ' gpio - GPIO tools'
20a7add8
JP
19 @echo ' hv - tools used when in Hyper-V clients'
20 @echo ' iio - IIO tools'
f9bc9e65 21 @echo ' kvm_stat - top-like utility for displaying kvm statistics'
fa7f3242 22 @echo ' leds - LEDs tools'
24b4d0a1 23 @echo ' liblockdep - user-space wrapper for kernel locking-validator'
a92bb546 24 @echo ' bpf - misc BPF tools'
1ce78ce0 25 @echo ' pci - PCI tools'
20a7add8
JP
26 @echo ' perf - Linux performance measurement and analysis tool'
27 @echo ' selftests - various kernel selftests'
747a9b0a 28 @echo ' spi - spi tools'
442f04c3 29 @echo ' objtool - an ELF object analysis tool'
20a7add8
JP
30 @echo ' tmon - thermal monitoring and tuning tool'
31 @echo ' turbostat - Intel CPU idle stats and freq reporting tool'
32 @echo ' usb - USB testing tools'
33 @echo ' virtio - vhost test module'
34 @echo ' vm - misc vm tools'
9d64fc08 35 @echo ' wmi - WMI interface examples'
d5dd8afb
BP
36 @echo ' x86_energy_perf_policy - Intel energy policy tool'
37 @echo ''
ea01fa9f 38 @echo 'You can do:'
7e010562 39 @echo ' $$ make -C tools/ <tool>_install'
ea01fa9f
BP
40 @echo ''
41 @echo ' from the kernel command line to build and install one of'
42 @echo ' the tools above'
43 @echo ''
f6ba98c5
KM
44 @echo ' $$ make tools/all'
45 @echo ''
46 @echo ' builds all tools.'
47 @echo ''
ea01fa9f
BP
48 @echo ' $$ make tools/install'
49 @echo ''
50 @echo ' installs all tools.'
51 @echo ''
d5dd8afb
BP
52 @echo 'Cleaning targets:'
53 @echo ''
54 @echo ' all of the above with the "_clean" string appended cleans'
55 @echo ' the respective build directory.'
56 @echo ' clean: a summary clean target to clean _all_ folders'
57
a0c4acc0
LZ
58acpi: FORCE
59 $(call descend,power/$@)
60
2363ecb1 61cpupower: FORCE
ca9dfc6c 62 $(call descend,power/$@)
2363ecb1 63
1e510603 64cgroup firewire hv guest spi usb virtio vm bpf iio gpio objtool leds wmi pci firmware: FORCE
85c66be1
BP
65 $(call descend,$@)
66
0041898e
LC
67liblockdep: FORCE
68 $(call descend,lib/lockdep)
69
379a9a28 70libapi: FORCE
553873e1 71 $(call descend,lib/api)
85c66be1 72
16671c1e
JO
73# The perf build does not follow the descend function setup,
74# invoking it via it's own make rule.
75PERF_O = $(if $(O),$(O)/tools/perf,)
76
379a9a28 77perf: FORCE
16671c1e
JO
78 $(Q)mkdir -p $(PERF_O) .
79 $(Q)$(MAKE) --no-print-directory -C perf O=$(PERF_O) subdir=
2363ecb1
BP
80
81selftests: FORCE
ca9dfc6c 82 $(call descend,testing/$@)
2363ecb1
BP
83
84turbostat x86_energy_perf_policy: FORCE
ca9dfc6c 85 $(call descend,power/x86/$@)
2363ecb1 86
94f69966
JP
87tmon: FORCE
88 $(call descend,thermal/$@)
89
b3fd7368
PR
90freefall: FORCE
91 $(call descend,laptop/$@)
92
ee5f7d79
JF
93kvm_stat: FORCE
94 $(call descend,kvm/$@)
95
ecda85e7 96all: acpi cgroup cpupower gpio hv firewire liblockdep \
e9d4650d 97 perf selftests spi turbostat usb \
a92bb546 98 virtio vm bpf x86_energy_perf_policy \
1ce78ce0 99 tmon freefall iio objtool kvm_stat wmi pci
f6ba98c5 100
a0c4acc0
LZ
101acpi_install:
102 $(call descend,power/$(@:_install=),install)
103
2363ecb1 104cpupower_install:
ca9dfc6c 105 $(call descend,power/$(@:_install=),install)
2363ecb1 106
1ce78ce0 107cgroup_install firewire_install gpio_install hv_install iio_install perf_install spi_install usb_install virtio_install vm_install bpf_install objtool_install wmi_install pci_install:
ca9dfc6c 108 $(call descend,$(@:_install=),install)
2363ecb1 109
24b4d0a1
AS
110liblockdep_install:
111 $(call descend,lib/lockdep,install)
112
2363ecb1 113selftests_install:
9a13c658 114 $(call descend,testing/$(@:_install=),install)
2363ecb1
BP
115
116turbostat_install x86_energy_perf_policy_install:
ca9dfc6c 117 $(call descend,power/x86/$(@:_install=),install)
2363ecb1 118
94f69966
JP
119tmon_install:
120 $(call descend,thermal/$(@:_install=),install)
121
b3fd7368
PR
122freefall_install:
123 $(call descend,laptop/$(@:_install=),install)
124
f9bc9e65
JF
125kvm_stat_install:
126 $(call descend,kvm/$(@:_install=),install)
127
53499109 128install: acpi_install cgroup_install cpupower_install gpio_install \
bf1d6b2c 129 hv_install firewire_install iio_install liblockdep_install \
92e015b1 130 perf_install selftests_install turbostat_install usb_install \
a92bb546 131 virtio_install vm_install bpf_install x86_energy_perf_policy_install \
9d64fc08 132 tmon_install freefall_install objtool_install kvm_stat_install \
1ce78ce0 133 wmi_install pci_install
2363ecb1 134
a0c4acc0
LZ
135acpi_clean:
136 $(call descend,power/acpi,clean)
137
2363ecb1 138cpupower_clean:
ca9dfc6c 139 $(call descend,power/cpupower,clean)
2363ecb1 140
1e510603 141cgroup_clean hv_clean firewire_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:
85c66be1
BP
142 $(call descend,$(@:_clean=),clean)
143
0041898e
LC
144liblockdep_clean:
145 $(call descend,lib/lockdep,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
BP
162
163turbostat_clean x86_energy_perf_policy_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
ecda85e7 175clean: acpi_clean cgroup_clean cpupower_clean hv_clean firewire_clean \
5eca4d84 176 perf_clean selftests_clean turbostat_clean spi_clean usb_clean virtio_clean \
a92bb546 177 vm_clean bpf_clean iio_clean x86_energy_perf_policy_clean tmon_clean \
6d591c46 178 freefall_clean build_clean libbpf_clean libsubcmd_clean liblockdep_clean \
1e510603 179 gpio_clean objtool_clean leds_clean wmi_clean pci_clean firmware_clean
2363ecb1
BP
180
181.PHONY: FORCE