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