13 IN=..$(DIRSEP)..$(DIRSEP)fdos$(DIRSEP)watcom2$(DIRSEP)h
18 #-zk0u = translate kanji to unicode... wwww
19 #-zk0 = kanji support~
20 #-zkl = current codepage
22 #EXMMTESTDIR=16$(DIRSEP)exmmtest$(DIRSEP)
24 SRCLIB=$(SRC)lib$(DIRSEP)
25 JSMNLIB=$(SRCLIB)jsmn$(DIRSEP)
26 NYANLIB=$(SRCLIB)nyan$(DIRSEP)
27 #EXMMLIB=$(SRCLIB)exmm$(DIRSEP)
28 VGMSNDLIB=$(SRCLIB)vgmsnd$(DIRSEP)
29 DOSLIB=$(SRCLIB)doslib$(DIRSEP)
30 WCPULIB=$(SRCLIB)wcpu$(DIRSEP)
33 BAKAPIFLAGS=-fh=bakapi.hed
34 SFLAGS=-sg -st -of+ -zu -zdf -zff -zgf -k56000#60000#32768
35 DFLAGS=-DTARGET_MSDOS=16 -DMSDOS=1 $(SFLAGS)
36 ZFLAGS=-zk0 -zq -zc -zp8# -zm
37 CFLAGS=$(IFLAGS) -mh -lr -l=dos -wo# -d2##wwww
38 OFLAGS=-obmiler -out -oh -ei -zp8 -0 -fpi87 -onac -ol+ -ok####x
39 FLAGS=$(CFLAGS) $(OFLAGS) $(DFLAGS) $(ZFLAGS)
41 DOSLIBEXMMOBJ = himemsys.$(OBJ) emm.$(OBJ)
42 VGMSNDOBJ = 16_snd.$(OBJ) vgmSnd.$(OBJ)
43 DOSLIBOBJ = adlib.$(OBJ) 8254.$(OBJ) 8259.$(OBJ) dos.$(OBJ) cpu.$(OBJ)
44 16LIBOBJS = bakapee.$(OBJ) 16_in.$(OBJ) 16_mm.$(OBJ) wcpu.$(OBJ) 16_head.$(OBJ) 16_ca.$(OBJ) kitten.$(OBJ) 16_hc.$(OBJ)
48 GFXLIBOBJS = modex16.$(OBJ) bitmap.$(OBJ) planar.$(OBJ) 16text.$(OBJ)
50 TESTEXEC = exmmtest.exe test.exe pcxtest.exe pcxtest2.exe test2.exe palettec.exe maptest.exe fmemtest.exe fonttest.exe fontgfx.exe inputest.exe scroll.exe vgmtest.exe
52 #testemm.exe testemm0.exe fonttes0.exe miditest.exe sega.exe sountest.exe
53 EXEC = 16.exe bakapi.exe $(TESTEXEC) tesuto.exe
58 #game and bakapi executables
60 16.exe: 16.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) 16.lib
61 wcl $(FLAGS) $(16FLAGS) 16.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) 16.lib -fm=16.map
63 bakapi.exe: bakapi.$(OBJ) 16.lib
64 wcl $(FLAGS) $(BAKAPIFLAGS) bakapi.$(OBJ) 16.lib -fm=bakapi.map
68 scroll.exe: scroll.$(OBJ) scroll16.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) 16.lib#gfx.lib 16_head.$(OBJ) bakapee.$(OBJ) 16_in.$(OBJ) wcpu.$(OBJ)
69 wcl $(FLAGS) scroll.$(OBJ) scroll16.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) 16.lib -fm=scroll.map#gfx.lib 16_head.$(OBJ) bakapee.$(OBJ) 16_in.$(OBJ) wcpu.$(OBJ)
70 scroll.$(OBJ): $(SRC)scroll.c
71 wcl $(FLAGS) -c $(SRC)scroll.c
73 tesuto.exe: tesuto.$(OBJ)
74 wcl -mh -d2 tesuto.$(OBJ)
75 tesuto.$(OBJ): $(SRC)tesuto.c
76 wcl -mh -d2 -c $(SRC)tesuto.c
78 #sega.exe: sega.$(OBJ)
79 # wcl $(FLAGS) sega.$(OBJ)
80 #sega.$(OBJ): $(SRC)sega.c
81 # wcl $(FLAGS) -c $(SRC)sega.c
83 test.exe: test.$(OBJ) gfx.lib
84 wcl $(FLAGS) test.$(OBJ) gfx.lib -fm=test.map
86 test2.exe: test2.$(OBJ) gfx.lib
87 wcl $(FLAGS) test2.$(OBJ) gfx.lib -fm=test2.map
89 fonttest.exe: fonttest.$(OBJ) 16.lib
90 wcl $(FLAGS) fonttest.$(OBJ) 16.lib# -fm=fonttest.map
92 #fonttes0.exe: fonttes0.$(OBJ) 16.lib
93 # wcl $(FLAGS) fonttes0.$(OBJ) 16.lib
95 fontgfx.exe: fontgfx.$(OBJ) 16.lib
96 wcl $(FLAGS) fontgfx.$(OBJ) 16.lib -fm=fontgfx.map
98 inputest.exe: inputest.$(OBJ) 16.lib
99 wcl $(FLAGS) -D__DEBUG_InputMgr__=1 inputest.$(OBJ) 16.lib -fm=inputest.map
101 #sountest.exe: sountest.$(OBJ) 16.lib
102 # wcl $(FLAGS) sountest.$(OBJ) 16.lib
104 #miditest.exe: miditest.$(OBJ) 16.lib $(DOSLIBEXMMOBJ) midi.$(OBJ)
105 # wcl $(FLAGS) miditest.$(OBJ) 16.lib $(DOSLIBEXMMOBJ) midi.$(OBJ)
107 tsthimem.exe: tsthimem.$(OBJ) 16.lib $(DOSLIBEXMMOBJ)
108 wcl $(FLAGS) tsthimem.$(OBJ) 16.lib $(DOSLIBEXMMOBJ) -fm=tsthimem.map
110 #testemm.exe: testemm.$(OBJ) 16.lib $(DOSLIBEXMMOBJ)
111 # wcl $(FLAGS) testemm.$(OBJ) 16.lib $(DOSLIBEXMMOBJ)
113 #testemm0.exe: testemm0.$(OBJ) 16.lib $(DOSLIBEXMMOBJ)
114 # wcl $(FLAGS) testemm0.$(OBJ) 16.lib $(DOSLIBEXMMOBJ)
116 pcxtest.exe: pcxtest.$(OBJ) gfx.lib
117 wcl $(FLAGS) pcxtest.$(OBJ) gfx.lib -fm=pcxtest.map
119 palettec.exe: palettec.$(OBJ) 16.lib
120 wcl $(FLAGS) palettec.$(OBJ) 16.lib -fm=palettec.map
122 pcxtest2.exe: pcxtest2.$(OBJ) gfx.lib
123 wcl $(FLAGS) pcxtest2.$(OBJ) gfx.lib -fm=pcxtest2.map
125 maptest.exe: maptest.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) 16.lib
126 wcl $(FLAGS) maptest.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) 16.lib -fm=maptest.map
128 #maptest0.exe: maptest0.$(OBJ) fmapread.$(OBJ) farjsmn.$(OBJ)# 16.lib
129 # wcl $(FLAGS) $(MFLAGS) maptest0.$(OBJ) fmapread.$(OBJ) farjsmn.$(OBJ)# 16.lib
131 #emmtest.exe: emmtest.$(OBJ) memory.$(OBJ)
132 # wcl $(FLAGS) $(MFLAGS) emmtest.$(OBJ) memory.$(OBJ)
134 #emsdump.exe: emsdump.$(OBJ) memory.$(OBJ)
135 # wcl $(FLAGS) $(MFLAGS) emsdump.$(OBJ) memory.$(OBJ)
137 fmemtest.exe: fmemtest.$(OBJ) 16.lib
138 wcl $(FLAGS) fmemtest.$(OBJ) 16.lib -fm=fmemtest.map
140 exmmtest.exe: exmmtest.$(OBJ) 16.lib#16_head.$(OBJ) 16_mm.$(OBJ) 16_ca.$(OBJ) 16_hc.$(OBJ) kitten.$(OBJ)
141 wcl $(FLAGS) exmmtest.$(OBJ) 16.lib -fm=exmmtest.map#16_head.$(OBJ) 16_mm.$(OBJ) 16_ca.$(OBJ) 16_hc.$(OBJ) kitten.$(OBJ)
143 vgmtest.exe: vgmtest.$(OBJ) vgmsnd.lib 16_in.$(OBJ) 16_head.$(OBJ)
144 wcl $(FLAGS) vgmtest.$(OBJ) vgmsnd.lib -fm=vgmtest.map 16_in.$(OBJ) 16_head.$(OBJ)
145 #====wcl -mc vgmtest.$(OBJ) $(VGMSNDOBJ) -fm=vgmtest.map
149 #executable's objects
151 16.$(OBJ): $(SRC)16.h $(SRC)16.c
152 wcl $(FLAGS) -c $(SRC)16.c
154 bakapi.$(OBJ): $(SRC)bakapi.h $(SRC)bakapi.c
155 wcl $(FLAGS) -c $(SRC)bakapi.c
157 test.$(OBJ): $(SRC)test.c $(SRCLIB)modex16.h
158 wcl $(FLAGS) -c $(SRC)test.c
160 test2.$(OBJ): $(SRC)test2.c $(SRCLIB)modex16.h
161 wcl $(FLAGS) -c $(SRC)test2.c
163 pcxtest.$(OBJ): $(SRC)pcxtest.c $(SRCLIB)modex16.h
164 wcl $(FLAGS) -c $(SRC)pcxtest.c
166 pcxtest2.$(OBJ): $(SRC)pcxtest2.c $(SRCLIB)modex16.h
167 wcl $(FLAGS) -c $(SRC)pcxtest2.c
169 palettec.$(OBJ): $(SRC)palettec.c
170 wcl $(FLAGS) -c $(SRC)palettec.c
172 maptest.$(OBJ): $(SRC)maptest.c $(SRCLIB)modex16.h
173 wcl $(FLAGS) -c $(SRC)maptest.c
175 #maptest0.$(OBJ): $(SRC)maptest0.c# $(SRCLIB)modex16.h
176 # wcl $(FLAGS) $(MFLAGS) -c $(SRC)maptest0.c
178 #emmtest.$(OBJ): $(SRC)emmtest.c
179 # wcl $(FLAGS) $(MFLAGS) -c $(SRC)emmtest.c
181 #emsdump.$(OBJ): $(SRC)emsdump.c
182 # wcl $(FLAGS) $(MFLAGS) -c $(SRC)emsdump.c
184 fmemtest.$(OBJ): $(SRC)fmemtest.c
185 wcl $(FLAGS) -c $(SRC)fmemtest.c
187 fonttest.$(OBJ): $(SRC)fonttest.c
188 wcl $(FLAGS) -c $(SRC)fonttest.c
190 #fonttes0.$(OBJ): $(SRC)fonttes0.c
191 # wcl $(FLAGS) -c $(SRC)fonttes0.c
193 fontgfx.$(OBJ): $(SRC)fontgfx.c
194 wcl $(FLAGS) -c $(SRC)fontgfx.c
196 inputest.$(OBJ): $(SRC)inputest.c
197 wcl $(FLAGS) -c $(SRC)inputest.c
199 #sountest.$(OBJ): $(SRC)sountest.c
200 # wcl $(FLAGS) -c $(SRC)sountest.c
202 #miditest.$(OBJ): $(SRC)miditest.c
203 # wcl $(FLAGS) -c $(SRC)miditest.c
205 #testemm.$(OBJ): $(SRC)testemm.c
206 # wcl $(FLAGS) -c $(SRC)testemm.c
208 #testemm0.$(OBJ): $(SRC)testemm0.c
209 # wcl $(FLAGS) -c $(SRC)testemm0.c
211 tsthimem.$(OBJ): $(SRC)tsthimem.c
212 wcl $(FLAGS) -c $(SRC)tsthimem.c
214 exmmtest.$(OBJ): $(SRC)exmmtest.c
215 wcl $(FLAGS) -c $(SRC)exmmtest.c
217 vgmtest.$(OBJ): $(SRC)vgmtest.c
218 wcl $(FLAGS) -c $(SRC)vgmtest.c
219 #====wcl -mc -c $(SRC)vgmtest.c
222 #non executable objects libraries
224 16.lib: $(16LIBOBJS) gfx.lib# doslib.lib vgmsnd.lib
225 wlib -b -q 16.lib $(16LIBOBJS) gfx.lib# doslib.lib vgmsnd.lib
227 gfx.lib: $(GFXLIBOBJS)
228 wlib -b -q gfx.lib $(GFXLIBOBJS)
230 doslib.lib: $(DOSLIBOBJ) # $(SRCLIB)cpu.lib
231 wlib -b -q doslib.lib $(DOSLIBOBJ) # $(SRCLIB)cpu.lib
233 vgmsnd.lib: $(VGMSNDOBJ)
234 wlib -b -q vgmsnd.lib $(VGMSNDOBJ)
236 modex16.$(OBJ): $(SRCLIB)modex16.h $(SRCLIB)modex16.c
237 wcl $(FLAGS) -c $(SRCLIB)modex16.c
239 bakapee.$(OBJ): $(SRCLIB)bakapee.h $(SRCLIB)bakapee.c
240 wcl $(FLAGS) -c $(SRCLIB)bakapee.c
242 bitmap.$(OBJ): $(SRCLIB)bitmap.h $(SRCLIB)bitmap.c
243 wcl $(FLAGS) -c $(SRCLIB)bitmap.c
245 planar.$(OBJ): $(SRCLIB)planar.h $(SRCLIB)planar.c
246 wcl $(FLAGS) -c $(SRCLIB)planar.c
248 scroll16.$(OBJ): $(SRCLIB)scroll16.h $(SRCLIB)scroll16.c
249 wcl $(FLAGS) -c $(SRCLIB)scroll16.c
251 wcpu.$(OBJ): $(WCPULIB)wcpu.h $(WCPULIB)wcpu.c
252 wcl $(FLAGS) -c $(WCPULIB)wcpu.c
254 16text.$(OBJ): $(SRCLIB)16text.c
255 wcl $(FLAGS) -c $(SRCLIB)16text.c
257 mapread.$(OBJ): $(SRCLIB)mapread.h $(SRCLIB)mapread.c
258 wcl $(FLAGS) -c $(SRCLIB)mapread.c
260 #fmapread.$(OBJ): $(SRCLIB)fmapread.h $(SRCLIB)fmapread.c 16.lib
261 # wcl $(FLAGS) $(MFLAGS) -c $(SRCLIB)fmapread.c 16.lib
263 timer.$(OBJ): $(SRCLIB)timer.h $(SRCLIB)timer.c
264 wcl $(FLAGS) -c $(SRCLIB)timer.c
266 16_in.$(OBJ): $(SRCLIB)16_in.h $(SRCLIB)16_in.c
267 wcl $(FLAGS) -c $(SRCLIB)16_in.c
269 16_mm.$(OBJ): $(SRCLIB)16_mm.h $(SRCLIB)16_mm.c
270 wcl $(FLAGS) -c $(SRCLIB)16_mm.c
272 16_ca.$(OBJ): $(SRCLIB)16_ca.h $(SRCLIB)16_ca.c
273 wcl $(FLAGS) -c $(SRCLIB)16_ca.c
275 midi.$(OBJ): $(SRCLIB)midi.h $(SRCLIB)midi.c
276 wcl $(FLAGS) -c $(SRCLIB)midi.c
281 adlib.$(OBJ): $(DOSLIB)adlib.h $(DOSLIB)adlib.c
282 wcl $(FLAGS) -c $(DOSLIB)adlib.c
284 8254.$(OBJ): $(DOSLIB)8254.h $(DOSLIB)8254.c
285 wcl $(FLAGS) -c $(DOSLIB)8254.c
287 8259.$(OBJ): $(DOSLIB)8259.h $(DOSLIB)8259.c
288 wcl $(FLAGS) -c $(DOSLIB)8259.c
290 dos.$(OBJ): $(DOSLIB)dos.h $(DOSLIB)dos.c
291 wcl $(FLAGS) -c $(DOSLIB)dos.c
293 cpu.$(OBJ): $(DOSLIB)cpu.h $(DOSLIB)cpu.c
294 wcl $(FLAGS) -c $(DOSLIB)cpu.c
296 himemsys.$(OBJ): $(DOSLIB)himemsys.h $(DOSLIB)himemsys.c
297 wcl $(FLAGS) -c $(DOSLIB)himemsys.c
299 emm.$(OBJ): $(DOSLIB)emm.h $(DOSLIB)emm.c
300 wcl $(FLAGS) -c $(DOSLIB)emm.c
302 # end of doslib stuff
304 16_head.$(OBJ): $(SRCLIB)16_head.h $(SRCLIB)16_head.c
305 wcl $(FLAGS) -c $(SRCLIB)16_head.c
307 16_hc.$(OBJ): $(SRCLIB)16_hc.h $(SRCLIB)16_hc.c
308 wcl $(FLAGS) -c $(SRCLIB)16_hc.c
310 16_snd.$(OBJ): $(SRCLIB)16_snd.h $(SRCLIB)16_snd.c
311 wcl $(FLAGS) -c $(SRCLIB)16_snd.c
312 #====wcl -mc -c $(SRCLIB)16_snd.c
314 jsmn.$(OBJ): $(JSMNLIB)jsmn.h $(JSMNLIB)jsmn.c
315 wcl $(FLAGS) -c $(JSMNLIB)jsmn.c
317 kitten.$(OBJ): $(NYANLIB)kitten.h $(NYANLIB)kitten.c
318 wcl $(FLAGS) -c $(NYANLIB)kitten.c
320 vgmSnd.$(OBJ): $(VGMSNDLIB)vgmSnd.h $(VGMSNDLIB)vgmSnd.c
321 wcl $(FLAGS) -c $(VGMSNDLIB)vgmSnd.c
322 #====wcl -c -mc $(VGMSNDLIB)vgmSnd.c
324 #3812intf.$(OBJ): $(VGMSNDLIB)3812intf.h $(VGMSNDLIB)3812intf.c
325 # wcl $(FLAGS) -c $(VGMSNDLIB)3812intf.c
327 #farjsmn.$(OBJ): $(JSMNLIB)farjsmn.h $(JSMNLIB)farjsmn.c
328 # wcl $(FLAGS) $(MFLAGS) -c $(JSMNLIB)farjsmn.c
330 #memory.$(OBJ): $(EXMMLIB)memory.h $(EXMMLIB)memory.c
331 # wcl $(FLAGS) $(MFLAGS) -c $(EXMMLIB)memory.c
337 @$(REMOVECOMMAND) $(EXEC)
338 @$(REMOVECOMMAND) *.$(OBJ)
339 @$(REMOVECOMMAND) *.lib
344 @$(REMOVECOMMAND) *.16
345 @$(REMOVECOMMAND) *.16W
346 @$(REMOVECOMMAND) *.16B
347 @$(REMOVECOMMAND) *.OBJ
348 @$(REMOVECOMMAND) *.o
349 @$(REMOVECOMMAND) *.BCO
350 @$(REMOVECOMMAND) makefi~1
351 @$(REMOVECOMMAND) makefile~
352 @$(REMOVECOMMAND) __wcl__.LNK
353 # @$(REMOVECOMMAND) *.smp
354 @$(REMOVECOMMAND) *.SMP
355 @$(REMOVECOMMAND) *.hed
356 @$(REMOVECOMMAND) *.MAP
357 @$(REMOVECOMMAND) *.map
358 @$(REMOVECOMMAND) *.err
359 @$(COPYCOMMAND) .git/config git_con.fig
360 # @$(COPYCOMMAND) $(SRC)exmmtest.c $(EXMMTESTDIR)$(SRC)
361 # @$(COPYCOMMAND) $(SRCLIB)16_mm.* $(EXMMTESTDIR)$(SRCLIB)
362 # @$(COPYCOMMAND) $(SRCLIB)16_head.* $(EXMMTESTDIR)$(SRCLIB)
363 # @$(COPYCOMMAND) $(SRCLIB)16_ca.* $(EXMMTESTDIR)$(SRCLIB)
364 # @$(COPYCOMMAND) $(SRCLIB)16_hc.* $(EXMMTESTDIR)$(SRCLIB)
365 # @$(COPYCOMMAND) $(SRCLIB)types.h $(EXMMTESTDIR)$(SRCLIB)
366 # @$(COPYCOMMAND) $(NYANLIB)* $(EXMMTESTDIR)$(NYANLIB)