Merge tag 'driver-core-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...
[GitHub/LineageOS/android_kernel_motorola_exynos9610.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 ''
a0c4acc0 11 @echo ' acpi - ACPI tools'
92e015b1 12 @echo ' cgroup - cgroup tools'
d5dd8afb
BP
13 @echo ' cpupower - a tool for all things x86 CPU power'
14 @echo ' firewire - the userspace part of nosy, an IEEE-1394 traffic sniffer'
3eb2094c 15 @echo ' hv - tools used when in Hyper-V clients'
d5dd8afb
BP
16 @echo ' lguest - a minimal 32-bit x86 hypervisor'
17 @echo ' perf - Linux performance measurement and analysis tool'
18 @echo ' selftests - various kernel selftests'
19 @echo ' turbostat - Intel CPU idle stats and freq reporting tool'
20 @echo ' usb - USB testing tools'
21 @echo ' virtio - vhost test module'
e306e2c1 22 @echo ' net - misc networking tools'
d5dd8afb
BP
23 @echo ' vm - misc vm tools'
24 @echo ' x86_energy_perf_policy - Intel energy policy tool'
94f69966 25 @echo ' tmon - thermal monitoring and tuning tool'
b3fd7368 26 @echo ' freefall - laptop accelerometer program for disk protection'
d5dd8afb 27 @echo ''
ea01fa9f 28 @echo 'You can do:'
7e010562 29 @echo ' $$ make -C tools/ <tool>_install'
ea01fa9f
BP
30 @echo ''
31 @echo ' from the kernel command line to build and install one of'
32 @echo ' the tools above'
33 @echo ''
34 @echo ' $$ make tools/install'
35 @echo ''
36 @echo ' installs all tools.'
37 @echo ''
d5dd8afb
BP
38 @echo 'Cleaning targets:'
39 @echo ''
40 @echo ' all of the above with the "_clean" string appended cleans'
41 @echo ' the respective build directory.'
42 @echo ' clean: a summary clean target to clean _all_ folders'
43
a0c4acc0
LZ
44acpi: FORCE
45 $(call descend,power/$@)
46
2363ecb1 47cpupower: FORCE
ca9dfc6c 48 $(call descend,power/$@)
2363ecb1 49
3eb2094c 50cgroup firewire hv guest usb virtio vm net: FORCE
85c66be1
BP
51 $(call descend,$@)
52
0041898e
LC
53liblockdep: FORCE
54 $(call descend,lib/lockdep)
55
379a9a28 56libapi: FORCE
553873e1 57 $(call descend,lib/api)
85c66be1 58
16671c1e
JO
59# The perf build does not follow the descend function setup,
60# invoking it via it's own make rule.
61PERF_O = $(if $(O),$(O)/tools/perf,)
62
379a9a28 63perf: FORCE
16671c1e
JO
64 $(Q)mkdir -p $(PERF_O) .
65 $(Q)$(MAKE) --no-print-directory -C perf O=$(PERF_O) subdir=
2363ecb1
BP
66
67selftests: FORCE
ca9dfc6c 68 $(call descend,testing/$@)
2363ecb1
BP
69
70turbostat x86_energy_perf_policy: FORCE
ca9dfc6c 71 $(call descend,power/x86/$@)
2363ecb1 72
94f69966
JP
73tmon: FORCE
74 $(call descend,thermal/$@)
75
b3fd7368
PR
76freefall: FORCE
77 $(call descend,laptop/$@)
78
a0c4acc0
LZ
79acpi_install:
80 $(call descend,power/$(@:_install=),install)
81
2363ecb1 82cpupower_install:
ca9dfc6c 83 $(call descend,power/$(@:_install=),install)
2363ecb1 84
3eb2094c 85cgroup_install firewire_install hv_install lguest_install perf_install usb_install virtio_install vm_install net_install:
ca9dfc6c 86 $(call descend,$(@:_install=),install)
2363ecb1
BP
87
88selftests_install:
ca9dfc6c 89 $(call descend,testing/$(@:_clean=),install)
2363ecb1
BP
90
91turbostat_install x86_energy_perf_policy_install:
ca9dfc6c 92 $(call descend,power/x86/$(@:_install=),install)
2363ecb1 93
94f69966
JP
94tmon_install:
95 $(call descend,thermal/$(@:_install=),install)
96
b3fd7368
PR
97freefall_install:
98 $(call descend,laptop/$(@:_install=),install)
99
3eb2094c 100install: acpi_install cgroup_install cpupower_install hv_install firewire_install lguest_install \
92e015b1 101 perf_install selftests_install turbostat_install usb_install \
94f69966 102 virtio_install vm_install net_install x86_energy_perf_policy_install \
b3fd7368 103 tmon freefall_install
2363ecb1 104
a0c4acc0
LZ
105acpi_clean:
106 $(call descend,power/acpi,clean)
107
2363ecb1 108cpupower_clean:
ca9dfc6c 109 $(call descend,power/cpupower,clean)
2363ecb1 110
3eb2094c 111cgroup_clean hv_clean firewire_clean lguest_clean usb_clean virtio_clean vm_clean net_clean:
85c66be1
BP
112 $(call descend,$(@:_clean=),clean)
113
0041898e
LC
114liblockdep_clean:
115 $(call descend,lib/lockdep,clean)
116
379a9a28 117libapi_clean:
553873e1 118 $(call descend,lib/api,clean)
85c66be1 119
379a9a28 120perf_clean:
ca9dfc6c 121 $(call descend,$(@:_clean=),clean)
2363ecb1
BP
122
123selftests_clean:
ca9dfc6c 124 $(call descend,testing/$(@:_clean=),clean)
2363ecb1
BP
125
126turbostat_clean x86_energy_perf_policy_clean:
ca9dfc6c 127 $(call descend,power/x86/$(@:_clean=),clean)
2363ecb1 128
94f69966
JP
129tmon_clean:
130 $(call descend,thermal/tmon,clean)
131
b3fd7368
PR
132freefall_clean:
133 $(call descend,laptop/freefall,clean)
134
3eb2094c 135clean: acpi_clean cgroup_clean cpupower_clean hv_clean firewire_clean lguest_clean \
a0c4acc0 136 perf_clean selftests_clean turbostat_clean usb_clean virtio_clean \
b3fd7368 137 vm_clean net_clean x86_energy_perf_policy_clean tmon_clean freefall_clean
2363ecb1
BP
138
139.PHONY: FORCE