Merge tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
[linux-2.6-block.git] / tools / Makefile
CommitLineData
16671c1e
JO
1# Some of the tools (perf) use same make variables
2# as in kernel build.
3export srctree=
4export objtree=
5
2363ecb1
BP
6include scripts/Makefile.include
7
d5dd8afb
BP
8help:
9 @echo 'Possible targets:'
10 @echo ''
20a7add8
JP
11 @echo ' acpi - ACPI tools'
12 @echo ' cgroup - cgroup tools'
13 @echo ' cpupower - a tool for all things x86 CPU power'
14 @echo ' firewire - the userspace part of nosy, an IEEE-1394 traffic sniffer'
15 @echo ' freefall - laptop accelerometer program for disk protection'
6d591c46 16 @echo ' gpio - GPIO tools'
20a7add8
JP
17 @echo ' hv - tools used when in Hyper-V clients'
18 @echo ' iio - IIO tools'
19 @echo ' lguest - a minimal 32-bit x86 hypervisor'
20 @echo ' net - misc networking tools'
21 @echo ' perf - Linux performance measurement and analysis tool'
22 @echo ' selftests - various kernel selftests'
747a9b0a 23 @echo ' spi - spi tools'
20a7add8
JP
24 @echo ' tmon - thermal monitoring and tuning tool'
25 @echo ' turbostat - Intel CPU idle stats and freq reporting tool'
26 @echo ' usb - USB testing tools'
27 @echo ' virtio - vhost test module'
28 @echo ' vm - misc vm tools'
d5dd8afb
BP
29 @echo ' x86_energy_perf_policy - Intel energy policy tool'
30 @echo ''
ea01fa9f 31 @echo 'You can do:'
7e010562 32 @echo ' $$ make -C tools/ <tool>_install'
ea01fa9f
BP
33 @echo ''
34 @echo ' from the kernel command line to build and install one of'
35 @echo ' the tools above'
36 @echo ''
f6ba98c5
KM
37 @echo ' $$ make tools/all'
38 @echo ''
39 @echo ' builds all tools.'
40 @echo ''
ea01fa9f
BP
41 @echo ' $$ make tools/install'
42 @echo ''
43 @echo ' installs all tools.'
44 @echo ''
d5dd8afb
BP
45 @echo 'Cleaning targets:'
46 @echo ''
47 @echo ' all of the above with the "_clean" string appended cleans'
48 @echo ' the respective build directory.'
49 @echo ' clean: a summary clean target to clean _all_ folders'
50
a0c4acc0
LZ
51acpi: FORCE
52 $(call descend,power/$@)
53
2363ecb1 54cpupower: FORCE
ca9dfc6c 55 $(call descend,power/$@)
2363ecb1 56
6d591c46 57cgroup firewire hv guest spi usb virtio vm net iio gpio: FORCE
85c66be1
BP
58 $(call descend,$@)
59
0041898e
LC
60liblockdep: FORCE
61 $(call descend,lib/lockdep)
62
379a9a28 63libapi: FORCE
553873e1 64 $(call descend,lib/api)
85c66be1 65
16671c1e
JO
66# The perf build does not follow the descend function setup,
67# invoking it via it's own make rule.
68PERF_O = $(if $(O),$(O)/tools/perf,)
69
379a9a28 70perf: FORCE
16671c1e
JO
71 $(Q)mkdir -p $(PERF_O) .
72 $(Q)$(MAKE) --no-print-directory -C perf O=$(PERF_O) subdir=
2363ecb1
BP
73
74selftests: FORCE
ca9dfc6c 75 $(call descend,testing/$@)
2363ecb1
BP
76
77turbostat x86_energy_perf_policy: FORCE
ca9dfc6c 78 $(call descend,power/x86/$@)
2363ecb1 79
94f69966
JP
80tmon: FORCE
81 $(call descend,thermal/$@)
82
b3fd7368
PR
83freefall: FORCE
84 $(call descend,laptop/$@)
85
f6ba98c5
KM
86all: acpi cgroup cpupower hv firewire lguest \
87 perf selftests turbostat usb \
88 virtio vm net x86_energy_perf_policy \
89 tmon freefall
90
a0c4acc0
LZ
91acpi_install:
92 $(call descend,power/$(@:_install=),install)
93
2363ecb1 94cpupower_install:
ca9dfc6c 95 $(call descend,power/$(@:_install=),install)
2363ecb1 96
3eb2094c 97cgroup_install firewire_install hv_install lguest_install perf_install usb_install virtio_install vm_install net_install:
ca9dfc6c 98 $(call descend,$(@:_install=),install)
2363ecb1
BP
99
100selftests_install:
9a13c658 101 $(call descend,testing/$(@:_install=),install)
2363ecb1
BP
102
103turbostat_install x86_energy_perf_policy_install:
ca9dfc6c 104 $(call descend,power/x86/$(@:_install=),install)
2363ecb1 105
94f69966
JP
106tmon_install:
107 $(call descend,thermal/$(@:_install=),install)
108
b3fd7368
PR
109freefall_install:
110 $(call descend,laptop/$(@:_install=),install)
111
3eb2094c 112install: acpi_install cgroup_install cpupower_install hv_install firewire_install lguest_install \
92e015b1 113 perf_install selftests_install turbostat_install usb_install \
94f69966 114 virtio_install vm_install net_install x86_energy_perf_policy_install \
836d525b 115 tmon_install freefall_install
2363ecb1 116
a0c4acc0
LZ
117acpi_clean:
118 $(call descend,power/acpi,clean)
119
2363ecb1 120cpupower_clean:
ca9dfc6c 121 $(call descend,power/cpupower,clean)
2363ecb1 122
6d591c46 123cgroup_clean hv_clean firewire_clean lguest_clean spi_clean usb_clean virtio_clean vm_clean net_clean iio_clean gpio_clean:
85c66be1
BP
124 $(call descend,$(@:_clean=),clean)
125
0041898e
LC
126liblockdep_clean:
127 $(call descend,lib/lockdep,clean)
128
379a9a28 129libapi_clean:
553873e1 130 $(call descend,lib/api,clean)
85c66be1 131
2f5a7f1d
JO
132libbpf_clean:
133 $(call descend,lib/bpf,clean)
134
135libsubcmd_clean:
136 $(call descend,lib/subcmd,clean)
137
379a9a28 138perf_clean:
ca9dfc6c 139 $(call descend,$(@:_clean=),clean)
2363ecb1
BP
140
141selftests_clean:
ca9dfc6c 142 $(call descend,testing/$(@:_clean=),clean)
2363ecb1
BP
143
144turbostat_clean x86_energy_perf_policy_clean:
ca9dfc6c 145 $(call descend,power/x86/$(@:_clean=),clean)
2363ecb1 146
94f69966
JP
147tmon_clean:
148 $(call descend,thermal/tmon,clean)
149
b3fd7368
PR
150freefall_clean:
151 $(call descend,laptop/freefall,clean)
152
2f5a7f1d
JO
153build_clean:
154 $(call descend,build,clean)
155
3eb2094c 156clean: acpi_clean cgroup_clean cpupower_clean hv_clean firewire_clean lguest_clean \
5eca4d84 157 perf_clean selftests_clean turbostat_clean spi_clean usb_clean virtio_clean \
23908db4 158 vm_clean net_clean iio_clean x86_energy_perf_policy_clean tmon_clean \
6d591c46
LW
159 freefall_clean build_clean libbpf_clean libsubcmd_clean liblockdep_clean \
160 gpio_clean
2363ecb1
BP
161
162.PHONY: FORCE