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