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
16 @echo " help - Prints this text"
19 HELP+="psql - Launch PostgreSQL interactive terminal.\n"
22 PGPASSWORD="$(CONF_DB_PASSWORD)" psql -d "$(CONF_DB_DATABASE)" -h "$(CONF_DB_HOST)" -p "$(CONF_DB_PORT)"
26 $(MAKE) -C tests/cyclictest/root/ menuconfig
28 HELP+="mlinux - Calls 'make menuconfig' in Linux folder. Use this for Linux\n"
29 HELP+=" configuration.\n"
32 ARCH=$(CONF_KERNEL_ARCH) $(MAKE) -C $(CONF_LINUX_SOURCES) menuconfig
34 HELP+="deflinux - Executes 'make defconfig' in linux folder. This generates default\n"
35 HELP+=" linux configuration.\n"
38 ARCH=$(CONF_KERNEL_ARCH) $(MAKE) -C $(CONF_LINUX_SOURCES) defconfig
40 HELP+="dot_config - Generate dot_config file. This file is based on default Linux\n"
41 HELP+=" configuration.\n"
42 $(CONF_DOT_CONFIG): .conf.mk scripts/allconfig/allconfig $(CONF_LINUX_BUILD_FOLDER)/.config
43 scripts/allconfig/allconfig --env .conf.mk $(CONF_LINUX_SOURCES)/Kconfig $(CONF_LINUX_BUILD_FOLDER)/.config $@
45 HELP+="initialize - Executes only initialization.\n"
46 .PHONY: initialize init
51 HELP+="initdb - Initialize database.\n"
52 .PHONY: initdb initialize_database
53 initdb: initialize_database
55 PGPASSWORD="$(CONF_DB_PASSWORD)" psql -d "$(CONF_DB_DATABASE)" -h "$(CONF_DB_HOST)" -p "$(CONF_DB_PORT)" -f scripts/databaseinit.sql
57 HELP+="test - Executes boot and benchmark test. You should use this before\n"
58 HELP+=" target run. This target is for testing if initial kernel\n"
59 HELP+=" configuration, buildroot configuration and benchmark are\n"
60 HELP+=" configured right.\n"
62 test: scripts/parse_kconfig/parse .stamp/initram_cyclictest
65 HELP+="run - Executes loop of kernel building, booting and benchmark execution.\n"
76 HELP+="clean - Cleans all generated files. Except those in\n"
77 HELP+=" linux and buildroot.\n"
80 @$(MAKE) -C scripts/parse_kconfig clean
81 @$(MAKE) -C scripts/write_config clean
82 @$(MAKE) -C scripts/allconfig clean
83 @if [ -e scripts/picosat-959/makefile ]; then $(MAKE) -C scripts/picosat-959 clean; fi
87 HELP+="clean_measure - Removes working files used while measuring. After this,\n"
88 HELP+=" initializations has to be executed once again.\n"
91 $(RM) -r configurations
94 $(RM) $(CONF_DOT_CONFIG)
96 HELP+="clean_database - Drop all tables in database.\n"
97 .PHONY: cleandb clean_database
98 cleandb: clean_database
100 PGPASSWORD="$(CONF_DB_PASSWORD)" psql -d "$(CONF_DB_DATABASE)" -h "$(CONF_DB_HOST)" -p "$(CONF_DB_PORT)" -f scripts/databaseclean.sql
102 HELP+="distclean - Cleans all configurations and generated files.\n"
103 HELP+=" Including linux and buildroot.\n"
105 distclean: clean distclean_linux distclean_buildroot clean_measure
107 HELP+="clean_linux - Executes 'make clean' in linux folder.\n"
110 @$(MAKE) -C $(CONF_LINUX_SOURCES) clean
112 HELP+="distclean_linux - Executes 'make distclean' in linux folder.\n"
113 .PHONY: distclean_linux
115 @$(MAKE) -C $(CONF_LINUX_SOURCES) distclean
117 .PHONY: clean_buildroot
119 @$(MAKE) -C tests/cyclictest/root/ clean
121 .PHONY: distclean_buildroot
123 @$(MAKE) -C tests/cyclictest/root/ distclean
125 #######################################
127 .conf.mk: conf.py .target targets/$(shell cat .target)/conf.py
131 $(error Please select target by writing it to .target file)
136 scripts/picosat-959/makefile:
137 cd $(dir $@) && ./configure
139 scripts/picosat-959/picosat: scripts/picosat-959/makefile
141 .stamp/initram_cyclictest: .conf.mk
142 $(MAKE) -C tests/cyclictest/root