Merge branch 'dfsg_clean'
[ltp-debian.git] / testcases / kernel / controllers / Makefile
blob4c3824a98a4b2935abe9bff592c2223a0c792684
1 #define false guards, so we compile everything
2 CHECK_CGROUP = cgroup
3 CHECK_MEMCTL = memory
4 CHECK_BLOCKIOCTL= blockio
5 CHECK_FREEZER = freezer
6 CHECK_CPUCTL = cpuctl
7 CHECK_CPUSETCTL = cpuset
8 all:
9 @set -e;
11 ifeq ($(CHECK_CGROUP),cgroup)
12 SUBDIRS += cgroup
13 else
14 $(info "Kernel is not compiled with control cgroup support")
15 endif
17 ifeq ($(CHECK_MEMCTL),memory)
18 SUBDIRS += memcg
19 else
20 $(info "Kernel is not compiled with memory resource controller support")
21 endif
23 ifeq ($(CHECK_CPUCTL),cpu)
24 SUBDIRS += cpuctl
25 else
26 $(info "Kernel is not compiled with cpu controller support")
27 endif
28 ifeq ($(CHECK_MEMCTL),memory)
29 SUBDIRS += memctl
30 else
31 $(info "Kernel is not compiled with memory resource controller support")
32 endif
33 ifeq ($(CHECK_BLOCKIOCTL),blockio)
34 SUBDIRS += io-throttle
35 else
36 $(info "Kernel is not compiled with blockio resource controller support")
37 endif
38 ifeq ($(CHECK_FREEZER),freezer)
39 SUBDIRS += freezer
40 else
41 $(info "Kernel is not compiled with cgroup freezer support")
42 endif
43 ifeq ($(CHECK_CPUSETCTL),cpuset)
44 SUBDIRS += cpuset
45 else
46 $(info "Kernel is not compiled with cpuset resource controller support")
47 endif
49 # If at least one of the controllers is available then build libcontrollers.
50 ifneq ($(SUBDIRS),)
51 SUBDIRS := libcontrollers $(SUBDIRS)
52 endif
54 .PHONY: all install clean
56 all:
57 @set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i $@ ; done
59 install: test_controllers.sh
60 @chmod ugo+x test_controllers.sh
61 @ln -f test_controllers.sh ../../bin/test_controllers.sh
62 @set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i $@ ; done
64 clean:
65 @set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i $@ ; done