-
-
Notifications
You must be signed in to change notification settings - Fork 50
/
Copy pathMakefile
88 lines (63 loc) · 2.03 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
INCPATH = include/
MAKE = make.exe
COPY = copy
DEL = del
TREE = tree /f
Antz_kernel = main/bootpack.obj asmfunc/naskfunc.obj assic/char.set windows/graphic.obj lgdt/set_lgdt.obj interrupt/int.obj io/fifo.obj thun/keychar.obj thun/thun.obj task/timer.obj
default :
$(MAKE) img
# 需要的
mbr.bin : boot/mbr.asm Makefile
nask.exe boot/mbr.asm mbr.bin mbr.lst
asmhead.bin : boot/asmhead.asm Makefile
nask.exe boot/asmhead.asm asmhead.bin asmhead.lst
# naskfunc.obj会放在asmfunc目录中,如果在bootpack.bim合成时候不到,not find naskfunc会报错一万次!!!2018年9月9日15:46:27
naskfunc.obj : asmfunc/naskfunc.nas Makefile
nask.exe asmfunc/naskfunc.nas asmfunc/naskfunc.obj asmfunc/naskfunc.lst
%.gas : %.c Makefile
cc1.exe -I include/ -Os -Wall -quiet -o $*.gas $*.c
%.nas : %.gas Makefile
gas2nask.exe -a $*.gas $*.nas
%.obj : %.nas Makefile
nask.exe $*.nas $*.obj $*.lst
bootpack.bim : $(Antz_kernel) Makefile
obj2bim.exe @include/haribote.rul out:bootpack.bim stack:31360k map:bootpack.map $(Antz_kernel)
bootpack.hrb : bootpack.bim Makefile
bim2hrb.exe bootpack.bim bootpack.hrb 0
antz.sys : asmhead.bin bootpack.hrb Makefile
copy /B asmhead.bin+bootpack.hrb antz.sys
antz.img : mbr.bin antz.sys Makefile
edimg.exe imgin:include/fdimg0at.tek wbinimg src:mbr.bin len:512 from:0 to:0 copy from:antz.sys to:@: imgout:antz.img
# 指令
img :
$(MAKE) antz.img
run :
$(MAKE) img
$(MAKE) clean
clean :
-$(DEL) *.bin
-$(DEL) *.lst
-$(DEL) asmfunc\naskfunc.lst
-$(DEL) asmfunc\naskfunc.obj
-$(DEL) interrupt\int.lst
-$(DEL) interrupt\int.obj
-$(DEL) io\fifo.lst
-$(DEL) io\fifo.obj
-$(DEL) lgdt\set_lgdt.lst
-$(DEL) lgdt\set_lgdt.obj
-$(DEL) main\bootpack.lst
-$(DEL) main\bootpack.obj
-$(DEL) windows\graphic.lst
-$(DEL) windows\graphic.obj
-$(DEL) thun\thun.lst
-$(DEL) thun\thun.obj
-$(DEL) thun\keychar.lst
-$(DEL) thun\keychar.obj
-$(DEL) task\timer.lst
-$(DEL) task\timer.obj
-$(DEL) bootpack.map
-$(DEL) bootpack.bim
-$(DEL) bootpack.hrb
-$(DEL) antz.sys
tree :
$(TREE)