fib_rules: fix error in backport of e9919a24d302 ("fib_rules: return 0...")
[linux-stable.git] / tools / Makefile
blobc4f41ef9a7a7c5e6bef1f483e956f0168f7e912a
1 # SPDX-License-Identifier: GPL-2.0
2 # Some of the tools (perf) use same make variables
3 # as in kernel build.
4 export srctree=
5 export objtree=
7 include scripts/Makefile.include
9 help:
10 @echo 'Possible targets:'
11 @echo ''
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'
17 @echo ' gpio - GPIO tools'
18 @echo ' hv - tools used when in Hyper-V clients'
19 @echo ' iio - IIO tools'
20 @echo ' kvm_stat - top-like utility for displaying kvm statistics'
21 @echo ' leds - LEDs tools'
22 @echo ' liblockdep - user-space wrapper for kernel locking-validator'
23 @echo ' net - misc networking tools'
24 @echo ' perf - Linux performance measurement and analysis tool'
25 @echo ' selftests - various kernel selftests'
26 @echo ' spi - spi tools'
27 @echo ' objtool - an ELF object analysis tool'
28 @echo ' tmon - thermal monitoring and tuning tool'
29 @echo ' turbostat - Intel CPU idle stats and freq reporting tool'
30 @echo ' usb - USB testing tools'
31 @echo ' virtio - vhost test module'
32 @echo ' vm - misc vm tools'
33 @echo ' x86_energy_perf_policy - Intel energy policy tool'
34 @echo ''
35 @echo 'You can do:'
36 @echo ' $$ make -C tools/ <tool>_install'
37 @echo ''
38 @echo ' from the kernel command line to build and install one of'
39 @echo ' the tools above'
40 @echo ''
41 @echo ' $$ make tools/all'
42 @echo ''
43 @echo ' builds all tools.'
44 @echo ''
45 @echo ' $$ make tools/install'
46 @echo ''
47 @echo ' installs all tools.'
48 @echo ''
49 @echo 'Cleaning targets:'
50 @echo ''
51 @echo ' all of the above with the "_clean" string appended cleans'
52 @echo ' the respective build directory.'
53 @echo ' clean: a summary clean target to clean _all_ folders'
55 acpi: FORCE
56 $(call descend,power/$@)
58 cpupower: FORCE
59 $(call descend,power/$@)
61 cgroup firewire hv guest spi usb virtio vm net iio gpio objtool leds: FORCE
62 $(call descend,$@)
64 liblockdep: FORCE
65 $(call descend,lib/lockdep)
67 libapi: FORCE
68 $(call descend,lib/api)
70 # The perf build does not follow the descend function setup,
71 # invoking it via it's own make rule.
72 PERF_O = $(if $(O),$(O)/tools/perf,)
74 perf: FORCE
75 $(Q)mkdir -p $(PERF_O) .
76 $(Q)$(MAKE) --no-print-directory -C perf O=$(PERF_O) subdir=
78 selftests: FORCE
79 $(call descend,testing/$@)
81 turbostat x86_energy_perf_policy: FORCE
82 $(call descend,power/x86/$@)
84 tmon: FORCE
85 $(call descend,thermal/$@)
87 freefall: FORCE
88 $(call descend,laptop/$@)
90 kvm_stat: FORCE
91 $(call descend,kvm/$@)
93 all: acpi cgroup cpupower gpio hv firewire liblockdep \
94 perf selftests spi turbostat usb \
95 virtio vm net x86_energy_perf_policy \
96 tmon freefall iio objtool kvm_stat
98 acpi_install:
99 $(call descend,power/$(@:_install=),install)
101 cpupower_install:
102 $(call descend,power/$(@:_install=),install)
104 cgroup_install firewire_install gpio_install hv_install iio_install perf_install spi_install usb_install virtio_install vm_install net_install objtool_install:
105 $(call descend,$(@:_install=),install)
107 liblockdep_install:
108 $(call descend,lib/lockdep,install)
110 selftests_install:
111 $(call descend,testing/$(@:_install=),install)
113 turbostat_install x86_energy_perf_policy_install:
114 $(call descend,power/x86/$(@:_install=),install)
116 tmon_install:
117 $(call descend,thermal/$(@:_install=),install)
119 freefall_install:
120 $(call descend,laptop/$(@:_install=),install)
122 kvm_stat_install:
123 $(call descend,kvm/$(@:_install=),install)
125 install: acpi_install cgroup_install cpupower_install gpio_install \
126 hv_install firewire_install iio_install liblockdep_install \
127 perf_install selftests_install turbostat_install usb_install \
128 virtio_install vm_install net_install x86_energy_perf_policy_install \
129 tmon_install freefall_install objtool_install kvm_stat_install
131 acpi_clean:
132 $(call descend,power/acpi,clean)
134 cpupower_clean:
135 $(call descend,power/cpupower,clean)
137 cgroup_clean hv_clean firewire_clean spi_clean usb_clean virtio_clean vm_clean net_clean iio_clean gpio_clean objtool_clean leds_clean:
138 $(call descend,$(@:_clean=),clean)
140 liblockdep_clean:
141 $(call descend,lib/lockdep,clean)
143 libapi_clean:
144 $(call descend,lib/api,clean)
146 libbpf_clean:
147 $(call descend,lib/bpf,clean)
149 libsubcmd_clean:
150 $(call descend,lib/subcmd,clean)
152 perf_clean:
153 $(Q)mkdir -p $(PERF_O) .
154 $(Q)$(MAKE) --no-print-directory -C perf O=$(PERF_O) subdir= clean
156 selftests_clean:
157 $(call descend,testing/$(@:_clean=),clean)
159 turbostat_clean x86_energy_perf_policy_clean:
160 $(call descend,power/x86/$(@:_clean=),clean)
162 tmon_clean:
163 $(call descend,thermal/tmon,clean)
165 freefall_clean:
166 $(call descend,laptop/freefall,clean)
168 build_clean:
169 $(call descend,build,clean)
171 clean: acpi_clean cgroup_clean cpupower_clean hv_clean firewire_clean \
172 perf_clean selftests_clean turbostat_clean spi_clean usb_clean virtio_clean \
173 vm_clean net_clean iio_clean x86_energy_perf_policy_clean tmon_clean \
174 freefall_clean build_clean libbpf_clean libsubcmd_clean liblockdep_clean \
175 gpio_clean objtool_clean leds_clean
177 .PHONY: FORCE