3 include .stamp/empty # This creates the .stamp directory
5 HELPER_PROGRAMS = scripts/parse_kconfig/parse \
6 scripts/write_config/write_config \
7 scripts/allconfig/allconfig \
8 scripts/picosat-959/picosat
10 HELP+="all - Builds basic programs and prints message about next steps.\n"
12 all: $(HELPER_PROGRAMS) .stamp/initram_cyclictest
13 mkdir -p $(CONF_LOG_FOLDER)
14 mkdir -p $(CONF_BUILD_FOLDER)
18 @echo " help - Prints this text"
21 HELP+="psql - Launch PostgreSQL interactive terminal.\n"
24 PGPASSWORD="$(CONF_DB_PASSWORD)" psql -d "$(CONF_DB_DATABASE)" -h "$(CONF_DB_HOST)" -p "$(CONF_DB_PORT)"
28 $(MAKE) -C tests/cyclictest/root/ menuconfig
30 HELP+="mlinux - Calls 'make menuconfig' in Linux folder. Use this for Linux\n"
31 HELP+=" configuration.\n"
34 ARCH=$(CONF_KERNEL_ARCH) $(MAKE) -C $(CONF_LINUX_SOURCES) menuconfig
36 HELP+="deflinux - Executes 'make defconfig' in linux folder. This generates default\n"
37 HELP+=" linux configuration.\n"
40 ARCH=$(CONF_KERNEL_ARCH) $(MAKE) -C $(CONF_LINUX_SOURCES) defconfig
42 HELP+="dot_config - Generate dot_config file. This file is based on default Linux\n"
43 HELP+=" configuration.\n"
44 $(CONF_DOT_CONFIG): .conf.mk scripts/allconfig/allconfig $(CONF_LINUX_BUILD_FOLDER)/.config
45 scripts/allconfig/allconfig --env .conf.mk $(CONF_LINUX_SOURCES)/Kconfig $(CONF_LINUX_BUILD_FOLDER)/.config $@
47 HELP+="initialize - Executes only initialization.\n"
48 .PHONY: initialize init
53 HELP+="initdb - Initialize database.\n"
54 .PHONY: initdb initialize_database
55 initdb: initialize_database
57 PGPASSWORD="$(CONF_DB_PASSWORD)" psql -d "$(CONF_DB_DATABASE)" -h "$(CONF_DB_HOST)" -p "$(CONF_DB_PORT)" -f scripts/databaseinit.sql
59 HELP+="test - Executes boot and benchmark test. You should use this before\n"
60 HELP+=" target run. This target is for testing if initial kernel\n"
61 HELP+=" configuration, buildroot configuration and benchmark are\n"
62 HELP+=" configured right.\n"
64 test: scripts/parse_kconfig/parse .stamp/initram_cyclictest
67 HELP+="run - Executes loop of kernel building, booting and benchmark execution.\n"
69 run: all $(CONF_BUILD_FOLDER)/rules $(CONF_BUILD_FOLDER)/fixed
70 ln -sf ../dot_measure $(CONF_BUILD_FOLDER)
73 $(CONF_BUILD_FOLDER)/rules $(CONF_BUILD_FOLDER)/symbol_map: .conf.mk $(CONF_LINUX_SOURCES)/Kconfig
74 scripts/parse_kconfig/parse -v --env .conf.mk $(CONF_LINUX_SOURCES)/Kconfig $(dir $@)
76 $(CONF_BUILD_FOLDER)/allconfig: .conf.mk $(CONF_LINUX_SOURCES)/Kconfig $(CONF_LINUX_BUILD_FOLDER)/.config
77 scripts/allconfig/allconfig --env .conf.mk $(CONF_LINUX_SOURCES)/Kconfig $(CONF_LINUX_BUILD_FOLDER)/.config $@
79 $(CONF_BUILD_FOLDER)/fixed $(CONF_BUILD_FOLDER)/measure: .conf.mk $(CONF_BUILD_FOLDER)/allconfig dot_measure
80 scripts/gen_fixed.py $(CONF_BUILD_FOLDER)/allconfig dot_measure
88 HELP+="clean - Cleans all generated files. Except those in\n"
89 HELP+=" linux and buildroot.\n"
92 @$(MAKE) -C scripts/parse_kconfig clean
93 @$(MAKE) -C scripts/write_config clean
94 @$(MAKE) -C scripts/allconfig clean
95 @if [ -e scripts/picosat-959/makefile ]; then $(MAKE) -C scripts/picosat-959 clean; fi
99 HELP+="clean_measure - Removes working files used while measuring. After this,\n"
100 HELP+=" initializations has to be executed once again.\n"
101 .PHONY: clean_measure
103 $(RM) -r configurations
106 $(RM) $(CONF_DOT_CONFIG)
108 HELP+="clean_database - Drop all tables in database.\n"
109 .PHONY: cleandb clean_database
110 cleandb: clean_database
112 PGPASSWORD="$(CONF_DB_PASSWORD)" psql -d "$(CONF_DB_DATABASE)" -h "$(CONF_DB_HOST)" -p "$(CONF_DB_PORT)" -f scripts/databaseclean.sql
114 HELP+="distclean - Cleans all configurations and generated files.\n"
115 HELP+=" Including linux and buildroot.\n"
117 distclean: clean distclean_linux distclean_buildroot clean_measure
119 HELP+="clean_linux - Executes 'make clean' in linux folder.\n"
122 @$(MAKE) -C $(CONF_LINUX_SOURCES) clean
124 HELP+="distclean_linux - Executes 'make distclean' in linux folder.\n"
125 .PHONY: distclean_linux
127 @$(MAKE) -C $(CONF_LINUX_SOURCES) distclean
129 .PHONY: clean_buildroot
131 @$(MAKE) -C tests/cyclictest/root/ clean
133 .PHONY: distclean_buildroot
135 @$(MAKE) -C tests/cyclictest/root/ distclean
137 #######################################
139 .conf.mk: conf.py .target targets/$(shell cat .target)/conf.py
143 $(error Please select target by writing it to .target file)
148 scripts/picosat-959/makefile:
149 cd $(dir $@) && ./configure
151 scripts/picosat-959/picosat: scripts/picosat-959/makefile
153 .stamp/initram_cyclictest: .conf.mk
154 $(MAKE) -C tests/cyclictest/root