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