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