-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
57 lines (41 loc) · 1.47 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
makefile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
project_path := $(dir $(makefile_path))
export
include configs/config.mk
.PHONY : all clean debug test testconf gensym
all : config
cd boot && make
cd osloader && make
cd kernel && make
# loader consists of mbr and osloader
dd if=/dev/zero of=${IMG_BIN} bs=512 count=20480 conv=notrunc
dd if=boot/boot.bin of=${IMG_BIN} bs=512 count=1 conv=notrunc seek=0
dd if=osloader/osloader.bin of=${IMG_BIN} bs=512 conv=notrunc seek=1
# kernel elf file
dd if=kernel/kernel.elf of=${IMG_BIN} bs=512 conv=notrunc seek=1024
reall :
make clean
make all
test :
cd test/build && make
testconf :
cd test && mkdir -p build && cd build && cmake .. -DPROJECT_PATH=${project_path}
config : defs/defs.conf
python3 scripts/mkdefs.py defs/defs.conf defs/defs.s defs/defs.h
gensym :
bash scripts/gensym.sh debug/kernel.debug
bash scripts/gensym.sh debug/osloader.debug
bash scripts/gensym.sh debug/boot.debug
qdebug: export DOTKERNEL_PATH = $(project_path)
qdebug:
gnome-terminal --geometry=80x14+0+1200 -- ./scripts/run_qemu.sh
gnome-terminal --geometry=130x80+1600+0 -- ./scripts/debugp.sh
bdebug: export DOTKERNEL_PATH = $(project_path)
bdebug: gensym
gnome-terminal --geometry=80x14+0+1200 -- ./scripts/run_bochs.sh
gdebug: export DOTKERNEL_PATH = $(project_path)
gdebug:
gnome-terminal --geometry=80x14+0+1200 -- ./scripts/run_bochs-gdb.sh
gnome-terminal --geometry=130x80+1600+0 -- ./scripts/debugp.sh
clean:
${CLEAN_CMD}