]> rtime.felk.cvut.cz Git - linux-conf-perf.git/blob - Makefile
Add buildroot default .config
[linux-conf-perf.git] / Makefile
1 .PHONY: all help parse_kconfig write_config build run test clean clean_linux clean_buildroot mlinux mbuildroot deflinux distclean_linux distclean_buildroot distclean
2
3 -include .conf.mk
4
5 all: parse_kconfig write_config
6
7 help:
8         @echo "all         - Builds basic programs and prints message about next steps."
9         @echo "help        - Prints this text"
10         @echo "mbuildroot  - Calls 'make menuconfig' in buildroot folder. Use this for"
11         @echo "              buildroot configuration."
12         @echo "mlinux      - Calls 'make menuconfig' in linux folder. Use this for linux"
13         @echo "              configuration."
14         @echo "deflinux    - Executes 'make defconfig' in linux folder. This generates default"
15         @echo "              linux configuration for architecture specified in conf.py"
16         @echo "test        - Executes boot and benchmark test. You should use this before"
17         @echo "              target run. This target is for testing if initial kernel"
18         @echo "              configuration, buildroot configuration and benchmark are"
19         @echo "              configured right."
20         @echo "run         - Executes loop of kernel building, booting and benchmark execution."
21         @echo "evaluate    - Creating result statistics from generated data."
22         @echo
23         @echo "clean           - Cleans all generated files. Except those in linux and buildroot."
24         @echo "clean_linux     - Executes 'make clean' in linux folder."
25         @echo "clean_buildroot - Executes 'make clean' in buildroot folder."
26
27 mbuildroot: scripts/buildroot/.config
28         $(MAKE) -C scripts/buildroot menuconfig
29
30 mlinux:
31         ARCH=$(SRCARCH) $(MAKE) -C linux menuconfig
32
33 deflinux:
34         ARCH=$(SRCARCH) $(MAKE) -C linux defconfig
35
36 test: $(INITRAM)
37         @ #TODO
38
39 run: kconfig_parser write_config $(INITRAM)
40         scripts/main_loop.py
41
42 evaluate:
43         @ #TODO
44
45 clean:
46         @$(MAKE) -C scripts/parse_kconfig/ clean
47         @$(MAKE) -C scripts/write_config/ clean
48         $(RM) -r build
49
50 distclean: clean distclean_linux distclean_buildroot
51         $(RM) .conf.mk
52
53 clean_linux:
54         @$(MAKE) -C linux clean
55
56 distclean_linux:
57         @$(MAKE) -C linux distclean
58
59 clean_buildroot:
60         @$(MAKE) -C scripts/buildroot clean
61
62 distclean_buildroot:
63         @$(MAKE) -C scripts/buildroot distclean
64
65 #######################################
66
67 .conf.mk: conf.py
68         scripts/confmk.py
69
70 parse_kconfig:
71         @$(MAKE) -C scripts/parse_kconfig/
72
73 write_config:
74         @$(MAKE) -C scripts/write_config/
75
76 %:
77         mkdir -p $@
78
79 $(BUILDROOT_INITRAM): scripts/buildroot/.config
80         @$(MAKE) -C scripts/buildroot
81
82 $(INITRAM): $(BUILDROOT_INITRAM) $${@D}
83         mv $^ $@
84
85 scripts/buildroot/.config:
86         cp $(BUILDROOT_DEF_CONFIG) $@