4 HELP+="all - Builds basic programs and prints message about next steps.\n"
6 all: parse_kconfig write_config allconfig picosat initram_cyclictest
10 @echo " help - Prints this text"
13 HELP+="psql - Launch PostgreSQL interactive terminal.\n"
16 PGPASSWORD="$(CONF_DB_PASSWORD)" psql -d "$(CONF_DB_DATABASE)" -h "$(CONF_DB_HOST)" -p "$(CONF_DB_PORT)"
20 $(MAKE) -C tests/cyclictest/root/ menuconfig
22 HELP+="mlinux - Calls 'make menuconfig' in Linux folder. Use this for Linux\n"
23 HELP+=" configuration.\n"
26 ARCH=$(CONF_KERNEL_ARCH) $(MAKE) -C $(CONF_LINUX_SOURCES) menuconfig
28 HELP+="deflinux - Executes 'make menuconfig' in linux folder. This generates default\n"
29 HELP+=" linux configuration.\n"
32 ARCH=$(CONF_KERNEL_ARCH) $(MAKE) -C $(CONF_LINUX_SOURCES) defconfig
34 HELP+="dot_config - Generate dot_config file. This file is based on default Linux\n"
35 HELP+=" configuration.\n"
37 cd $(CONF_LINUX_SOURCES) && \
38 SRCARCH=$(CONF_KERNEL_ARCH) \
39 ARCH=$(CONF_KERNEL_ARCH) \
40 KERNELVERSION=$(CONF_KERNEL_ARCH) \
41 $(CONF_ABSROOT)/scripts/allconfig/allconfig \
42 Kconfig .config $(CONF_ABSROOT)/$(CONF_DOT_CONFIG)
44 HELP+="initialize - Executes only initialization.\n"
45 .PHONY: initialize init
50 HELP+="initdb - Initialize database.\n"
51 .PHONY: initdb initialize_database
52 initdb: initialize_database
54 PGPASSWORD="$(CONF_DB_PASSWORD)" psql -d "$(CONF_DB_DATABASE)" -h "$(CONF_DB_HOST)" -p "$(CONF_DB_PORT)" -f scripts/databaseinit.sql
56 HELP+="test - Executes boot and benchmark test. You should use this before\n"
57 HELP+=" target run. This target is for testing if initial kernel\n"
58 HELP+=" configuration, buildroot configuration and benchmark are\n"
59 HELP+=" configured right.\n"
61 test: parse_kconfig initram_cyclictest
64 HELP+="run - Executes loop of kernel building, booting and benchmark execution.\n"
75 HELP+="clean - Cleans all generated files. Except those in\n"
76 HELP+=" linux and buildroot.\n"
79 @$(MAKE) -C scripts/parse_kconfig clean
80 @$(MAKE) -C scripts/write_config clean
81 @$(MAKE) -C scripts/allconfig clean
82 @if [ -e scripts/picosat-959/makefile ]; then $(MAKE) -C scripts/picosat-959 clean; fi
86 HELP+="clean_measure - Removes working files used while measuring. After this,\n"
87 HELP+=" initializations has to be executed once again.\n"
90 $(RM) -r configurations
93 $(RM) $(CONF_DOT_CONFIG)
95 HELP+="clean_database - Drop all tables in database.\n"
96 .PHONY: cleandb clean_database
97 cleandb: clean_database
99 PGPASSWORD="$(CONF_DB_PASSWORD)" psql -d "$(CONF_DB_DATABASE)" -h "$(CONF_DB_HOST)" -p "$(CONF_DB_PORT)" -f scripts/databaseclean.sql
101 HELP+="distclean - Cleans all configurations and generated files.\n"
102 HELP+=" Including linux and buildroot.\n"
104 distclean: clean distclean_linux distclean_buildroot clean_measure
106 HELP+="clean_linux - Executes 'make clean' in linux folder.\n"
109 @$(MAKE) -C $(CONF_LINUX_SOURCES) clean
111 HELP+="distclean_linux - Executes 'make distclean' in linux folder.\n"
112 .PHONY: distclean_linux
114 @$(MAKE) -C $(CONF_LINUX_SOURCES) distclean
116 .PHONY: clean_buildroot
118 @$(MAKE) -C tests/cyclictest/root/ clean
120 .PHONY: distclean_buildroot
122 @$(MAKE) -C tests/cyclictest/root/ distclean
124 #######################################
126 .conf.mk: conf.py .target
130 $(error Please select target by writing it to .target file)
132 .PHONY: parse_kconfig
134 @if [ `$(MAKE) -C scripts/parse_kconfig/ -q; echo $$?` != "0" ]; then \
135 $(MAKE) -C scripts/parse_kconfig/; fi
139 @if [ `$(MAKE) -C scripts/write_config/ -q; echo $$?` != "0" ]; then \
140 $(MAKE) -C scripts/write_config/; fi
144 @if [ `$(MAKE) -C scripts/allconfig/ -q; echo $$?` != "0" ]; then \
145 $(MAKE) -C scripts/allconfig/; fi
149 @if [ ! -e scripts/picosat-959/makefile ]; then \
150 cd scripts/picosat-959 && ./configure; fi
151 @if [ `$(MAKE) -C scripts/picosat-959 -q; echo $$?` != "0" ]; then \
152 $(MAKE) -C scripts/picosat-959; fi
154 .PHONY: initram_cyclictest
156 @if [ `$(MAKE) -C tests/cyclictest/root/ -q; echo $$?` != "0" ]; then \
157 $(MAKE) -C scripts/cyclictest/root/; fi