Back to home page

LXR

 
 

    


0001 # Some of the tools (perf) use same make variables
0002 # as in kernel build.
0003 export srctree=
0004 export objtree=
0005 
0006 include scripts/Makefile.include
0007 
0008 help:
0009         @echo 'Possible targets:'
0010         @echo ''
0011         @echo '  acpi                   - ACPI tools'
0012         @echo '  cgroup                 - cgroup tools'
0013         @echo '  cpupower               - a tool for all things x86 CPU power'
0014         @echo '  firewire               - the userspace part of nosy, an IEEE-1394 traffic sniffer'
0015         @echo '  freefall               - laptop accelerometer program for disk protection'
0016         @echo '  gpio                   - GPIO tools'
0017         @echo '  hv                     - tools used when in Hyper-V clients'
0018         @echo '  iio                    - IIO tools'
0019         @echo '  kvm_stat               - top-like utility for displaying kvm statistics'
0020         @echo '  leds                   - LEDs  tools'
0021         @echo '  lguest                 - a minimal 32-bit x86 hypervisor'
0022         @echo '  net                    - misc networking tools'
0023         @echo '  perf                   - Linux performance measurement and analysis tool'
0024         @echo '  selftests              - various kernel selftests'
0025         @echo '  spi                    - spi tools'
0026         @echo '  objtool                - an ELF object analysis tool'
0027         @echo '  tmon                   - thermal monitoring and tuning tool'
0028         @echo '  turbostat              - Intel CPU idle stats and freq reporting tool'
0029         @echo '  usb                    - USB testing tools'
0030         @echo '  virtio                 - vhost test module'
0031         @echo '  vm                     - misc vm tools'
0032         @echo '  x86_energy_perf_policy - Intel energy policy tool'
0033         @echo ''
0034         @echo 'You can do:'
0035         @echo ' $$ make -C tools/ <tool>_install'
0036         @echo ''
0037         @echo '  from the kernel command line to build and install one of'
0038         @echo '  the tools above'
0039         @echo ''
0040         @echo '  $$ make tools/all'
0041         @echo ''
0042         @echo '  builds all tools.'
0043         @echo ''
0044         @echo '  $$ make tools/install'
0045         @echo ''
0046         @echo '  installs all tools.'
0047         @echo ''
0048         @echo 'Cleaning targets:'
0049         @echo ''
0050         @echo '  all of the above with the "_clean" string appended cleans'
0051         @echo '    the respective build directory.'
0052         @echo '  clean: a summary clean target to clean _all_ folders'
0053 
0054 acpi: FORCE
0055         $(call descend,power/$@)
0056 
0057 cpupower: FORCE
0058         $(call descend,power/$@)
0059 
0060 cgroup firewire hv guest spi usb virtio vm net iio gpio objtool leds: FORCE
0061         $(call descend,$@)
0062 
0063 liblockdep: FORCE
0064         $(call descend,lib/lockdep)
0065 
0066 libapi: FORCE
0067         $(call descend,lib/api)
0068 
0069 # The perf build does not follow the descend function setup,
0070 # invoking it via it's own make rule.
0071 PERF_O   = $(if $(O),$(O)/tools/perf,)
0072 
0073 perf: FORCE
0074         $(Q)mkdir -p $(PERF_O) .
0075         $(Q)$(MAKE) --no-print-directory -C perf O=$(PERF_O) subdir=
0076 
0077 selftests: FORCE
0078         $(call descend,testing/$@)
0079 
0080 turbostat x86_energy_perf_policy: FORCE
0081         $(call descend,power/x86/$@)
0082 
0083 tmon: FORCE
0084         $(call descend,thermal/$@)
0085 
0086 freefall: FORCE
0087         $(call descend,laptop/$@)
0088 
0089 all: acpi cgroup cpupower gpio hv firewire lguest \
0090                 perf selftests turbostat usb \
0091                 virtio vm net x86_energy_perf_policy \
0092                 tmon freefall objtool
0093 
0094 acpi_install:
0095         $(call descend,power/$(@:_install=),install)
0096 
0097 cpupower_install:
0098         $(call descend,power/$(@:_install=),install)
0099 
0100 cgroup_install firewire_install gpio_install hv_install lguest_install perf_install usb_install virtio_install vm_install net_install objtool_install:
0101         $(call descend,$(@:_install=),install)
0102 
0103 selftests_install:
0104         $(call descend,testing/$(@:_install=),install)
0105 
0106 turbostat_install x86_energy_perf_policy_install:
0107         $(call descend,power/x86/$(@:_install=),install)
0108 
0109 tmon_install:
0110         $(call descend,thermal/$(@:_install=),install)
0111 
0112 freefall_install:
0113         $(call descend,laptop/$(@:_install=),install)
0114 
0115 kvm_stat_install:
0116         $(call descend,kvm/$(@:_install=),install)
0117 
0118 install: acpi_install cgroup_install cpupower_install gpio_install \
0119                 hv_install firewire_install lguest_install \
0120                 perf_install selftests_install turbostat_install usb_install \
0121                 virtio_install vm_install net_install x86_energy_perf_policy_install \
0122                 tmon_install freefall_install objtool_install kvm_stat_install
0123 
0124 acpi_clean:
0125         $(call descend,power/acpi,clean)
0126 
0127 cpupower_clean:
0128         $(call descend,power/cpupower,clean)
0129 
0130 cgroup_clean hv_clean firewire_clean lguest_clean spi_clean usb_clean virtio_clean vm_clean net_clean iio_clean gpio_clean objtool_clean leds_clean:
0131         $(call descend,$(@:_clean=),clean)
0132 
0133 liblockdep_clean:
0134         $(call descend,lib/lockdep,clean)
0135 
0136 libapi_clean:
0137         $(call descend,lib/api,clean)
0138 
0139 libbpf_clean:
0140         $(call descend,lib/bpf,clean)
0141 
0142 libsubcmd_clean:
0143         $(call descend,lib/subcmd,clean)
0144 
0145 perf_clean:
0146         $(Q)mkdir -p $(PERF_O) .
0147         $(Q)$(MAKE) --no-print-directory -C perf O=$(PERF_O) subdir= clean
0148 
0149 selftests_clean:
0150         $(call descend,testing/$(@:_clean=),clean)
0151 
0152 turbostat_clean x86_energy_perf_policy_clean:
0153         $(call descend,power/x86/$(@:_clean=),clean)
0154 
0155 tmon_clean:
0156         $(call descend,thermal/tmon,clean)
0157 
0158 freefall_clean:
0159         $(call descend,laptop/freefall,clean)
0160 
0161 build_clean:
0162         $(call descend,build,clean)
0163 
0164 clean: acpi_clean cgroup_clean cpupower_clean hv_clean firewire_clean lguest_clean \
0165                 perf_clean selftests_clean turbostat_clean spi_clean usb_clean virtio_clean \
0166                 vm_clean net_clean iio_clean x86_energy_perf_policy_clean tmon_clean \
0167                 freefall_clean build_clean libbpf_clean libsubcmd_clean liblockdep_clean \
0168                 gpio_clean objtool_clean leds_clean
0169 
0170 .PHONY: FORCE