Blame view

tools/Makefile 6.07 KB
b24413180   Greg Kroah-Hartman   License cleanup: ...
1
  # SPDX-License-Identifier: GPL-2.0
16671c1e1   Jiri Olsa   tools build: Fix ...
2
3
4
5
  # Some of the tools (perf) use same make variables
  # as in kernel build.
  export srctree=
  export objtree=
2363ecb17   Borislav Petkov   tools: Add a topl...
6
  include scripts/Makefile.include
d5dd8afb5   Borislav Petkov   tools: Add a help...
7
8
9
  help:
  	@echo 'Possible targets:'
  	@echo ''
20a7add8c   Josh Poimboeuf   tools: Fix format...
10
  	@echo '  acpi                   - ACPI tools'
38fe26b46   Andy Shevchenko   tools: Keep list ...
11
  	@echo '  bpf                    - misc BPF tools'
20a7add8c   Josh Poimboeuf   tools: Fix format...
12
13
  	@echo '  cgroup                 - cgroup tools'
  	@echo '  cpupower               - a tool for all things x86 CPU power'
4ab5a5d2a   Thorsten Leemhuis   tools: add a kern...
14
  	@echo '  debugging              - tools for debugging'
20a7add8c   Josh Poimboeuf   tools: Fix format...
15
  	@echo '  firewire               - the userspace part of nosy, an IEEE-1394 traffic sniffer'
1e5106031   Andrey Smirnov   tools: Add 'firmw...
16
  	@echo '  firmware               - Firmware tools'
20a7add8c   Josh Poimboeuf   tools: Fix format...
17
  	@echo '  freefall               - laptop accelerometer program for disk protection'
6d591c46b   Linus Walleij   tools/gpio: creat...
18
  	@echo '  gpio                   - GPIO tools'
20a7add8c   Josh Poimboeuf   tools: Fix format...
19
20
  	@echo '  hv                     - tools used when in Hyper-V clients'
  	@echo '  iio                    - IIO tools'
3fb4f7cd4   Srinivas Pandruvada   tools/power/x86: ...
21
  	@echo '  intel-speed-select     - Intel Speed Select tool'
f9bc9e65f   Janosch Frank   tools: Add kvm_st...
22
  	@echo '  kvm_stat               - top-like utility for displaying kvm statistics'
fa7f32422   David Lechner   tools/leds: Add u...
23
  	@echo '  leds                   - LEDs  tools'
24b4d0a1f   Alexander Sverdlin   tools: Add instal...
24
  	@echo '  liblockdep             - user-space wrapper for kernel locking-validator'
38fe26b46   Andy Shevchenko   tools: Keep list ...
25
  	@echo '  objtool                - an ELF object analysis tool'
1ce78ce09   Gustavo Pimentel   tools: PCI: Chang...
26
  	@echo '  pci                    - PCI tools'
20a7add8c   Josh Poimboeuf   tools: Fix format...
27
28
  	@echo '  perf                   - Linux performance measurement and analysis tool'
  	@echo '  selftests              - various kernel selftests'
950313ebf   Masami Hiramatsu   tools: bootconfig...
29
  	@echo '  bootconfig             - boot config tool'
747a9b0a0   Linus Torvalds   Merge branch 'per...
30
  	@echo '  spi                    - spi tools'
20a7add8c   Josh Poimboeuf   tools: Fix format...
31
32
33
34
35
  	@echo '  tmon                   - thermal monitoring and tuning tool'
  	@echo '  turbostat              - Intel CPU idle stats and freq reporting tool'
  	@echo '  usb                    - USB testing tools'
  	@echo '  virtio                 - vhost test module'
  	@echo '  vm                     - misc vm tools'
9d64fc08f   Mario Limonciello   tools/wmi: add a ...
36
  	@echo '  wmi			- WMI interface examples'
d5dd8afb5   Borislav Petkov   tools: Add a help...
37
38
  	@echo '  x86_energy_perf_policy - Intel energy policy tool'
  	@echo ''
ea01fa9f6   Borislav Petkov   tools: Connect to...
39
  	@echo 'You can do:'
7e010562e   Borislav Petkov   tools: Correct ty...
40
  	@echo ' $$ make -C tools/ <tool>_install'
ea01fa9f6   Borislav Petkov   tools: Connect to...
41
42
43
44
  	@echo ''
  	@echo '  from the kernel command line to build and install one of'
  	@echo '  the tools above'
  	@echo ''
f6ba98c5d   Kamal Mostafa   tools: Add a "mak...
45
46
47
48
  	@echo '  $$ make tools/all'
  	@echo ''
  	@echo '  builds all tools.'
  	@echo ''
ea01fa9f6   Borislav Petkov   tools: Connect to...
49
50
51
52
  	@echo '  $$ make tools/install'
  	@echo ''
  	@echo '  installs all tools.'
  	@echo ''
d5dd8afb5   Borislav Petkov   tools: Add a help...
53
54
55
56
57
  	@echo 'Cleaning targets:'
  	@echo ''
  	@echo '  all of the above with the "_clean" string appended cleans'
  	@echo '    the respective build directory.'
  	@echo '  clean: a summary clean target to clean _all_ folders'
a0c4acc09   Lv Zheng   ACPICA: acpidump:...
58
59
  acpi: FORCE
  	$(call descend,power/$@)
2363ecb17   Borislav Petkov   tools: Add a topl...
60
  cpupower: FORCE
ca9dfc6cc   David Howells   tools: Define a M...
61
  	$(call descend,power/$@)
2363ecb17   Borislav Petkov   tools: Add a topl...
62

950313ebf   Masami Hiramatsu   tools: bootconfig...
63
  cgroup firewire hv guest bootconfig spi usb virtio vm bpf iio gpio objtool leds wmi pci firmware debugging: FORCE
85c66be10   Borislav Petkov   perf tools: Intro...
64
  	$(call descend,$@)
33a57ce0a   Jiri Olsa   bpf: Compile reso...
65
66
  bpf/%: FORCE
  	$(call descend,$@)
0041898ec   S. Lockwood-Childs   tools/liblockdep:...
67
68
  liblockdep: FORCE
  	$(call descend,lib/lockdep)
379a9a28a   Jiri Olsa   tools build: No n...
69
  libapi: FORCE
553873e1d   Borislav Petkov   tools/: Convert t...
70
  	$(call descend,lib/api)
85c66be10   Borislav Petkov   perf tools: Intro...
71

16671c1e1   Jiri Olsa   tools build: Fix ...
72
73
74
  # The perf build does not follow the descend function setup,
  # invoking it via it's own make rule.
  PERF_O   = $(if $(O),$(O)/tools/perf,)
379a9a28a   Jiri Olsa   tools build: No n...
75
  perf: FORCE
16671c1e1   Jiri Olsa   tools build: Fix ...
76
77
  	$(Q)mkdir -p $(PERF_O) .
  	$(Q)$(MAKE) --no-print-directory -C perf O=$(PERF_O) subdir=
2363ecb17   Borislav Petkov   tools: Add a topl...
78
79
  
  selftests: FORCE
ca9dfc6cc   David Howells   tools: Define a M...
80
  	$(call descend,testing/$@)
2363ecb17   Borislav Petkov   tools: Add a topl...
81

3fb4f7cd4   Srinivas Pandruvada   tools/power/x86: ...
82
  turbostat x86_energy_perf_policy intel-speed-select: FORCE
ca9dfc6cc   David Howells   tools: Define a M...
83
  	$(call descend,power/x86/$@)
2363ecb17   Borislav Petkov   tools: Add a topl...
84

94f69966f   Jacob Pan   tools/thermal: In...
85
86
  tmon: FORCE
  	$(call descend,thermal/$@)
b3fd7368f   Pali Rohár   Move freefall pro...
87
88
  freefall: FORCE
  	$(call descend,laptop/$@)
ee5f7d79a   Justin M. Forbes   tools/kvm: fix to...
89
90
  kvm_stat: FORCE
  	$(call descend,kvm/$@)
ecda85e70   Juergen Gross   x86/lguest: Remov...
91
  all: acpi cgroup cpupower gpio hv firewire liblockdep \
950313ebf   Masami Hiramatsu   tools: bootconfig...
92
  		perf selftests bootconfig spi turbostat usb \
a92bb546c   Jakub Kicinski   tools: rename too...
93
  		virtio vm bpf x86_energy_perf_policy \
4ab5a5d2a   Thorsten Leemhuis   tools: add a kern...
94
95
  		tmon freefall iio objtool kvm_stat wmi \
  		pci debugging
f6ba98c5d   Kamal Mostafa   tools: Add a "mak...
96

a0c4acc09   Lv Zheng   ACPICA: acpidump:...
97
98
  acpi_install:
  	$(call descend,power/$(@:_install=),install)
2363ecb17   Borislav Petkov   tools: Add a topl...
99
  cpupower_install:
ca9dfc6cc   David Howells   tools: Define a M...
100
  	$(call descend,power/$(@:_install=),install)
2363ecb17   Borislav Petkov   tools: Add a topl...
101

950313ebf   Masami Hiramatsu   tools: bootconfig...
102
  cgroup_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:
ca9dfc6cc   David Howells   tools: Define a M...
103
  	$(call descend,$(@:_install=),install)
2363ecb17   Borislav Petkov   tools: Add a topl...
104

24b4d0a1f   Alexander Sverdlin   tools: Add instal...
105
106
  liblockdep_install:
  	$(call descend,lib/lockdep,install)
2363ecb17   Borislav Petkov   tools: Add a topl...
107
  selftests_install:
9a13c6587   Kevin Hilman   tools: Fix selfte...
108
  	$(call descend,testing/$(@:_install=),install)
2363ecb17   Borislav Petkov   tools: Add a topl...
109

3fb4f7cd4   Srinivas Pandruvada   tools/power/x86: ...
110
  turbostat_install x86_energy_perf_policy_install intel-speed-select_install:
ca9dfc6cc   David Howells   tools: Define a M...
111
  	$(call descend,power/x86/$(@:_install=),install)
2363ecb17   Borislav Petkov   tools: Add a topl...
112

94f69966f   Jacob Pan   tools/thermal: In...
113
114
  tmon_install:
  	$(call descend,thermal/$(@:_install=),install)
b3fd7368f   Pali Rohár   Move freefall pro...
115
116
  freefall_install:
  	$(call descend,laptop/$(@:_install=),install)
f9bc9e65f   Janosch Frank   tools: Add kvm_st...
117
118
  kvm_stat_install:
  	$(call descend,kvm/$(@:_install=),install)
534991092   Andy Shevchenko   tools/gpio: add i...
119
  install: acpi_install cgroup_install cpupower_install gpio_install \
bf1d6b2c7   Linus Torvalds   Merge tag 'stagin...
120
  		hv_install firewire_install iio_install liblockdep_install \
92e015b1c   Greg Thelen   cgroups: move cgr...
121
  		perf_install selftests_install turbostat_install usb_install \
a92bb546c   Jakub Kicinski   tools: rename too...
122
  		virtio_install vm_install bpf_install x86_energy_perf_policy_install \
9d64fc08f   Mario Limonciello   tools/wmi: add a ...
123
  		tmon_install freefall_install objtool_install kvm_stat_install \
3fb4f7cd4   Srinivas Pandruvada   tools/power/x86: ...
124
  		wmi_install pci_install debugging_install intel-speed-select_install
2363ecb17   Borislav Petkov   tools: Add a topl...
125

a0c4acc09   Lv Zheng   ACPICA: acpidump:...
126
127
  acpi_clean:
  	$(call descend,power/acpi,clean)
2363ecb17   Borislav Petkov   tools: Add a topl...
128
  cpupower_clean:
ca9dfc6cc   David Howells   tools: Define a M...
129
  	$(call descend,power/cpupower,clean)
2363ecb17   Borislav Petkov   tools: Add a topl...
130

950313ebf   Masami Hiramatsu   tools: bootconfig...
131
  cgroup_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:
85c66be10   Borislav Petkov   perf tools: Intro...
132
  	$(call descend,$(@:_clean=),clean)
0041898ec   S. Lockwood-Childs   tools/liblockdep:...
133
134
  liblockdep_clean:
  	$(call descend,lib/lockdep,clean)
379a9a28a   Jiri Olsa   tools build: No n...
135
  libapi_clean:
553873e1d   Borislav Petkov   tools/: Convert t...
136
  	$(call descend,lib/api,clean)
85c66be10   Borislav Petkov   perf tools: Intro...
137

2f5a7f1d1   Jiri Olsa   tools: Add clean ...
138
139
140
141
142
  libbpf_clean:
  	$(call descend,lib/bpf,clean)
  
  libsubcmd_clean:
  	$(call descend,lib/subcmd,clean)
379a9a28a   Jiri Olsa   tools build: No n...
143
  perf_clean:
ab362f5a9   Jiri Olsa   tools build: Fix ...
144
145
  	$(Q)mkdir -p $(PERF_O) .
  	$(Q)$(MAKE) --no-print-directory -C perf O=$(PERF_O) subdir= clean
2363ecb17   Borislav Petkov   tools: Add a topl...
146
147
  
  selftests_clean:
ca9dfc6cc   David Howells   tools: Define a M...
148
  	$(call descend,testing/$(@:_clean=),clean)
2363ecb17   Borislav Petkov   tools: Add a topl...
149

3fb4f7cd4   Srinivas Pandruvada   tools/power/x86: ...
150
  turbostat_clean x86_energy_perf_policy_clean intel-speed-select_clean:
ca9dfc6cc   David Howells   tools: Define a M...
151
  	$(call descend,power/x86/$(@:_clean=),clean)
2363ecb17   Borislav Petkov   tools: Add a topl...
152

94f69966f   Jacob Pan   tools/thermal: In...
153
154
  tmon_clean:
  	$(call descend,thermal/tmon,clean)
b3fd7368f   Pali Rohár   Move freefall pro...
155
156
  freefall_clean:
  	$(call descend,laptop/freefall,clean)
2f5a7f1d1   Jiri Olsa   tools: Add clean ...
157
158
  build_clean:
  	$(call descend,build,clean)
ecda85e70   Juergen Gross   x86/lguest: Remov...
159
  clean: acpi_clean cgroup_clean cpupower_clean hv_clean firewire_clean \
950313ebf   Masami Hiramatsu   tools: bootconfig...
160
  		perf_clean selftests_clean turbostat_clean bootconfig_clean spi_clean usb_clean virtio_clean \
a92bb546c   Jakub Kicinski   tools: rename too...
161
  		vm_clean bpf_clean iio_clean x86_energy_perf_policy_clean tmon_clean \
6d591c46b   Linus Walleij   tools/gpio: creat...
162
  		freefall_clean build_clean libbpf_clean libsubcmd_clean liblockdep_clean \
3fb4f7cd4   Srinivas Pandruvada   tools/power/x86: ...
163
164
  		gpio_clean objtool_clean leds_clean wmi_clean pci_clean firmware_clean debugging_clean \
  		intel-speed-select_clean
2363ecb17   Borislav Petkov   tools: Add a topl...
165
166
  
  .PHONY: FORCE