-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
74 lines (49 loc) · 1.31 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
SHELL := /bin/bash
target ?= $(shell uname -m)
export ROOT_DIR=${PWD}
config_dir := ${PWD}/config
scripts_dir := ${PWD}/scripts
yalda_exe := ${ROOT_DIR}/yalda ${ROOT_DIR}/scripts/env
kconfig_exe := kconfig-mconf
kconfig := ${config_dir}/kconf/Kconfig-main
.PHONY: *config* all *build* kernel busybox whistle rootfs run* clean*
all: build
build: .build-kernel .build-busybox .build-whistle .build-rootfs
config: menuconfig
menuconfig:
${kconfig_exe} ${kconfig}
config-kernel:
. ${scripts_dir}/env && make -C "$${KERNEL_DIR}" menuconfig
config-busybox:
. ${scripts_dir}/env && make -C "$${BUSYBOX_DIR}" menuconfig
.build-kernel:
${yalda_exe} kernel build
kernel: build-kernel
build-kernel:
${MAKE} KERNEL_BUILD="y" .build-kernel
.build-busybox:
${yalda_exe} busybox build
busybox: build-busybox
build-busybox:
${MAKE} BUSYBOX_BUILD="y" .build-busybox
.build-whistle:
${yalda_exe} whistle build
whistle: build-whistle
build-whistle:
${MAKE} WHISTLE_BUILD="y" .build-whistle
.build-rootfs:
${yalda_exe} rootfs build
rootfs: build-rootfs
build-rootfs:
${MAKE} ROOTFS_BUILD="y" .build-rootfs
run-qemu:
${yalda_exe} qemu run
run-gdb:
${yalda_exe} gdb run
clean:
rm -rf .config* 2>/dev/null
cleanall:
${yalda_exe} kernel clean
${yalda_exe} busybox clean
${yalda_exe} whistle clean
rm -rf .config* 2>/dev/null