]> 4ch.mooo.com Git - 16.git/blob - makefile
75ec9f964d05fba78fb287cf313ec57408b8bcde
[16.git] / makefile
1 #
2 #       Higanbana Project makefile
3 #
4 #
5 # Possible optimizations for 8088 class processors
6 #
7 # -oa   Relax alias checking
8 # -ob   Try to generate straight line code
9 # -oe - expand user functions inline (-oe=20 is default, adds lots of code)
10 # -oh   Enable repeated optimizations
11 # -oi   generate certain lib funcs inline
12 # -oi+  Set max inline depth (C++ only, use -oi for C)
13 # -ok   Flowing of register save into function flow graph
14 # -ol   loop optimizations
15 # -ol+  loop optimizations plus unrolling
16 # -or   Reorder for pipelined (486+ procs); not sure if good to use
17 # -os   Favor space over time
18 # -ot   Favor time over space
19 # -ei   Allocate an "int" for all enum types
20 # -zp2  Allow compiler to add padding to structs
21 # -zpw  Use with above; make sure you are warning free!
22 # -0    8088/8086 class code generation
23 # -s    disable stack overflow checking
24
25 # -zk0u translate kanji to unicode... wwww
26 # -zk0  kanji support~
27 # -zkl          current codepage
28
29 # this enables debug output to the serial port.
30 # comment this out on game release.
31 # serial output goes to COM1 at 9600 baud 1 stop bit odd parity.
32 # serial output is plain text ASCII.
33 DEBUGSERIAL=1
34
35 #192x144
36 #wwww will add these
37 !ifdef __LINUX__
38 #!ifdef UNIX
39 to_os_path=\=/
40 REMOVECOMMAND=rm -f
41 COPYCOMMAND=cp -f
42 DIRSEP=/
43 OBJ=obj
44 DUMP=cat
45 !else           #DOS ^^
46 to_os_path=/=\
47 REMOVECOMMAND=*del
48 COPYCOMMAND=*copy /y
49 DIRSEP=\
50 OBJ=obj
51 DUMP=*type
52 !endif
53
54 TARGET_OS = dos
55
56 #EXMMTESTDIR=16$(DIRSEP)exmmtest$(DIRSEP)
57 PDIR=..$(DIRSEP)
58 SRC=src$(DIRSEP)
59 DATADIR=data$(DIRSEP)
60 SPRI=$(DATADIR)$(DIRSEP)spri$(DIRSEP)
61 SRCLIB=$(SRC)lib$(DIRSEP)
62 JSMNLIB=$(SRCLIB)jsmn$(DIRSEP)
63 NYANLIB=$(SRCLIB)nyan$(DIRSEP)
64 #EXMMLIB=$(SRCLIB)exmm$(DIRSEP)
65 MODEXLIB=$(SRCLIB)modex16$(DIRSEP)
66 MODEXLIB_=$(SRCLIB)modex$(DIRSEP)
67 VGMSNDLIB=$(SRCLIB)vgmsnd$(DIRSEP)
68 DOSLIB=$(SRCLIB)doslib$(DIRSEP)
69 DOSLIBDIR=$(SRCLIB)doslib
70 WCPULIB=$(SRCLIB)wcpu$(DIRSEP)
71
72 #
73 # quiet flags
74 #
75 WLIBQ=-q
76 WCLQ=-zq $(WLIBQ)
77 UPXQ=-qqq
78
79 #
80 # compile flags
81 #
82 AFLAGS=-mh -0 -d1
83 SFLAGS=-sg -st -of+ -zu -zdf -zff -zgf -k32768#54096#60000
84 DFLAGS=-bt=dos -DTARGET_MSDOS=16 -DMSDOS=1 $(SFLAGS)
85 ZFLAGS=-zk0 -zc -zp8 -zm $(WCLQ)
86 LFLAGS=-lr -l=dos
87 CFLAGS=$(AFLAGS) $(IFLAGS) -wo -i$(DOSLIB) $(LFLAGS) -fo=.$(OBJ)
88 OFLAGS=-obmilr -oe=24 -out -oh -ei -zp8 -fpi87  -onac -ol+ -ok##x
89 FLAGS=$(CFLAGS) $(OFLAGS) $(DFLAGS) $(ZFLAGS)
90
91 #
92 # objects
93 #
94 VGMSNDOBJ = vgmSnd.$(OBJ) 16_snd.$(OBJ)
95 DOSLIBOBJ = adlib.$(OBJ) 8254.$(OBJ) 8259.$(OBJ) dos.$(OBJ) cpu.$(OBJ)
96 16LIBOBJS = 16_in.$(OBJ) 16_mm.$(OBJ) wcpu.$(OBJ) 16_head.$(OBJ) 16_ca.$(OBJ) 16_dbg.$(OBJ) kitten.$(OBJ) 16_hc.$(OBJ) 16_timer.$(OBJ)
97 GFXLIBOBJS = modex16.$(OBJ) bitmap.$(OBJ) 16text.$(OBJ) bakapee.$(OBJ) scroll16.$(OBJ) 16render.$(OBJ) $(DOSLIBLIBS) 16_vrs.$(OBJ) 16_sprit.$(OBJ)
98 #planar.$(OBJ) 16planar.$(OBJ)
99 DOSLIBLIBS=$(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)cpu$(DIRSEP)dos86h$(DIRSEP)cpu.lib $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)dos$(DIRSEP)dos86h$(DIRSEP)dos.lib $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)vga$(DIRSEP)dos86h$(DIRSEP)vga.lib
100
101 !ifeq DEBUGSERIAL 1
102 FLAGS += -DDEBUGSERIAL
103 DOSLIBOBJ += 8250.$(OBJ)
104 DOSLIBLIBS += $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)8250$(DIRSEP)dos86h$(DIRSEP)8250.lib
105 !endif
106
107 TESTEXEC = test.exe test0.exe pcxtest.exe pcxtest2.exe palettec.exe maptest.exe fmemtest.exe fonttest.exe fontgfx.exe scroll.exe vgmtest.exe inputest.exe palettel.exe exmmtest.exe vrstest.exe
108 ##planrpcx.exe test2.exe
109 EXEC = 16.exe bakapi.exe tesuto.exe 0.exe $(TESTEXEC)
110
111 all: $(EXEC) joytest.exe
112 #16.lib => $(16LIBOBJS) bug....
113 16LIB=$(16LIBOBJS)
114 #16LIB=16.lib
115
116 !ifeq DEBUGSERIAL 1
117 16LIBOBJS += $(DOSLIBLIBS)
118 !endif
119
120 #
121 #game and bakapi executables
122 #
123 16.exe: 16.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) $(16LIB) gfx.lib
124         *wcl $(FLAGS) $(16FLAGS) 16.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) $(16LIB) gfx.lib -fm=16.mah
125
126 bakapi.exe: bakapi.$(OBJ) gfx.lib $(DOSLIBLIBS)
127         *wcl $(FLAGS) $(BAKAPIFLAGS) bakapi.$(OBJ) gfx.lib $(DOSLIBLIBS) -fm=bakapi.mah
128
129 #
130 #Test Executables!
131 #
132 scroll.exe: scroll.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) $(16LIB) gfx.lib
133         *wcl $(FLAGS) scroll.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) $(16LIB) gfx.lib -fm=scroll.mah
134 scroll.$(OBJ): $(SRC)scroll.c
135         *wcl $(FLAGS) -c $(SRC)scroll.c
136
137 tesuto.exe: tesuto.$(OBJ) $(DOSLIBLIBS) 16_head.$(OBJ) gfx.lib
138         *wcl $(FLAGS) $(WCLQ) tesuto.$(OBJ) $(DOSLIBLIBS) 16_head.$(OBJ) gfx.lib
139 tesuto.$(OBJ): $(SRC)tesuto.c
140         *wcl $(FLAGS) $(WCLQ) -c $(SRC)tesuto.c
141
142 0.exe: 0.$(OBJ) $(DOSLIBLIBS) gfx.lib $(16LIB)
143         *wcl $(FLAGS) $(WCLQ) 0.$(OBJ) $(DOSLIBLIBS) gfx.lib $(16LIB)
144 0.$(OBJ): $(SRC)0.c
145         *wcl $(FLAGS) $(WCLQ) -c $(SRC)0.c
146
147 test.exe: test.$(OBJ) gfx.lib $(DOSLIBLIBS) $(16LIB)
148         *wcl $(FLAGS) test.$(OBJ) gfx.lib $(DOSLIBLIBS) $(16LIB) -fm=test.mah
149
150 #test2.exe: test2.$(OBJ) $(DOSLIBLIBS) gfx.lib
151 #       *wcl $(FLAGS) test2.$(OBJ) $(DOSLIBLIBS) gfx.lib -fm=test2.mah
152
153 test0.exe: test0.$(OBJ)
154         *wcl $(FLAGS) test0.$(OBJ) -fm=test0.mah
155
156 fonttest.exe: fonttest.$(OBJ) $(16LIB) gfx.lib
157         *wcl $(FLAGS) fonttest.$(OBJ) $(16LIB) gfx.lib -fm=fonttest.mah
158
159 #fonttes0.exe: fonttes0.$(OBJ) $(16LIB)
160 #       *wcl $(FLAGS) fonttes0.$(OBJ) $(16LIB)
161
162 fontgfx.exe: fontgfx.$(OBJ) $(16LIB) gfx.lib $(DOSLIBLIBS)
163         *wcl $(FLAGS) fontgfx.$(OBJ) $(16LIB) gfx.lib $(DOSLIBLIBS) -fm=fontgfx.mah
164
165 inputest.exe: inputest.$(OBJ) $(16LIB)
166         *wcl $(FLAGS) inputest.$(OBJ) $(16LIB) -fm=inputest.mah
167
168 #sountest.exe: sountest.$(OBJ) $(16LIB)
169 #       *wcl $(FLAGS) sountest.$(OBJ) $(16LIB)
170
171 pcxtest.exe: pcxtest.$(OBJ) gfx.lib
172         *wcl $(FLAGS) pcxtest.$(OBJ) gfx.lib -fm=pcxtest.mah
173
174 vrstest.exe: vrstest.$(OBJ) gfx.lib $(16LIB)
175         *wcl $(FLAGS) vrstest.$(OBJ) gfx.lib $(16LIB) -fm=vrstest.mah
176
177 palettec.exe: palettec.$(OBJ) gfx.lib #$(16LIB)
178         *wcl $(FLAGS) palettec.$(OBJ) gfx.lib -fm=palettec.mah #$(16LIB)
179
180 palettel.exe: palettel.$(OBJ) gfx.lib #$(16LIB)
181         *wcl $(FLAGS) palettel.$(OBJ) gfx.lib -fm=palettel.mah #$(16LIB)
182
183 pcxtest2.exe: pcxtest2.$(OBJ) gfx.lib
184         *wcl $(FLAGS) pcxtest2.$(OBJ) gfx.lib -fm=pcxtest2.mah
185
186 ##planrpcx.exe: planrpcx.$(OBJ) gfx.lib
187 ##      *wcl $(FLAGS) planrpcx.$(OBJ) gfx.lib -fm=planrpcx.mah
188
189 maptest.exe: maptest.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) $(16LIB) gfx.lib
190         *wcl $(FLAGS) maptest.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) $(16LIB) gfx.lib -fm=maptest.mah
191
192 fmemtest.exe: fmemtest.$(OBJ) $(16LIB)
193         *wcl $(FLAGS) fmemtest.$(OBJ) $(16LIB) -fm=fmemtest.mah
194
195 exmmtest.exe: exmmtest.$(OBJ) 16_in.$(OBJ) 16_mm.$(OBJ) wcpu.$(OBJ) 16_head.$(OBJ) 16_ca.$(OBJ) 16_hc.$(OBJ) kitten.$(OBJ)
196         *wcl $(FLAGS) exmmtest.$(OBJ) -fm=exmmtest.mah $(16LIB)
197
198 vgmtest.exe: vgmtest.$(OBJ) vgmsnd.lib $(16LIB)
199         *wcl $(FLAGS) vgmtest.$(OBJ) vgmsnd.lib -fm=vgmtest.mah $(16LIB)
200
201
202 #
203 #executable's objects
204 #
205 {$(SRC)}.C.$(OBJ):
206         *wcl $(FLAGS) -c $[@
207
208 16.$(OBJ): $(SRC)16.h $(SRC)16.c
209 ####    *wcl $(FLAGS) -c $(SRC)16.c
210
211 bakapi.$(OBJ): $(SRC)bakapi.h $(SRC)bakapi.c
212 ####    *wcl $(FLAGS) -c $(SRC)bakapi.c
213
214 test.$(OBJ): $(SRC)test.c $(SRCLIB)modex16.h
215 ####    *wcl $(FLAGS) -c $(SRC)test.c
216
217 #test2.$(OBJ): $(SRC)test2.c $(SRCLIB)modex16.h
218 #####   *wcl $(FLAGS) -c $(SRC)test2.c
219
220 test0.$(OBJ): $(SRC)test0.c
221 ####    *wcl $(FLAGS) -c $(SRC)test0.c
222
223 pcxtest.$(OBJ): $(SRC)pcxtest.c $(SRCLIB)modex16.h
224 ####    *wcl $(FLAGS) -c $(SRC)pcxtest.c
225
226 vrstest.$(OBJ): $(SRC)vrstest.c $(SRCLIB)modex16.h
227 ####    *wcl $(FLAGS) -c $(SRC)vrstest.c
228
229 ##planrpcx.$(OBJ): $(SRC)planrpcx.c $(SRCLIB)modex16.h
230 ######  *wcl $(FLAGS) -c $(SRC)planrpcx.c
231
232 pcxtest2.$(OBJ): $(SRC)pcxtest2.c $(SRCLIB)modex16.h
233 ####    *wcl $(FLAGS) -c $(SRC)pcxtest2.c
234
235 palettec.$(OBJ): $(SRC)palettec.c
236 ####    *wcl $(FLAGS) -c $(SRC)palettec.c
237
238 palettel.$(OBJ): $(SRC)palettel.c
239 ####    *wcl $(FLAGS) -c $(SRC)palettel.c
240
241 maptest.$(OBJ): $(SRC)maptest.c $(SRCLIB)modex16.h
242 ####    *wcl $(FLAGS) -c $(SRC)maptest.c
243
244 #emmtest.$(OBJ): $(SRC)emmtest.c
245 #####   *wcl $(FLAGS) $(MFLAGS) -c $(SRC)emmtest.c
246
247 #emsdump.$(OBJ): $(SRC)emsdump.c
248 #####   *wcl $(FLAGS) $(MFLAGS) -c $(SRC)emsdump.c
249
250 fmemtest.$(OBJ): $(SRC)fmemtest.c
251 ####    *wcl $(FLAGS) -c $(SRC)fmemtest.c
252
253 fonttest.$(OBJ): $(SRC)fonttest.c
254 ####    *wcl $(FLAGS) -c $(SRC)fonttest.c
255
256 #fonttes0.$(OBJ): $(SRC)fonttes0.c
257 #####   *wcl $(FLAGS) -c $(SRC)fonttes0.c
258
259 fontgfx.$(OBJ): $(SRC)fontgfx.c
260 ####    *wcl $(FLAGS) -c $(SRC)fontgfx.c
261
262 inputest.$(OBJ): $(SRC)inputest.c
263 ####    *wcl $(FLAGS) -c $(SRC)inputest.c
264
265 #sountest.$(OBJ): $(SRC)sountest.c
266 #       *wcl $(FLAGS) -c $(SRC)sountest.c
267
268 #miditest.$(OBJ): $(SRC)miditest.c
269 #       *wcl $(FLAGS) -c $(SRC)miditest.c
270
271 #testemm.$(OBJ): $(SRC)testemm.c
272 #       *wcl $(FLAGS) -c $(SRC)testemm.c
273
274 #testemm0.$(OBJ): $(SRC)testemm0.c
275 #       *wcl $(FLAGS) -c $(SRC)testemm0.c
276
277 tsthimem.$(OBJ): $(SRC)tsthimem.c
278 ####    *wcl $(FLAGS) -c $(SRC)tsthimem.c
279
280 exmmtest.$(OBJ): $(SRC)exmmtest.c
281 ####    *wcl $(FLAGS) -c $(SRC)exmmtest.c 16_in.$(OBJ) 16_mm.$(OBJ) wcpu.$(OBJ) 16_head.$(OBJ) 16_ca.$(OBJ) 16_hc.$(OBJ) kitten.$(OBJ)
282
283 vgmtest.$(OBJ): $(SRC)vgmtest.c
284 ####    *wcl $(FLAGS) -c $(SRC)vgmtest.c
285         #====*wcl -mc -c $(SRC)vgmtest.c
286
287 #
288 #non executable objects libraries
289 #
290 16.lib: $(16LIBOBJS)# doslib.lib vgmsnd.lib
291         *wlib -b $(WLIBQ) 16.lib $(16LIBOBJS)# doslib.lib vgmsnd.lib
292
293 gfx.lib: $(GFXLIBOBJS)
294         *wlib -b $(WLIBQ) gfx.lib $(GFXLIBOBJS)
295
296 vgmsnd.lib: $(VGMSNDOBJ)
297         *wlib -b $(WLIBQ) vgmsnd.lib $(VGMSNDOBJ)
298
299 # extdep:
300 # !include $(DOSLIBDIR)$(DIRSEP)extdep.mak
301
302 # library deps 16-bit huge
303 $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)cpu$(DIRSEP)dos86h$(DIRSEP)cpu.lib:
304         cd $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)cpu && .$(DIRSEP)make.sh
305 $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)dos$(DIRSEP)dos86h$(DIRSEP)dos.lib:
306         cd $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)dos && .$(DIRSEP)make.sh
307 $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)vga$(DIRSEP)dos86h$(DIRSEP)vgatty.lib:
308         cd $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)vga && .$(DIRSEP)make.sh
309 $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)vga$(DIRSEP)dos86h$(DIRSEP)vga.lib:
310         cd $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)vga && .$(DIRSEP)make.sh
311 $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)8250$(DIRSEP)dos86h$(DIRSEP)8250.lib:
312         cd $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)8250 && .$(DIRSEP)make.sh
313
314 joytest.exe:
315         cd $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)joystick && .$(DIRSEP)make.sh && $(COPYCOMMAND) dos86h$(DIRSEP)test.exe $(PDIR)$(PDIR)$(PDIR)$(PDIR)$(PDIR)joytest.exe
316 #$(DOSLIBLIBS): .symbolic
317 #       @cd $(DOSLIB)
318 #       @.$(DIRSEP)buildall.sh
319 #       @cd $(PDIR)$(PDIR)$(PDIR)
320
321 modex16.$(OBJ): $(SRCLIB)modex16.h $(SRCLIB)modex16.c
322         *wcl $(FLAGS) -c $(SRCLIB)modex16.c
323
324 bakapee.$(OBJ): $(SRCLIB)bakapee.h $(SRCLIB)bakapee.c
325         *wcl $(FLAGS) -c $(SRCLIB)bakapee.c
326
327 16render.$(OBJ): $(MODEXLIB)16render.h $(MODEXLIB)16render.c
328         *wcl $(FLAGS) -c $(MODEXLIB)16render.c
329
330 ##16planar.$(OBJ): $(MODEXLIB)16planar.h $(MODEXLIB)16planar.c
331 ##      *wcl $(FLAGS) -c $(MODEXLIB)16planar.c
332
333 16_vrs.$(OBJ): $(SRCLIB)16_vrs.h $(SRCLIB)16_vrs.c $(DOSLIBLIBS)
334         *wcl $(FLAGS) -c $(SRCLIB)16_vrs.c $(DOSLIBLIBS)
335 16_sprit.$(OBJ): $(SRCLIB)16_sprit.h $(SRCLIB)16_sprit.c
336         *wcl $(FLAGS) -c $(SRCLIB)16_sprit.c
337
338
339 bitmap.$(OBJ): $(SRCLIB)bitmap.h $(SRCLIB)bitmap.c
340         *wcl $(FLAGS) -c $(SRCLIB)bitmap.c
341
342 ##planar.$(OBJ): $(SRCLIB)planar.h $(SRCLIB)planar.c
343 ##      *wcl $(FLAGS) -c $(SRCLIB)planar.c
344
345 scroll16.$(OBJ): $(SRCLIB)scroll16.h $(SRCLIB)scroll16.c
346         *wcl $(FLAGS) -c $(SRCLIB)scroll16.c
347
348 wcpu.$(OBJ): $(WCPULIB)wcpu.h $(WCPULIB)wcpu.c
349         *wcl $(FLAGS) -c $(WCPULIB)wcpu.c
350
351 16text.$(OBJ): $(SRCLIB)16text.c
352         *wcl $(FLAGS) -c $(SRCLIB)16text.c
353
354 mapread.$(OBJ): $(SRCLIB)mapread.h $(SRCLIB)mapread.c
355         *wcl $(FLAGS) -c $(SRCLIB)mapread.c
356
357 16_timer.$(OBJ): $(SRCLIB)16_timer.h $(SRCLIB)16_timer.c
358         *wcl $(FLAGS) -c $(SRCLIB)16_timer.c
359
360 16_in.$(OBJ): $(SRCLIB)16_in.h $(SRCLIB)16_in.c
361         *wcl $(FLAGS) -c $(SRCLIB)16_in.c
362
363 16_mm.$(OBJ): $(SRCLIB)16_mm.h $(SRCLIB)16_mm.c
364         *wcl $(FLAGS) -c $(SRCLIB)16_mm.c
365
366 16_ca.$(OBJ): $(SRCLIB)16_ca.h $(SRCLIB)16_ca.c
367         *wcl $(FLAGS) -c $(SRCLIB)16_ca.c
368
369 16_dbg.$(OBJ): $(SRCLIB)16_dbg.h $(SRCLIB)16_dbg.c
370         *wcl $(FLAGS) -c $(SRCLIB)16_dbg.c
371
372 midi.$(OBJ): $(SRCLIB)midi.h $(SRCLIB)midi.c
373         *wcl $(FLAGS) -c $(SRCLIB)midi.c
374
375 16_head.$(OBJ): $(SRCLIB)16_head.h $(SRCLIB)16_head.c
376         *wcl $(FLAGS) -c $(SRCLIB)16_head.c
377
378 16_hc.$(OBJ): $(SRCLIB)16_hc.h $(SRCLIB)16_hc.c
379         *wcl $(FLAGS) -c $(SRCLIB)16_hc.c
380
381 16_snd.$(OBJ): $(SRCLIB)16_snd.h $(SRCLIB)16_snd.c
382         *wcl $(FLAGS) -c $(SRCLIB)16_snd.c
383         #====*wcl -mc -c $(SRCLIB)16_snd.c
384
385 jsmn.$(OBJ): $(JSMNLIB)jsmn.h $(JSMNLIB)jsmn.c
386         *wcl $(FLAGS) -c $(JSMNLIB)jsmn.c
387
388 kitten.$(OBJ): $(NYANLIB)kitten.h $(NYANLIB)kitten.c
389         *wcl $(FLAGS) -c $(NYANLIB)kitten.c
390
391 vgmSnd.$(OBJ): $(VGMSNDLIB)vgmSnd.h $(VGMSNDLIB)vgmSnd.c
392         *wcl $(FLAGS) -c $(VGMSNDLIB)vgmSnd.c
393         #====*wcl -c -mc $(VGMSNDLIB)vgmSnd.c
394
395 #memory.$(OBJ): $(EXMMLIB)memory.h $(EXMMLIB)memory.c
396 #       *wcl $(FLAGS) $(MFLAGS) -c $(EXMMLIB)memory.c
397
398 c_utils.$(OBJ): $(MODEXLIB_)c_utils.asm
399         *wcl -c $(AFLAGS) $(MODEXLIB_)c_utils.asm
400 modex.$(OBJ): $(MODEXLIB_)modex.asm
401         *wcl -c $(AFLAGS) $(MODEXLIB_)modex.asm
402
403 #
404 #other~
405 #
406 clean: .symbolic
407         @$(REMOVECOMMAND) $(EXEC)
408         @$(REMOVECOMMAND) *.$(OBJ)
409 !ifdef __LINUX__
410         @rm *.LIB
411 !endif
412         @$(REMOVECOMMAND) 16.lib
413         @$(REMOVECOMMAND) gfx.lib
414         @$(REMOVECOMMAND) vgmsnd.lib
415         @*wlib -n $(WLIBQ) 16.lib
416         @*wlib -n $(WLIBQ) gfx.lib
417         @*wlib -n $(WLIBQ) vgmsnd.lib
418         @$(REMOVECOMMAND) *.16W
419         @$(REMOVECOMMAND) *.16B
420         @$(REMOVECOMMAND) *.OBJ
421         @$(REMOVECOMMAND) *.o
422         @$(REMOVECOMMAND) *.BCO
423         #@$(REMOVECOMMAND) makefi~1
424         #@$(REMOVECOMMAND) makefile~
425         @$(REMOVECOMMAND) __wcl__.LNK
426 #       @$(REMOVECOMMAND) *.smp
427         @$(REMOVECOMMAND) *.SMP
428         @$(REMOVECOMMAND) *.hed
429         @$(REMOVECOMMAND) *.MAH
430         @$(REMOVECOMMAND) *.mah
431         @$(REMOVECOMMAND) *.err
432         @echo $(OBJ)
433         #@cd $(DOSLIB)
434         #@./buildall.sh clean
435         #@cd $(PDIR)$(PDIR)$(PDIR)
436 #       @$(COPYCOMMAND) $(SRC)exmmtest.c $(EXMMTESTDIR)$(SRC)
437 #       @$(COPYCOMMAND) $(SRCLIB)16_mm.* $(EXMMTESTDIR)$(SRCLIB)
438 #       @$(COPYCOMMAND) $(SRCLIB)16_head.* $(EXMMTESTDIR)$(SRCLIB)
439 #       @$(COPYCOMMAND) $(SRCLIB)16_ca.* $(EXMMTESTDIR)$(SRCLIB)
440 #       @$(COPYCOMMAND) $(SRCLIB)16_hc.* $(EXMMTESTDIR)$(SRCLIB)
441 #       @$(COPYCOMMAND) $(SRCLIB)types.h $(EXMMTESTDIR)$(SRCLIB)
442 #       @$(COPYCOMMAND) $(NYANLIB)* $(EXMMTESTDIR)$(NYANLIB)
443 #       @echo $(watcom)
444 #       @echo $(INCLUDE)
445
446 backupconfig: .symbolic
447         @$(COPYCOMMAND) .git$(DIRSEP)config git_con.fig
448         @$(COPYCOMMAND) .gitmodules git_modu.les
449         @$(COPYCOMMAND) .gitignore git_igno.re
450
451 comp: .symbolic
452         @*upx -9 $(EXEC)
453
454 comq: .symbolic
455         @*upx -9 $(UPXQ) $(EXEC)
456
457 www: .symbolic
458         @ssh -p 26 sparky4@4ch.mooo.com 'rm -f /var/www/16/*exe*'
459         #@rm -f /var/www/$(EXEC)*
460         @rm -f /var/www/*.exe.zip*
461         #@cp ./$(EXEC) $(DIRSEP)var$(DIRSEP)www$(DIRSEP)
462         @./src/util/z.sh $(EXEC) $(EXEC)
463         @scp -r -P 26 *.exe 4ch.mooo.com:/var/www/16/
464         @scp -r -P 26 x4get.bat 4ch.mooo.com:/var/www/16/
465         @scp -r -P 26 /var/www/*.exe.zip.* 4ch.mooo.com:/var/www/16/
466
467 getwww: .symbolic
468         *x4get.bat $(EXEC)
469
470 vomitchan: .symbolic
471         @$(DUMP) *.err
472
473 ##
474 ##      External library management~ ^^
475 ##
476 #git submodule add <repo>
477 mkdl: .symbolic
478         @cd $(DOSLIB)
479         @./buildall.sh
480         @cd $(PDIR)$(PDIR)$(PDIR)
481
482 uplibs: .symbolic
483         @cd $(JSMNLIB)
484         @git pull
485         @cd $(PDIR)$(PDIR)$(PDIR)
486         @cd $(DOSLIB)
487         @git pull
488         @cd $(PDIR)$(PDIR)$(PDIR)
489
490 reinitlibs: .symbolic
491         @rm -rf $(SRCLIB)doslib
492         @rm -rf $(SRCLIB)jsmn
493         @rm -rf 16/CatacombApocalypse
494         @rm -rf 16/wolf3d
495         @rm -rf 16/keen
496         @wmake -h initlibs
497
498 initlibs: .symbolic
499         @cp git_con.fig .git/config
500         @cp git_modu.les .gitmodules
501         @cp git_igno.re .gitignore
502         @cd $(SRCLIB)
503         @git clone https://github.com/joncampbell123/doslib.git
504         @git clone https://github.com/zserge/jsmn.git
505         @cd $(PDIR)$(PDIR)
506         @cd 16
507         @git clone https://github.com/FlatRockSoft/CatacombApocalypse.git
508         @git clone https://github.com/id-Software/wolf3d.git
509         @git clone https://github.com/keendreams/keen.git
510         @cd $(PDIR)
511         @cp $(SRCLIB)doslib/make-lowercase .
512
513 ##
514 ##      experimental libs
515 ##
516 xlib: .symbolic
517         @cd 16$(DIRSEP)xlib
518         @wmake -h clean
519         @wmake -h all
520         @cd $(PDIR)$(PDIR)
521
522 mx: .symbolic
523         @cd 16$(DIRSEP)xw
524 #       @wmake clean
525         @wmake -h all
526         @cd $(PDIR)$(PDIR)
527
528 mx_: .symbolic
529         @cd 16$(DIRSEP)xw_
530         @wmake -h -f makefile all
531         @cd $(PDIR)$(PDIR)
532
533 vrs: .symbolic
534         @cd $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)vga
535         #@make clean
536         @make all
537         @mv pcx2vrl ../../../../../
538         @mv pcxsscut ../../../../../
539         @mv vrl2vrs ../../../../../
540         @mv vrsdump ../../../../../
541         @cd ../../../../../