]> rtime.felk.cvut.cz Git - linux-conf-perf.git/blob - Makefile
Fix ARCH env variable
[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 picosat init initialize permute
2
3 -include .conf.mk
4
5 all: parse_kconfig write_config permute picosat
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 "initialize  - Executes only initialization. Depending on configuration this"
17         @echo "              can take various amount of time."
18         @echo "test        - Executes boot and benchmark test. You should use this before"
19         @echo "              target run. This target is for testing if initial kernel"
20         @echo "              configuration, buildroot configuration and benchmark are"
21         @echo "              configured right."
22         @echo "run         - Executes loop of kernel building, booting and benchmark execution."
23         @echo "evaluate    - Creating result statistics from generated data."
24         @echo
25         @echo "clean               - Cleans all generated files. Except those in"
26         @echo "                      linux and buildroot."
27         @echo "distclean           - Cleans all configurations and generated files."
28         @echo "                      Including linux and buildroot."
29         @echo "clean_linux         - Executes 'make clean' in linux folder."
30         @echo "distclean_linux     - Executes 'make distclean' in linux folder."
31         @echo "clean_buildroot     - Executes 'make clean' in buildroot folder."
32         @echo "distclean_buildroot - Executes 'make distclean' in buildroot folder."
33
34 mbuildroot: buildroot/.config buildroot/system/skeleton/usr/bin/linux-conf-perf
35         $(MAKE) -C buildroot menuconfig
36
37 mlinux:
38         ARCH=$(ARCH) $(MAKE) -C linux menuconfig
39
40 deflinux:
41         ARCH=$(ARCH) $(MAKE) -C linux defconfig
42
43 init: initialize
44 initialize: parse_kconfig picosat
45         scripts/initialize.py
46
47 test: $(BUILDROOT_INITRAM) parse_kconfig
48         scripts/test.py
49
50 run: parse_kconfig write_config picosat $(BUILDROOT_INITRAM)
51         scripts/loop.py
52
53 evaluate:
54         @ #TODO
55
56 clean:
57         @$(MAKE) -C scripts/parse_kconfig clean
58         @$(MAKE) -C scripts/write_config clean
59         @if [ -e scripts/picosat-959/makefile ]; then $(MAKE) -C scripts/picosat-959 clean; fi
60         $(RM) .conf.mk
61         $(RM) -r jobfiles
62         $(RM) $(NBSCRIPT)
63
64 distclean: clean distclean_linux distclean_buildroot
65         $(RM) .conf.mk
66
67 clean_linux:
68         @$(MAKE) -C linux clean
69
70 distclean_linux:
71         @$(MAKE) -C linux distclean
72
73 clean_buildroot:
74         @$(MAKE) -C scripts/buildroot clean
75
76 distclean_buildroot:
77         @$(MAKE) -C scripts/buildroot distclean
78
79 #######################################
80
81 .conf.mk: conf.py
82         scripts/confmk.py
83
84 parse_kconfig:
85         @$(MAKE) -C scripts/parse_kconfig/
86
87 write_config:
88         @$(MAKE) -C scripts/write_config/
89
90 permute:
91         @$(MAKE) -C scripts/permute/
92
93 $(BUILDROOT_INITRAM): buildroot/.config buildroot/system/skeleton/usr/bin/linux-conf-perf
94         @$(MAKE) -C scripts/buildroot
95
96 buildroot/.config:
97         cp $(BUILDROOT_DEF_CONFIG) $@
98
99 buildroot/system/skeleton/usr/bin/linux-conf-perf:
100         cp $(BUILDROOT_INITSCRIPT) $@
101         cat $(BUILDROOT_INITTAB_DIRECTIVE) >> buildroot/system/skeleton/etc/inittab
102
103 picosat: scripts/picosat-959/picosat
104 scripts/picosat-959/picosat:
105         cd scripts/picosat-959 && ./configure
106         $(MAKE) -C scripts/picosat-959
107
108 #######################################
109
110 $(PHASE_FILE): initialize
111 $(SYMBOL_MAP_FILE): initialize
112 $(RULES_FILE): initialize
113 $(VARIABLE_COUNT_FILE): initialize