|
1 | | -OBJS_BOOTPACK = bootpack.obj naskfunc.obj hankaku.obj graphic.obj dsctbl.obj \ |
2 | | - int.obj fifo.obj keyboard.obj mouse.obj memory.obj sheet.obj timer.obj \ |
3 | | - mtask.obj window.obj console.obj file.obj |
4 | | - |
5 | | -OBJS_API = api001.obj api002.obj api003.obj api004.obj api005.obj api006.obj \ |
6 | | - api007.obj api008.obj api009.obj api010.obj api011.obj api012.obj \ |
7 | | - api013.obj api014.obj api015.obj api016.obj api017.obj api018.obj \ |
8 | | - api019.obj api020.obj |
9 | | - |
10 | 1 | TOOLPATH = ../z_tools/ |
11 | 2 | INCPATH = ../z_tools/haribote/ |
12 | 3 |
|
13 | 4 | MAKE = $(TOOLPATH)make.exe -r |
14 | | -NASK = $(TOOLPATH)nask.exe |
15 | | -CC1 = $(TOOLPATH)cc1.exe -I$(INCPATH) -Os -Wall -quiet |
16 | | -GAS2NASK = $(TOOLPATH)gas2nask.exe -a |
17 | | -OBJ2BIM = $(TOOLPATH)obj2bim.exe |
18 | | -MAKEFONT = $(TOOLPATH)makefont.exe |
19 | | -BIN2OBJ = $(TOOLPATH)bin2obj.exe |
20 | | -BIM2HRB = $(TOOLPATH)bim2hrb.exe |
21 | | -RULEFILE = $(TOOLPATH)haribote/haribote.rul |
22 | 5 | EDIMG = $(TOOLPATH)edimg.exe |
23 | 6 | IMGTOL = $(TOOLPATH)imgtol.com |
24 | | -GOLIB = $(TOOLPATH)golib00.exe |
25 | 7 | COPY = copy |
26 | 8 | DEL = del |
27 | 9 |
|
28 | | -# デフォルト動作 |
| 10 | +#默认动作 |
29 | 11 |
|
30 | 12 | default : |
31 | | - $(MAKE) img |
32 | | - |
33 | | -# ファイル生成規則 |
34 | | - |
35 | | -ipl10.bin : ipl10.nas Makefile |
36 | | - $(NASK) ipl10.nas ipl10.bin ipl10.lst |
37 | | - |
38 | | -asmhead.bin : asmhead.nas Makefile |
39 | | - $(NASK) asmhead.nas asmhead.bin asmhead.lst |
40 | | - |
41 | | -hankaku.bin : hankaku.txt Makefile |
42 | | - $(MAKEFONT) hankaku.txt hankaku.bin |
43 | | - |
44 | | -hankaku.obj : hankaku.bin Makefile |
45 | | - $(BIN2OBJ) hankaku.bin hankaku.obj _hankaku |
46 | | - |
47 | | -bootpack.bim : $(OBJS_BOOTPACK) Makefile |
48 | | - $(OBJ2BIM) @$(RULEFILE) out:bootpack.bim stack:3136k map:bootpack.map \ |
49 | | - $(OBJS_BOOTPACK) |
50 | | -# 3MB+64KB=3136KB |
51 | | - |
52 | | -bootpack.hrb : bootpack.bim Makefile |
53 | | - $(BIM2HRB) bootpack.bim bootpack.hrb 0 |
54 | | - |
55 | | -haribote.sys : asmhead.bin bootpack.hrb Makefile |
56 | | - copy /B asmhead.bin+bootpack.hrb haribote.sys |
57 | | - |
58 | | -apilib.lib : Makefile $(OBJS_API) |
59 | | - $(GOLIB) $(OBJS_API) out:apilib.lib |
60 | | - |
61 | | -a.bim : a.obj apilib.lib Makefile |
62 | | - $(OBJ2BIM) @$(RULEFILE) out:a.bim map:a.map a.obj apilib.lib |
63 | | - |
64 | | -a.hrb : a.bim Makefile |
65 | | - $(BIM2HRB) a.bim a.hrb 0 |
66 | | - |
67 | | -hello3.bim : hello3.obj apilib.lib Makefile |
68 | | - $(OBJ2BIM) @$(RULEFILE) out:hello3.bim map:hello3.map hello3.obj apilib.lib |
69 | | - |
70 | | -hello3.hrb : hello3.bim Makefile |
71 | | - $(BIM2HRB) hello3.bim hello3.hrb 0 |
72 | | - |
73 | | -hello4.bim : hello4.obj apilib.lib Makefile |
74 | | - $(OBJ2BIM) @$(RULEFILE) out:hello4.bim stack:1k map:hello4.map \ |
75 | | - hello4.obj apilib.lib |
76 | | - |
77 | | -hello4.hrb : hello4.bim Makefile |
78 | | - $(BIM2HRB) hello4.bim hello4.hrb 0 |
79 | | - |
80 | | -hello5.bim : hello5.obj Makefile |
81 | | - $(OBJ2BIM) @$(RULEFILE) out:hello5.bim stack:1k map:hello5.map hello5.obj |
82 | | - |
83 | | -hello5.hrb : hello5.bim Makefile |
84 | | - $(BIM2HRB) hello5.bim hello5.hrb 0 |
85 | | - |
86 | | -winhelo.bim : winhelo.obj apilib.lib Makefile |
87 | | - $(OBJ2BIM) @$(RULEFILE) out:winhelo.bim stack:1k map:winhelo.map \ |
88 | | - winhelo.obj apilib.lib |
89 | | - |
90 | | -winhelo.hrb : winhelo.bim Makefile |
91 | | - $(BIM2HRB) winhelo.bim winhelo.hrb 0 |
92 | | - |
93 | | -winhelo2.bim : winhelo2.obj apilib.lib Makefile |
94 | | - $(OBJ2BIM) @$(RULEFILE) out:winhelo2.bim stack:1k map:winhelo2.map \ |
95 | | - winhelo2.obj apilib.lib |
96 | | - |
97 | | -winhelo2.hrb : winhelo2.bim Makefile |
98 | | - $(BIM2HRB) winhelo2.bim winhelo2.hrb 0 |
99 | | - |
100 | | -winhelo3.bim : winhelo3.obj apilib.lib Makefile |
101 | | - $(OBJ2BIM) @$(RULEFILE) out:winhelo3.bim stack:1k map:winhelo3.map \ |
102 | | - winhelo3.obj apilib.lib |
103 | | - |
104 | | -winhelo3.hrb : winhelo3.bim Makefile |
105 | | - $(BIM2HRB) winhelo3.bim winhelo3.hrb 40k |
106 | | - |
107 | | -star1.bim : star1.obj apilib.lib Makefile |
108 | | - $(OBJ2BIM) @$(RULEFILE) out:star1.bim stack:1k map:star1.map \ |
109 | | - star1.obj apilib.lib |
110 | | - |
111 | | -star1.hrb : star1.bim Makefile |
112 | | - $(BIM2HRB) star1.bim star1.hrb 47k |
113 | | - |
114 | | -stars.bim : stars.obj apilib.lib Makefile |
115 | | - $(OBJ2BIM) @$(RULEFILE) out:stars.bim stack:1k map:stars.map \ |
116 | | - stars.obj apilib.lib |
117 | | - |
118 | | -stars.hrb : stars.bim Makefile |
119 | | - $(BIM2HRB) stars.bim stars.hrb 47k |
120 | | - |
121 | | -stars2.bim : stars2.obj apilib.lib Makefile |
122 | | - $(OBJ2BIM) @$(RULEFILE) out:stars2.bim stack:1k map:stars2.map \ |
123 | | - stars2.obj apilib.lib |
124 | | - |
125 | | -stars2.hrb : stars2.bim Makefile |
126 | | - $(BIM2HRB) stars2.bim stars2.hrb 47k |
127 | | - |
128 | | -lines.bim : lines.obj apilib.lib Makefile |
129 | | - $(OBJ2BIM) @$(RULEFILE) out:lines.bim stack:1k map:lines.map \ |
130 | | - lines.obj apilib.lib |
131 | | - |
132 | | -lines.hrb : lines.bim Makefile |
133 | | - $(BIM2HRB) lines.bim lines.hrb 48k |
134 | | - |
135 | | -walk.bim : walk.obj apilib.lib Makefile |
136 | | - $(OBJ2BIM) @$(RULEFILE) out:walk.bim stack:1k map:walk.map \ |
137 | | - walk.obj apilib.lib |
138 | | - |
139 | | -walk.hrb : walk.bim Makefile |
140 | | - $(BIM2HRB) walk.bim walk.hrb 48k |
141 | | - |
142 | | -noodle.bim : noodle.obj apilib.lib Makefile |
143 | | - $(OBJ2BIM) @$(RULEFILE) out:noodle.bim stack:1k map:noodle.map \ |
144 | | - noodle.obj apilib.lib |
145 | | - |
146 | | -noodle.hrb : noodle.bim Makefile |
147 | | - $(BIM2HRB) noodle.bim noodle.hrb 40k |
148 | | - |
149 | | -beepdown.bim : beepdown.obj apilib.lib Makefile |
150 | | - $(OBJ2BIM) @$(RULEFILE) out:beepdown.bim stack:1k map:beepdown.map \ |
151 | | - beepdown.obj apilib.lib |
152 | | - |
153 | | -beepdown.hrb : beepdown.bim Makefile |
154 | | - $(BIM2HRB) beepdown.bim beepdown.hrb 40k |
155 | | - |
156 | | -color.bim : color.obj apilib.lib Makefile |
157 | | - $(OBJ2BIM) @$(RULEFILE) out:color.bim stack:1k map:color.map \ |
158 | | - color.obj apilib.lib |
159 | | - |
160 | | -color.hrb : color.bim Makefile |
161 | | - $(BIM2HRB) color.bim color.hrb 56k |
162 | | - |
163 | | -color2.bim : color2.obj apilib.lib Makefile |
164 | | - $(OBJ2BIM) @$(RULEFILE) out:color2.bim stack:1k map:color2.map \ |
165 | | - color2.obj apilib.lib |
| 13 | + $(MAKE) haribote.img |
166 | 14 |
|
167 | | -color2.hrb : color2.bim Makefile |
168 | | - $(BIM2HRB) color2.bim color2.hrb 56k |
| 15 | +#文件生成规则 |
169 | 16 |
|
170 | | -haribote.img : ipl10.bin haribote.sys Makefile \ |
171 | | - a.hrb hello3.hrb hello4.hrb hello5.hrb winhelo.hrb winhelo2.hrb \ |
172 | | - winhelo3.hrb star1.hrb stars.hrb stars2.hrb lines.hrb walk.hrb \ |
173 | | - noodle.hrb beepdown.hrb color.hrb color2.hrb |
| 17 | +haribote.img : haribote/ipl10.bin haribote/haribote.sys Makefile \ |
| 18 | + a/a.hrb hello3/hello3.hrb hello4/hello4.hrb hello5/hello5.hrb \ |
| 19 | + winhelo/winhelo.hrb winhelo2/winhelo2.hrb winhelo3/winhelo3.hrb \ |
| 20 | + star1/star1.hrb stars/stars.hrb stars2/stars2.hrb \ |
| 21 | + lines/lines.hrb walk/walk.hrb noodle/noodle.hrb \ |
| 22 | + beepdown/beepdown.hrb color/color.hrb color2/color2.hrb |
174 | 23 | $(EDIMG) imgin:../z_tools/fdimg0at.tek \ |
175 | | - wbinimg src:ipl10.bin len:512 from:0 to:0 \ |
176 | | - copy from:haribote.sys to:@: \ |
177 | | - copy from:ipl10.nas to:@: \ |
| 24 | + wbinimg src:haribote/ipl10.bin len:512 from:0 to:0 \ |
| 25 | + copy from:haribote/haribote.sys to:@: \ |
| 26 | + copy from:haribote/ipl10.nas to:@: \ |
178 | 27 | copy from:make.bat to:@: \ |
179 | | - copy from:a.hrb to:@: \ |
180 | | - copy from:hello3.hrb to:@: \ |
181 | | - copy from:hello4.hrb to:@: \ |
182 | | - copy from:hello5.hrb to:@: \ |
183 | | - copy from:winhelo.hrb to:@: \ |
184 | | - copy from:winhelo2.hrb to:@: \ |
185 | | - copy from:winhelo3.hrb to:@: \ |
186 | | - copy from:star1.hrb to:@: \ |
187 | | - copy from:stars.hrb to:@: \ |
188 | | - copy from:stars2.hrb to:@: \ |
189 | | - copy from:lines.hrb to:@: \ |
190 | | - copy from:walk.hrb to:@: \ |
191 | | - copy from:noodle.hrb to:@: \ |
192 | | - copy from:beepdown.hrb to:@: \ |
193 | | - copy from:color.hrb to:@: \ |
194 | | - copy from:color2.hrb to:@: \ |
| 28 | + copy from:a/a.hrb to:@: \ |
| 29 | + copy from:hello3/hello3.hrb to:@: \ |
| 30 | + copy from:hello4/hello4.hrb to:@: \ |
| 31 | + copy from:hello5/hello5.hrb to:@: \ |
| 32 | + copy from:winhelo/winhelo.hrb to:@: \ |
| 33 | + copy from:winhelo2/winhelo2.hrb to:@: \ |
| 34 | + copy from:winhelo3/winhelo3.hrb to:@: \ |
| 35 | + copy from:star1/star1.hrb to:@: \ |
| 36 | + copy from:stars/stars.hrb to:@: \ |
| 37 | + copy from:stars2/stars2.hrb to:@: \ |
| 38 | + copy from:lines/lines.hrb to:@: \ |
| 39 | + copy from:walk/walk.hrb to:@: \ |
| 40 | + copy from:noodle/noodle.hrb to:@: \ |
| 41 | + copy from:beepdown/beepdown.hrb to:@: \ |
| 42 | + copy from:color/color.hrb to:@: \ |
| 43 | + copy from:color2/color2.hrb to:@: \ |
195 | 44 | imgout:haribote.img |
196 | 45 |
|
197 | | -# 一般規則 |
198 | | - |
199 | | -%.gas : %.c bootpack.h apilib.h Makefile |
200 | | - $(CC1) -o $*.gas $*.c |
201 | | - |
202 | | -%.nas : %.gas Makefile |
203 | | - $(GAS2NASK) $*.gas $*.nas |
| 46 | +#命令 |
204 | 47 |
|
205 | | -%.obj : %.nas Makefile |
206 | | - $(NASK) $*.nas $*.obj $*.lst |
| 48 | +run : |
| 49 | + $(MAKE) haribote.img |
| 50 | + $(COPY) haribote.img ..\z_tools\qemu\fdimage0.bin |
| 51 | + $(MAKE) -C ../z_tools/qemu |
207 | 52 |
|
208 | | -# コマンド |
| 53 | +install : |
| 54 | + $(MAKE) haribote.img |
| 55 | + $(IMGTOL) w a: haribote.img |
209 | 56 |
|
210 | | -img : |
| 57 | +full : |
| 58 | + $(MAKE) -C haribote |
| 59 | + $(MAKE) -C apilib |
| 60 | + $(MAKE) -C a |
| 61 | + $(MAKE) -C hello3 |
| 62 | + $(MAKE) -C hello4 |
| 63 | + $(MAKE) -C hello5 |
| 64 | + $(MAKE) -C winhelo |
| 65 | + $(MAKE) -C winhelo2 |
| 66 | + $(MAKE) -C winhelo3 |
| 67 | + $(MAKE) -C star1 |
| 68 | + $(MAKE) -C stars |
| 69 | + $(MAKE) -C stars2 |
| 70 | + $(MAKE) -C lines |
| 71 | + $(MAKE) -C walk |
| 72 | + $(MAKE) -C noodle |
| 73 | + $(MAKE) -C beepdown |
| 74 | + $(MAKE) -C color |
| 75 | + $(MAKE) -C color2 |
211 | 76 | $(MAKE) haribote.img |
212 | 77 |
|
213 | | -run : |
214 | | - $(MAKE) img |
| 78 | +run_full : |
| 79 | + $(MAKE) full |
215 | 80 | $(COPY) haribote.img ..\z_tools\qemu\fdimage0.bin |
216 | 81 | $(MAKE) -C ../z_tools/qemu |
217 | 82 |
|
218 | | -install : |
219 | | - $(MAKE) img |
| 83 | +install_full : |
| 84 | + $(MAKE) full |
220 | 85 | $(IMGTOL) w a: haribote.img |
221 | 86 |
|
| 87 | +run_os : |
| 88 | + $(MAKE) -C haribote |
| 89 | + $(MAKE) run |
| 90 | + |
222 | 91 | clean : |
223 | | - -$(DEL) *.bin |
224 | | - -$(DEL) *.lst |
225 | | - -$(DEL) *.obj |
226 | | - -$(DEL) *.map |
227 | | - -$(DEL) *.bim |
228 | | - -$(DEL) *.hrb |
229 | | - -$(DEL) haribote.sys |
230 | | - -$(DEL) apilib.lib |
| 92 | +#不执行任何操作 |
231 | 93 |
|
232 | 94 | src_only : |
233 | 95 | $(MAKE) clean |
234 | 96 | -$(DEL) haribote.img |
| 97 | + |
| 98 | +clean_full : |
| 99 | + $(MAKE) -C haribote clean |
| 100 | + $(MAKE) -C apilib clean |
| 101 | + $(MAKE) -C a clean |
| 102 | + $(MAKE) -C hello3 clean |
| 103 | + $(MAKE) -C hello4 clean |
| 104 | + $(MAKE) -C hello5 clean |
| 105 | + $(MAKE) -C winhelo clean |
| 106 | + $(MAKE) -C winhelo2 clean |
| 107 | + $(MAKE) -C winhelo3 clean |
| 108 | + $(MAKE) -C star1 clean |
| 109 | + $(MAKE) -C stars clean |
| 110 | + $(MAKE) -C stars2 clean |
| 111 | + $(MAKE) -C lines clean |
| 112 | + $(MAKE) -C walk clean |
| 113 | + $(MAKE) -C noodle clean |
| 114 | + $(MAKE) -C beepdown clean |
| 115 | + $(MAKE) -C color clean |
| 116 | + $(MAKE) -C color2 clean |
| 117 | + |
| 118 | +src_only_full : |
| 119 | + $(MAKE) -C haribote src_only |
| 120 | + $(MAKE) -C apilib src_only |
| 121 | + $(MAKE) -C a src_only |
| 122 | + $(MAKE) -C hello3 src_only |
| 123 | + $(MAKE) -C hello4 src_only |
| 124 | + $(MAKE) -C hello5 src_only |
| 125 | + $(MAKE) -C winhelo src_only |
| 126 | + $(MAKE) -C winhelo2 src_only |
| 127 | + $(MAKE) -C winhelo3 src_only |
| 128 | + $(MAKE) -C star1 src_only |
| 129 | + $(MAKE) -C stars src_only |
| 130 | + $(MAKE) -C stars2 src_only |
| 131 | + $(MAKE) -C lines src_only |
| 132 | + $(MAKE) -C walk src_only |
| 133 | + $(MAKE) -C noodle src_only |
| 134 | + $(MAKE) -C beepdown src_only |
| 135 | + $(MAKE) -C color src_only |
| 136 | + $(MAKE) -C color2 src_only |
| 137 | + -$(DEL) haribote.img |
| 138 | + |
| 139 | +refresh : |
| 140 | + $(MAKE) full |
| 141 | + $(MAKE) clean_full |
| 142 | + -$(DEL) haribote.img |
0 commit comments