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
5 BENCHMARK_FILES := $(patsubst benchmark/%,scripts/buildroot/system/skeleton/usr/share/benchmark/%,$(shell find benchmark -type f))
6 BENCHMARK_FOLDERS := $(shell dirname $(BENCHMARK_FILES))
8 all: parse_kconfig write_config picosat
11 @echo "all - Builds basic programs and prints message about next steps."
12 @echo "help - Prints this text"
13 @echo "mbuildroot - Calls 'make menuconfig' in buildroot folder. Use this for"
14 @echo " buildroot configuration."
15 @echo "mlinux - Calls 'make menuconfig' in linux folder. Use this for linux"
16 @echo " configuration."
17 @echo "deflinux - Executes 'make defconfig' in linux folder. This generates default"
18 @echo " linux configuration for architecture specified in conf.py"
19 @echo "test - Executes boot and benchmark test. You should use this before"
20 @echo " target run. This target is for testing if initial kernel"
21 @echo " configuration, buildroot configuration and benchmark are"
22 @echo " configured right."
23 @echo "run - Executes loop of kernel building, booting and benchmark execution."
24 @echo "evaluate - Creating result statistics from generated data."
26 @echo "clean - Cleans all generated files. Except those in"
27 @echo " linux and buildroot."
28 @echo "distclean - Cleans all configurations and generated files."
29 @echo " Including linux and buildroot."
30 @echo "clean_linux - Executes 'make clean' in linux folder."
31 @echo "distclean_linux - Executes 'make distclean' in linux folder."
32 @echo "clean_buildroot - Executes 'make clean' in buildroot folder."
33 @echo "distclean_buildroot - Executes 'make distclean' in buildroot folder."
35 mbuildroot: scripts/buildroot/.config scripts/buildroot/system/skeleton/usr/bin/linux-conf-perf $(BENCHMARK_FILES)
36 $(MAKE) -C scripts/buildroot menuconfig
39 ARCH=$(SRCARCH) $(MAKE) -C linux menuconfig
42 ARCH=$(SRCARCH) $(MAKE) -C linux defconfig
44 test: $(INITRAM) parse_kconfig
47 run: parse_kconfig write_config picosat $(INITRAM)
54 @$(MAKE) -C scripts/parse_kconfig clean
55 @$(MAKE) -C scripts/write_config clean
56 @if [ -e scripts/picosat-959/makefile ]; then $(MAKE) -C scripts/picosat-959 clean; fi
58 $(RM) -r scripts/buildroot/system/skeleton/usr/share/benchmark
62 distclean: clean distclean_linux distclean_buildroot
66 @$(MAKE) -C linux clean
69 @$(MAKE) -C linux distclean
72 @$(MAKE) -C scripts/buildroot clean
75 @$(MAKE) -C scripts/buildroot distclean
77 #######################################
83 @$(MAKE) -C scripts/parse_kconfig/
86 @$(MAKE) -C scripts/write_config/
88 scripts/buildroot/system/skeleton/usr/share/%:
94 $(BUILDROOT_INITRAM): scripts/buildroot/.config scripts/buildroot/system/skeleton/usr/bin/linux-conf-perf $(BENCHMARK_FILES)
95 @$(MAKE) -C scripts/buildroot
98 $(INITRAM): $(BUILDROOT_INITRAM)
101 scripts/buildroot/.config:
102 cp $(BUILDROOT_DEF_CONFIG) $@
104 scripts/buildroot/system/skeleton/usr/bin/linux-conf-perf:
105 cp $(BUILDROOT_INITSCRIPT) $@
106 cat $(BUILDROOT_INITTAB_DIRECTIVE) >> scripts/buildroot/system/skeleton/etc/inittab
108 $(BENCHMARK_FILES): $(BENCHMARK_FOLDERS)
109 scripts/buildroot/system/skeleton/usr/share/benchmark/%: benchmark/%
112 picosat: scripts/picosat-959/picosat
113 scripts/picosat-959/picosat:
114 cd scripts/picosat-959 && ./configure
115 $(MAKE) -C scripts/picosat-959