Blame view

tools/Makefile 5.07 KB
16671c1e1   Jiri Olsa   tools build: Fix ...
1
2
3
4
  # Some of the tools (perf) use same make variables
  # as in kernel build.
  export srctree=
  export objtree=
2363ecb17   Borislav Petkov   tools: Add a topl...
5
  include scripts/Makefile.include
d5dd8afb5   Borislav Petkov   tools: Add a help...
6
7
8
  help:
  	@echo 'Possible targets:'
  	@echo ''
20a7add8c   Josh Poimboeuf   tools: Fix format...
9
10
11
12
13
  	@echo '  acpi                   - ACPI tools'
  	@echo '  cgroup                 - cgroup tools'
  	@echo '  cpupower               - a tool for all things x86 CPU power'
  	@echo '  firewire               - the userspace part of nosy, an IEEE-1394 traffic sniffer'
  	@echo '  freefall               - laptop accelerometer program for disk protection'
6d591c46b   Linus Walleij   tools/gpio: creat...
14
  	@echo '  gpio                   - GPIO tools'
20a7add8c   Josh Poimboeuf   tools: Fix format...
15
16
  	@echo '  hv                     - tools used when in Hyper-V clients'
  	@echo '  iio                    - IIO tools'
f9bc9e65f   Janosch Frank   tools: Add kvm_st...
17
  	@echo '  kvm_stat               - top-like utility for displaying kvm statistics'
20a7add8c   Josh Poimboeuf   tools: Fix format...
18
19
20
21
  	@echo '  lguest                 - a minimal 32-bit x86 hypervisor'
  	@echo '  net                    - misc networking tools'
  	@echo '  perf                   - Linux performance measurement and analysis tool'
  	@echo '  selftests              - various kernel selftests'
747a9b0a0   Linus Torvalds   Merge branch 'per...
22
  	@echo '  spi                    - spi tools'
442f04c34   Josh Poimboeuf   objtool: Add tool...
23
  	@echo '  objtool                - an ELF object analysis tool'
20a7add8c   Josh Poimboeuf   tools: Fix format...
24
25
26
27
28
  	@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'
d5dd8afb5   Borislav Petkov   tools: Add a help...
29
30
  	@echo '  x86_energy_perf_policy - Intel energy policy tool'
  	@echo ''
ea01fa9f6   Borislav Petkov   tools: Connect to...
31
  	@echo 'You can do:'
7e010562e   Borislav Petkov   tools: Correct ty...
32
  	@echo ' $$ make -C tools/ <tool>_install'
ea01fa9f6   Borislav Petkov   tools: Connect to...
33
34
35
36
  	@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...
37
38
39
40
  	@echo '  $$ make tools/all'
  	@echo ''
  	@echo '  builds all tools.'
  	@echo ''
ea01fa9f6   Borislav Petkov   tools: Connect to...
41
42
43
44
  	@echo '  $$ make tools/install'
  	@echo ''
  	@echo '  installs all tools.'
  	@echo ''
d5dd8afb5   Borislav Petkov   tools: Add a help...
45
46
47
48
49
  	@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:...
50
51
  acpi: FORCE
  	$(call descend,power/$@)
2363ecb17   Borislav Petkov   tools: Add a topl...
52
  cpupower: FORCE
ca9dfc6cc   David Howells   tools: Define a M...
53
  	$(call descend,power/$@)
2363ecb17   Borislav Petkov   tools: Add a topl...
54

26660a404   Linus Torvalds   Merge branch 'cor...
55
  cgroup firewire hv guest spi usb virtio vm net iio gpio objtool: FORCE
85c66be10   Borislav Petkov   perf tools: Intro...
56
  	$(call descend,$@)
0041898ec   S. Lockwood-Childs   tools/liblockdep:...
57
58
  liblockdep: FORCE
  	$(call descend,lib/lockdep)
379a9a28a   Jiri Olsa   tools build: No n...
59
  libapi: FORCE
553873e1d   Borislav Petkov   tools/: Convert t...
60
  	$(call descend,lib/api)
85c66be10   Borislav Petkov   perf tools: Intro...
61

16671c1e1   Jiri Olsa   tools build: Fix ...
62
63
64
  # 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...
65
  perf: FORCE
16671c1e1   Jiri Olsa   tools build: Fix ...
66
67
  	$(Q)mkdir -p $(PERF_O) .
  	$(Q)$(MAKE) --no-print-directory -C perf O=$(PERF_O) subdir=
2363ecb17   Borislav Petkov   tools: Add a topl...
68
69
  
  selftests: FORCE
ca9dfc6cc   David Howells   tools: Define a M...
70
  	$(call descend,testing/$@)
2363ecb17   Borislav Petkov   tools: Add a topl...
71
72
  
  turbostat x86_energy_perf_policy: FORCE
ca9dfc6cc   David Howells   tools: Define a M...
73
  	$(call descend,power/x86/$@)
2363ecb17   Borislav Petkov   tools: Add a topl...
74

94f69966f   Jacob Pan   tools/thermal: In...
75
76
  tmon: FORCE
  	$(call descend,thermal/$@)
b3fd7368f   Pali Rohár   Move freefall pro...
77
78
  freefall: FORCE
  	$(call descend,laptop/$@)
534991092   Andy Shevchenko   tools/gpio: add i...
79
  all: acpi cgroup cpupower gpio hv firewire lguest \
f6ba98c5d   Kamal Mostafa   tools: Add a "mak...
80
81
  		perf selftests turbostat usb \
  		virtio vm net x86_energy_perf_policy \
442f04c34   Josh Poimboeuf   objtool: Add tool...
82
  		tmon freefall objtool
f6ba98c5d   Kamal Mostafa   tools: Add a "mak...
83

a0c4acc09   Lv Zheng   ACPICA: acpidump:...
84
85
  acpi_install:
  	$(call descend,power/$(@:_install=),install)
2363ecb17   Borislav Petkov   tools: Add a topl...
86
  cpupower_install:
ca9dfc6cc   David Howells   tools: Define a M...
87
  	$(call descend,power/$(@:_install=),install)
2363ecb17   Borislav Petkov   tools: Add a topl...
88

534991092   Andy Shevchenko   tools/gpio: add i...
89
  cgroup_install firewire_install gpio_install hv_install lguest_install perf_install usb_install virtio_install vm_install net_install objtool_install:
ca9dfc6cc   David Howells   tools: Define a M...
90
  	$(call descend,$(@:_install=),install)
2363ecb17   Borislav Petkov   tools: Add a topl...
91
92
  
  selftests_install:
9a13c6587   Kevin Hilman   tools: Fix selfte...
93
  	$(call descend,testing/$(@:_install=),install)
2363ecb17   Borislav Petkov   tools: Add a topl...
94
95
  
  turbostat_install x86_energy_perf_policy_install:
ca9dfc6cc   David Howells   tools: Define a M...
96
  	$(call descend,power/x86/$(@:_install=),install)
2363ecb17   Borislav Petkov   tools: Add a topl...
97

94f69966f   Jacob Pan   tools/thermal: In...
98
99
  tmon_install:
  	$(call descend,thermal/$(@:_install=),install)
b3fd7368f   Pali Rohár   Move freefall pro...
100
101
  freefall_install:
  	$(call descend,laptop/$(@:_install=),install)
f9bc9e65f   Janosch Frank   tools: Add kvm_st...
102
103
  kvm_stat_install:
  	$(call descend,kvm/$(@:_install=),install)
534991092   Andy Shevchenko   tools/gpio: add i...
104
105
  install: acpi_install cgroup_install cpupower_install gpio_install \
  		hv_install firewire_install lguest_install \
92e015b1c   Greg Thelen   cgroups: move cgr...
106
  		perf_install selftests_install turbostat_install usb_install \
94f69966f   Jacob Pan   tools/thermal: In...
107
  		virtio_install vm_install net_install x86_energy_perf_policy_install \
f9bc9e65f   Janosch Frank   tools: Add kvm_st...
108
  		tmon_install freefall_install objtool_install kvm_stat_install
2363ecb17   Borislav Petkov   tools: Add a topl...
109

a0c4acc09   Lv Zheng   ACPICA: acpidump:...
110
111
  acpi_clean:
  	$(call descend,power/acpi,clean)
2363ecb17   Borislav Petkov   tools: Add a topl...
112
  cpupower_clean:
ca9dfc6cc   David Howells   tools: Define a M...
113
  	$(call descend,power/cpupower,clean)
2363ecb17   Borislav Petkov   tools: Add a topl...
114

26660a404   Linus Torvalds   Merge branch 'cor...
115
  cgroup_clean hv_clean firewire_clean lguest_clean spi_clean usb_clean virtio_clean vm_clean net_clean iio_clean gpio_clean objtool_clean:
85c66be10   Borislav Petkov   perf tools: Intro...
116
  	$(call descend,$(@:_clean=),clean)
0041898ec   S. Lockwood-Childs   tools/liblockdep:...
117
118
  liblockdep_clean:
  	$(call descend,lib/lockdep,clean)
379a9a28a   Jiri Olsa   tools build: No n...
119
  libapi_clean:
553873e1d   Borislav Petkov   tools/: Convert t...
120
  	$(call descend,lib/api,clean)
85c66be10   Borislav Petkov   perf tools: Intro...
121

2f5a7f1d1   Jiri Olsa   tools: Add clean ...
122
123
124
125
126
  libbpf_clean:
  	$(call descend,lib/bpf,clean)
  
  libsubcmd_clean:
  	$(call descend,lib/subcmd,clean)
379a9a28a   Jiri Olsa   tools build: No n...
127
  perf_clean:
ab362f5a9   Jiri Olsa   tools build: Fix ...
128
129
  	$(Q)mkdir -p $(PERF_O) .
  	$(Q)$(MAKE) --no-print-directory -C perf O=$(PERF_O) subdir= clean
2363ecb17   Borislav Petkov   tools: Add a topl...
130
131
  
  selftests_clean:
ca9dfc6cc   David Howells   tools: Define a M...
132
  	$(call descend,testing/$(@:_clean=),clean)
2363ecb17   Borislav Petkov   tools: Add a topl...
133
134
  
  turbostat_clean x86_energy_perf_policy_clean:
ca9dfc6cc   David Howells   tools: Define a M...
135
  	$(call descend,power/x86/$(@:_clean=),clean)
2363ecb17   Borislav Petkov   tools: Add a topl...
136

94f69966f   Jacob Pan   tools/thermal: In...
137
138
  tmon_clean:
  	$(call descend,thermal/tmon,clean)
b3fd7368f   Pali Rohár   Move freefall pro...
139
140
  freefall_clean:
  	$(call descend,laptop/freefall,clean)
2f5a7f1d1   Jiri Olsa   tools: Add clean ...
141
142
  build_clean:
  	$(call descend,build,clean)
3eb2094c5   Bjarke Istrup Pedersen   Adding makefile f...
143
  clean: acpi_clean cgroup_clean cpupower_clean hv_clean firewire_clean lguest_clean \
5eca4d843   Joshua Clayton   spi: Move spi cod...
144
  		perf_clean selftests_clean turbostat_clean spi_clean usb_clean virtio_clean \
23908db41   Linus Torvalds   Merge tag 'stagin...
145
  		vm_clean net_clean iio_clean x86_energy_perf_policy_clean tmon_clean \
6d591c46b   Linus Walleij   tools/gpio: creat...
146
  		freefall_clean build_clean libbpf_clean libsubcmd_clean liblockdep_clean \
26660a404   Linus Torvalds   Merge branch 'cor...
147
  		gpio_clean objtool_clean
2363ecb17   Borislav Petkov   tools: Add a topl...
148
149
  
  .PHONY: FORCE