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 psql -d "$(CONF_DB_DATABASE)"
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+="dbmigrate - Migrate database.\n"
54 .PHONY: initdb initialize_database dbmigrate
55 initdb: initialize_database
56 initialize_database: dbmigrate
58 ./scripts/database/manage.py makemigrations
59 ./scripts/database/manage.py migrate
61 HELP+="test - Executes boot and benchmark test. You should use this before\n"
62 HELP+=" target run. This target is for testing if initial kernel\n"
63 HELP+=" configuration, buildroot configuration and benchmark are\n"
64 HELP+=" configured right.\n"
66 test: scripts/parse_kconfig/parse .stamp/initram_cyclictest
69 HELP+="run - Executes loop of kernel building, booting and benchmark execution.\n"
71 run: all $(CONF_BUILD_FOLDER)/rules $(CONF_BUILD_FOLDER)/fixed
72 ln -sf ../dot_measure $(CONF_BUILD_FOLDER)
75 $(CONF_BUILD_FOLDER)/rules $(CONF_BUILD_FOLDER)/symbol_map: .conf.mk $(CONF_LINUX_SOURCES)/Kconfig
76 scripts/parse_kconfig/parse -v --env .conf.mk $(CONF_LINUX_SOURCES)/Kconfig $(dir $@)
78 $(CONF_BUILD_FOLDER)/allconfig: .conf.mk $(CONF_LINUX_SOURCES)/Kconfig $(CONF_LINUX_BUILD_FOLDER)/.config
79 scripts/allconfig/allconfig --env .conf.mk $(CONF_LINUX_SOURCES)/Kconfig $(CONF_LINUX_BUILD_FOLDER)/.config $@
81 $(CONF_BUILD_FOLDER)/fixed $(CONF_BUILD_FOLDER)/measure: .conf.mk $(CONF_BUILD_FOLDER)/allconfig dot_measure
82 scripts/gen_fixed.py $(CONF_BUILD_FOLDER)/allconfig dot_measure
90 HELP+="clean - Cleans all generated files. Except those in\n"
91 HELP+=" linux and buildroot.\n"
94 @$(MAKE) -C scripts/parse_kconfig clean
95 @$(MAKE) -C scripts/write_config clean
96 @$(MAKE) -C scripts/allconfig clean
97 @if [ -e scripts/picosat-959/makefile ]; then $(MAKE) -C scripts/picosat-959 clean; fi
101 HELP+="clean_measure - Removes working files used while measuring. After this,\n"
102 HELP+=" initializations has to be executed once again.\n"
103 .PHONY: clean_measure
105 $(RM) -r configurations
108 $(RM) $(CONF_DOT_CONFIG)
110 HELP+="clean_database - Drop all entries in database.\n"
111 .PHONY: cleandb clean_database
112 cleandb: clean_database
114 ./scripts/database/manage.py flush
116 HELP+="distclean - Cleans all configurations and generated files.\n"
117 HELP+=" Including linux and buildroot.\n"
119 distclean: clean distclean_linux distclean_buildroot clean_measure
121 HELP+="clean_linux - Executes 'make clean' in linux folder.\n"
124 @$(MAKE) -C $(CONF_LINUX_SOURCES) clean
126 HELP+="distclean_linux - Executes 'make distclean' in linux folder.\n"
127 .PHONY: distclean_linux
129 @$(MAKE) -C $(CONF_LINUX_SOURCES) distclean
131 .PHONY: clean_buildroot
133 @$(MAKE) -C tests/cyclictest/root/ clean
135 .PHONY: distclean_buildroot
137 @$(MAKE) -C tests/cyclictest/root/ distclean
139 #######################################
141 .conf.mk: conf.py .target targets/$(shell cat .target)/conf.py
145 $(error Please select target by writing it to .target file)
150 scripts/picosat-959/makefile:
151 cd $(dir $@) && ./configure
153 scripts/picosat-959/picosat: scripts/picosat-959/makefile
155 .stamp/initram_cyclictest: .conf.mk
156 $(MAKE) -C tests/cyclictest/root