drivers/input: eliminate INPUT_COMPAT_TEST macro
[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'
442f04c3 24 @echo ' objtool - an ELF object analysis tool'
20a7add8
JP
25 @echo ' tmon - thermal monitoring and tuning tool'
26 @echo ' turbostat - Intel CPU idle stats and freq reporting tool'
27 @echo ' usb - USB testing tools'
28 @echo ' virtio - vhost test module'
29 @echo ' vm - misc vm tools'
d5dd8afb
BP
30 @echo ' x86_energy_perf_policy - Intel energy policy tool'
31 @echo ''
ea01fa9f 32 @echo 'You can do:'
7e010562 33 @echo ' $$ make -C tools/ <tool>_install'
ea01fa9f
BP
34 @echo ''
35 @echo ' from the kernel command line to build and install one of'
36 @echo ' the tools above'
37 @echo ''
f6ba98c5
KM
38 @echo ' $$ make tools/all'
39 @echo ''
40 @echo ' builds all tools.'
41 @echo ''
ea01fa9f
BP
42 @echo ' $$ make tools/install'
43 @echo ''
44 @echo ' installs all tools.'
45 @echo ''
d5dd8afb
BP
46 @echo 'Cleaning targets:'
47 @echo ''
48 @echo ' all of the above with the "_clean" string appended cleans'
49 @echo ' the respective build directory.'
50 @echo ' clean: a summary clean target to clean _all_ folders'
51
a0c4acc0
LZ
52acpi: FORCE
53 $(call descend,power/$@)
54
2363ecb1 55cpupower: FORCE
ca9dfc6c 56 $(call descend,power/$@)
2363ecb1 57
26660a40 58cgroup firewire hv guest spi usb virtio vm net iio gpio objtool: FORCE
85c66be1
BP
59 $(call descend,$@)
60
0041898e
LC
61liblockdep: FORCE
62 $(call descend,lib/lockdep)
63
379a9a28 64libapi: FORCE
553873e1 65 $(call descend,lib/api)
85c66be1 66
16671c1e
JO
67# The perf build does not follow the descend function setup,
68# invoking it via it's own make rule.
69PERF_O = $(if $(O),$(O)/tools/perf,)
70
379a9a28 71perf: FORCE
16671c1e
JO
72 $(Q)mkdir -p $(PERF_O) .
73 $(Q)$(MAKE) --no-print-directory -C perf O=$(PERF_O) subdir=
2363ecb1
BP
74
75selftests: FORCE
ca9dfc6c 76 $(call descend,testing/$@)
2363ecb1
BP
77
78turbostat x86_energy_perf_policy: FORCE
ca9dfc6c 79 $(call descend,power/x86/$@)
2363ecb1 80
94f69966
JP
81tmon: FORCE
82 $(call descend,thermal/$@)
83
b3fd7368
PR
84freefall: FORCE
85 $(call descend,laptop/$@)
86
f6ba98c5
KM
87all: acpi cgroup cpupower hv firewire lguest \
88 perf selftests turbostat usb \
89 virtio vm net x86_energy_perf_policy \
442f04c3 90 tmon freefall objtool
f6ba98c5 91
a0c4acc0
LZ
92acpi_install:
93 $(call descend,power/$(@:_install=),install)
94
2363ecb1 95cpupower_install:
ca9dfc6c 96 $(call descend,power/$(@:_install=),install)
2363ecb1 97
442f04c3 98cgroup_install firewire_install hv_install lguest_install perf_install usb_install virtio_install vm_install net_install objtool_install:
ca9dfc6c 99 $(call descend,$(@:_install=),install)
2363ecb1
BP
100
101selftests_install:
9a13c658 102 $(call descend,testing/$(@:_install=),install)
2363ecb1
BP
103
104turbostat_install x86_energy_perf_policy_install:
ca9dfc6c 105 $(call descend,power/x86/$(@:_install=),install)
2363ecb1 106
94f69966
JP
107tmon_install:
108 $(call descend,thermal/$(@:_install=),install)
109
b3fd7368
PR
110freefall_install:
111 $(call descend,laptop/$(@:_install=),install)
112
3eb2094c 113install: acpi_install cgroup_install cpupower_install hv_install firewire_install lguest_install \
92e015b1 114 perf_install selftests_install turbostat_install usb_install \
94f69966 115 virtio_install vm_install net_install x86_energy_perf_policy_install \
442f04c3 116 tmon_install freefall_install objtool_install
2363ecb1 117
a0c4acc0
LZ
118acpi_clean:
119 $(call descend,power/acpi,clean)
120
2363ecb1 121cpupower_clean:
ca9dfc6c 122 $(call descend,power/cpupower,clean)
2363ecb1 123
26660a40 124cgroup_clean hv_clean firewire_clean lguest_clean spi_clean usb_clean virtio_clean vm_clean net_clean iio_clean gpio_clean objtool_clean:
85c66be1
BP
125 $(call descend,$(@:_clean=),clean)
126
0041898e
LC
127liblockdep_clean:
128 $(call descend,lib/lockdep,clean)
129
379a9a28 130libapi_clean:
553873e1 131 $(call descend,lib/api,clean)
85c66be1 132
2f5a7f1d
JO
133libbpf_clean:
134 $(call descend,lib/bpf,clean)
135
136libsubcmd_clean:
137 $(call descend,lib/subcmd,clean)
138
379a9a28 139perf_clean:
ca9dfc6c 140 $(call descend,$(@:_clean=),clean)
2363ecb1
BP
141
142selftests_clean:
ca9dfc6c 143 $(call descend,testing/$(@:_clean=),clean)
2363ecb1
BP
144
145turbostat_clean x86_energy_perf_policy_clean:
ca9dfc6c 146 $(call descend,power/x86/$(@:_clean=),clean)
2363ecb1 147
94f69966
JP
148tmon_clean:
149 $(call descend,thermal/tmon,clean)
150
b3fd7368
PR
151freefall_clean:
152 $(call descend,laptop/freefall,clean)
153
2f5a7f1d
JO
154build_clean:
155 $(call descend,build,clean)
156
3eb2094c 157clean: acpi_clean cgroup_clean cpupower_clean hv_clean firewire_clean lguest_clean \
5eca4d84 158 perf_clean selftests_clean turbostat_clean spi_clean usb_clean virtio_clean \
23908db4 159 vm_clean net_clean iio_clean x86_energy_perf_policy_clean tmon_clean \
6d591c46 160 freefall_clean build_clean libbpf_clean libsubcmd_clean liblockdep_clean \
26660a40 161 gpio_clean objtool_clean
2363ecb1
BP
162
163.PHONY: FORCE