2 # Higanbana Project makefile
5 # Possible optimizations for 8088 class processors
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 # -ok Flowing of register save into function flow graph
13 # -ol loop optimizations
14 # -ol+ loop optimizations plus unrolling
15 # -or Reorder for pipelined (486+ procs); not sure if good to use
16 # -os Favor space over time
17 # -ot Favor time over space
18 # -ei Allocate an "int" for all enum types
19 # -zp2 Allow compiler to add padding to structs
20 # -zpw Use with above; make sure you are warning free!
21 # -0 8088/8086 class code generation
22 # -s disable stack overflow checking
24 # -zk0u translate kanji to unicode... wwww
26 # -zkl current codepage
27 # -zd{f,p} DS floats vs DS pegged to DGROUP
29 # -zp{1,2,4,8,16} struct packing align.
30 # -ei force enums to be type int
31 # -wo diagnose problems in overlaid code
33 # this enables debug output to the serial port.
34 # comment this out on game release.
35 # serial output goes to COM1 at 9600 baud 1 stop bit odd parity.
36 # serial output is plain text ASCII.
52 DOSLIBMAKE=./make.sh build all
53 DOSLIBMAKEALL=./buildall.sh build all
63 DOSLIBMAKEALL=.\build.bat
69 BUILD_ROOT=$+$(%__CWD__)$-
70 #EXMMTESTDIR=16$(DIRSEP)exmmtest$(DIRSEP)
75 GITCONFIGDIR=$(UTIL)/git
76 SCRIPTBATDIR=$(UTIL)/shbat
78 JSMNLIB=$(SRCLIB)/jsmn
79 NYANLIB=$(SRCLIB)/nyan
80 EXMMLIB=$(SRCLIB)/exmm
81 MODEXLIB16=$(SRCLIB)/16_vl
82 MODEXLIB=$(SRCLIB)/modex
83 VGMSNDLIB=$(SRCLIB)/vgmsnd
84 DOSLIBDIR=$(SRCLIB)/doslib
85 WCPULIB=$(SRCLIB)/wcpu
86 OLDMODEX16LIBDIR=16/modex16
89 DOSLIB_CPU=$(DOSLIBDIR)/hw/cpu
90 DOSLIB_DOS=$(DOSLIBDIR)/hw/dos
91 DOSLIB_VGA=$(DOSLIBDIR)/hw/vga
92 DOSLIB_8250=$(DOSLIBDIR)/hw/8250
93 DOSLIB_8254=$(DOSLIBDIR)/hw/8254
94 DOSLIB_8259=$(DOSLIBDIR)/hw/8259
95 DOSLIB_ADLIB=$(DOSLIBDIR)/hw/adlib
96 DOSLIB_JOYSTICK=$(DOSLIBDIR)/hw/joystick
97 DOSLIB_MEMMODE=dos86$(MEMORYMODE)
99 # remote host (for sparky4)
101 HOSTADDR=4ch.mooo.com
105 # 2nd remote host (for sparky4)
107 HOST2ADDR=beta.latech.edu
108 HOST2DIR=~/public_html/
117 # symbolic debug for wsample/wprof/wd
127 S_FLAGS=-sg -st -of+ -zu -zdf -zff -zgf -k$(STKSIZ)
128 Z_FLAGS=-zk0 -zc#### -zp4 -ei# -zm
129 O_FLAGS=-opnr -oe=24 -oil+ -outback -ohm
130 T_FLAGS=-bt=dos -wx -m$(MEMORYMODE) -0 -fpi87 $(D_FLAGS) -fo=.$(OBJ)## -e=65536
132 DBUGFLAGS=-fm=$^&.meh -fd=$^& $(D_FLAGS)
133 CPPFLAGS=-DTARGET_MSDOS=16 -DMSDOS=1 -DSTACKSIZE=$(STKSIZ)
135 CPPFLAGS += -DDEBUGSERIAL
137 AFLAGS=$(WCLQ) $(T_FLAGS)
138 CFLAGS=$(WCLQ) $(T_FLAGS) -wo -i"$(DOSLIBDIR)" $(O_FLAGS) $(S_FLAGS) $(Z_FLAGS)
139 LFLAGS=$(WCLQ) -l=dos $(S_FLAGS) $(DBUGFLAGS)
140 LIBFLAGS=$(WLIBQ) -b -n
145 VGMSNDOBJ = vgmSnd.$(OBJ)
146 OLDLIBOBJS=bitmap.$(OBJ) 16render.$(OBJ)
147 GFXLIBOBJS = 16_vl.$(OBJ) 16_vl_1.$(OBJ) 16_vl_2.$(OBJ) 16_vlpal.$(OBJ) 16text.$(OBJ) scroll16.$(OBJ) 16_spri.$(OBJ)
148 16LIBOBJS = 16_mm.$(OBJ) 16_pm.$(OBJ) 16_ca.$(OBJ) 16_tail.$(OBJ) 16_head.$(OBJ) 16_enti.$(OBJ) 16_dbg.$(OBJ) 16_in.$(OBJ) kitten.$(OBJ) 16_hc.$(OBJ) 16_wcpu.$(OBJ) 16_timer.$(OBJ) jsmn.$(OBJ) 16_map.$(OBJ) 16_sd.$(OBJ) 16_tail_.$(OBJ) 16_dbg_1.$(OBJ)
149 DOSLIBOBJ = adlib.$(OBJ) 8254.$(OBJ) 8259.$(OBJ) dos.$(OBJ) cpu.$(OBJ)
151 DOSLIBOBJ += 8250.$(OBJ)
157 DOSLIBLIBS = $(DOSLIB_CPU)/$(DOSLIB_MEMMODE)/cpu.lib $(DOSLIB_DOS)/$(DOSLIB_MEMMODE)/dos.lib $(DOSLIB_VGA)/$(DOSLIB_MEMMODE)/vga.lib $(DOSLIB_8254)/$(DOSLIB_MEMMODE)/8254.lib $(DOSLIB_8259)/$(DOSLIB_MEMMODE)/8259.lib $(DOSLIB_ADLIB)/$(DOSLIB_MEMMODE)/adlib.lib
159 DOSLIBLIBS += $(DOSLIB_8250)/$(DOSLIB_MEMMODE)/8250.lib
167 .c : $(SRC);$(SRCLIB);$(MODEXLIB16);$(JSMNLIB);$(NYANLIB);$(VGMSNDLIB);$(WCPULIB);$(UTIL)
169 .asm : $(MODEXLIB);$(UTIL);16/fcsp2src
171 .lib : .;$(DOSLIB_CPU)/$(DOSLIB_MEMMODE);$(DOSLIB_DOS)/$(DOSLIB_MEMMODE);$(DOSLIB_VGA)/$(DOSLIB_MEMMODE);$(DOSLIB_8250)/$(DOSLIB_MEMMODE);$(DOSLIB_8254)/$(DOSLIB_MEMMODE);$(DOSLIB_ADLIB)/$(DOSLIB_MEMMODE)
179 *wcl $(CFLAGS) $(extra_$^&_obj_opts) $(CPPFLAGS) -c $[@
182 *wcl $(AFLAGS) $(extra_$^&_obj_opts) -c $[@
184 #CFLAGS is neccessary here
186 *wcl $(LFLAGS) $(extra_$^&_exe_opts)$< -fe=$@
188 LIBMAKERULE=*wlib $(LIBFLAGS) $(extra_$^&_lib_opts)$@ $<
193 # List of executables to build
239 #UTILEXEC += $(SPRIUTILEXEC)
250 #EXEC += $(SPRIUTILEXEC)
261 testexec: $(EXEC) $(TESTEXEC2)
264 # game and bakapi executables
266 16.exe: 16.$(OBJ) $(16LIB) gfx.lib $(DOSLIB)
267 bakapi.exe: bakapi.$(OBJ) 16_vl.$(OBJ) 16_vl_1.$(OBJ) 16text.$(OBJ) bakapee.$(OBJ) $(DOSLIB) 16_wcpu.$(OBJ)# gfx.lib
273 scroll.exe: scroll.$(OBJ) $(16LIB) gfx.lib $(DOSLIB)
274 scroll.$(OBJ): $(SRC)/scroll.c
275 xcroll.exe: xcroll.$(OBJ) $(16LIB) gfx.lib $(DOSLIB) bitmapl.$(OBJ)
276 xcroll.$(OBJ): $(SRC)/xcroll.c
277 zcroll.exe: zcroll.$(OBJ) $(16LIB) gfx.lib $(DOSLIB)
278 zcroll.$(OBJ): $(SRC)/zcroll.c
279 tesuto.exe: tesuto.$(OBJ) 16_head.$(OBJ) gfx.lib $(DOSLIB)
280 tesuto.$(OBJ): $(SRC)/tesuto.c
281 0tesuto.exe: 0tesuto.$(OBJ) $(16LIB) gfx.lib $(DOSLIB)
282 0tesuto.$(OBJ): $(SRC)/0tesuto.c
283 vidtest.exe: vidtest.$(OBJ) $(16LIB) gfx.lib $(DOSLIB)
284 paltest.exe: paltest.$(OBJ) $(16LIB) gfx.lib $(DOSLIB)
285 #test2.exe: test2.$(OBJ) gfx.lib $(DOSLIB)
286 test0.exe: test0.$(OBJ)
287 fonttest.exe: fonttest.$(OBJ) gfx.lib
288 #fonttes0.exe: fonttes0.$(OBJ) $(16LIB)
289 fontgfx.exe: fontgfx.$(OBJ) gfx.lib $(DOSLIB)
290 inputest.exe: inputest.$(OBJ) $(16LIB) $(DOSLIB) gfx.lib
291 sountest.exe: sountest.$(OBJ) $(16LIB) $(DOSLIB) gfx.lib
292 imfplay.exe: imfplay.$(OBJ) $(16LIB) $(DOSLIB) gfx.lib
293 vrldbg.exe: vrldbg.$(OBJ) #gfx.lib $(DOSLIB)
294 pcxtest.exe: pcxtest.$(OBJ) gfx.lib $(DOSLIB) $(16LIB)
295 vrstest.exe: vrstest.$(OBJ) $(16LIB) gfx.lib $(DOSLIB)
296 #vgacamm.exe: vgacamm.$(OBJ) $(16LIB) gfx.lib $(DOSLIB)
297 palettec.exe: palettec.$(OBJ) $(16LIB) gfx.lib $(DOSLIB)
298 palettel.exe: palettel.$(OBJ) $(16LIB) gfx.lib $(DOSLIB)
299 palbomb.exe: palbomb.$(OBJ) $(16LIB) gfx.lib $(DOSLIB)
300 palllist.exe: palllist.$(OBJ) $(16LIB) gfx.lib $(DOSLIB) ll.$(OBJ)
301 pcxtest2.exe: pcxtest2.$(OBJ) gfx.lib $(DOSLIB)
302 #planrpcx.exe: planrpcx.$(OBJ) gfx.lib
303 maptest.exe: maptest.$(OBJ) 16_map.$(OBJ) 16_head.$(OBJ) gfx.lib $(DOSLIB) $(16LIB)
304 fmemtest.exe: fmemtest.$(OBJ)
305 exmmtest.exe: exmmtest.$(OBJ) $(16LIB) gfx.lib $(DOSLIB)
306 #16_pm.$(OBJ) 16_head.$(OBJ) 16_ca.$(OBJ) 16_mm.$(OBJ) 16_hc.$(OBJ) kitten.$(OBJ) 16_vl_1.$(OBJ) 16_tail.$(OBJ) 16_in.$(OBJ) 16_dbg.$(OBJ)
308 vgmtest.exe: vgmtest.$(OBJ) vgmsnd.lib $(16LIB) $(DOSLIB) gfx.lib
310 ps.exe: ps.$(OBJ) 16_head.$(OBJ)
311 wcpu.exe: wcpu.$(OBJ) $(16LIB) $(DOSLIB)
314 # executable's objects
316 16.$(OBJ): $(SRC)/16.c $(SRC)/16.h
317 bakapi.$(OBJ): $(SRC)/bakapi.c $(SRC)/bakapi.h
318 sp2.$(OBJ): 16/fcsp2src/sp2.asm
319 vidtest.$(OBJ): $(SRC)/vidtest.c $(SRCLIB)/16_vl.h
320 psltest.$(OBJ): $(SRC)/paltest.c $(SRCLIB)/16_vl.h
321 #test2.$(OBJ): $(SRC)/test2.c $(SRCLIB)/16_vl.h
322 test0.$(OBJ): $(SRC)/test0.c
323 pcxtest.$(OBJ):$(SRC)/pcxtest.c $(SRCLIB)/16_vl.h
324 vrstest.$(OBJ):$(SRC)/vrstest.c $(SRCLIB)/16_vl.h
325 #vgacamm.$(OBJ):$(SRC)/vgacamm.c $(SRCLIB)/16_vl.h
326 #planrpcx.$(OBJ): $(SRC)/planrpcx.c $(SRCLIB)/16_vl.h
327 pcxtest2.$(OBJ):$(SRC)/pcxtest2.c $(SRCLIB)/16_vl.h
328 palettec.$(OBJ): $(SRC)/palettec.c
329 palettel.$(OBJ): $(SRC)/palettel.c
330 palbomb.$(OBJ): $(SRC)/palbomb.c
331 palllist.$(OBJ): $(SRC)/palllist.c
332 maptest.$(OBJ):$(SRC)/maptest.c $(SRCLIB)/16_vl.h
333 #emmtest.$(OBJ):$(SRC)/emmtest.c
334 #emsdump.$(OBJ):$(SRC)/emsdump.c
335 fmemtest.$(OBJ):$(SRC)/fmemtest.c
336 fonttest.$(OBJ):$(SRC)/fonttest.c
337 #fonttes0.$(OBJ): $(SRC)/fonttes0.c
338 fontgfx.$(OBJ):$(SRC)/fontgfx.c
339 inputest.$(OBJ):$(SRC)/inputest.c
340 #inntest.$(OBJ):$(SRC)/inntest.c
341 sountest.$(OBJ): $(SRC)/sountest.c
342 imfplay.$(OBJ): $(SRC)/imfplay.c
343 vrldbg.$(OBJ): $(SRC)/vrldbg.c
344 #miditest.$(OBJ): $(SRC)/miditest.c
345 #testemm.$(OBJ):$(SRC)/testemm.c
346 #testemm0.$(OBJ): $(SRC)/testemm0.c
347 #tsthimem.$(OBJ): $(SRC)/tsthimem.c
348 exmmtest.$(OBJ):$(SRC)/exmmtest.c
349 vgmtest.$(OBJ):$(SRC)/vgmtest.c
350 db.$(OBJ): $(UTIL)/db.c
351 ps.$(OBJ): $(SRC)/ps.c
354 # non executable objects libraries
357 vgmsnd.lib: $(VGMSNDOBJ)
358 gfx.lib: $(GFXLIBOBJS)
360 doslib.lib: $(DOSLIBLIBS)
366 # library deps 16-bit large
367 $(DOSLIB_CPU)/$(DOSLIB_MEMMODE)/cpu.lib:
368 cd $(DOSLIB_CPU:$(to_os_path)) && $(DOSLIBMAKE) $(DOSLIB_MEMMODE) && cd $(BUILD_ROOT)
369 $(DOSLIB_DOS)/$(DOSLIB_MEMMODE)/dos.lib:
370 cd $(DOSLIB_DOS:$(to_os_path)) && $(DOSLIBMAKE) $(DOSLIB_MEMMODE) && cd $(BUILD_ROOT)
371 $(DOSLIB_VGA)/$(DOSLIB_MEMMODE)/vgatty.lib:
372 cd $(DOSLIB_VGA:$(to_os_path)) && $(DOSLIBMAKE) $(DOSLIB_MEMMODE) && cd $(BUILD_ROOT)
373 $(DOSLIB_VGA)/$(DOSLIB_MEMMODE)/vga.lib:
374 cd $(DOSLIB_VGA:$(to_os_path)) && $(DOSLIBMAKE) $(DOSLIB_MEMMODE) && cd $(BUILD_ROOT)
375 $(DOSLIB_8250)/$(DOSLIB_MEMMODE)/8250.lib:
376 cd $(DOSLIB_8250:$(to_os_path)) && $(DOSLIBMAKE) $(DOSLIB_MEMMODE) && cd $(BUILD_ROOT)
377 $(DOSLIB_8254)/$(DOSLIB_MEMMODE)/8254.lib:
378 cd $(DOSLIB_8254:$(to_os_path)) && $(DOSLIBMAKE) $(DOSLIB_MEMMODE) && cd $(BUILD_ROOT)
379 $(DOSLIB_8259)/$(DOSLIB_MEMMODE)/8259.lib:
380 cd $(DOSLIB_8259:$(to_os_path)) && $(DOSLIBMAKE) $(DOSLIB_MEMMODE) && cd $(BUILD_ROOT)
381 $(DOSLIB_ADLIB)/$(DOSLIB_MEMMODE)/adlib.lib:
382 cd $(DOSLIB_ADLIB:$(to_os_path)) && $(DOSLIBMAKE) $(DOSLIB_MEMMODE) && cd $(BUILD_ROOT)
385 cd $(DOSLIB_JOYSTICK:$(to_os_path)) && $(DOSLIBMAKE) $(DOSLIB_MEMMODE) && cd $(BUILD_ROOT)
386 $(COPYCOMMAND) $(DOSLIB_JOYSTICK:$(to_os_path))$(DIRSEP)$(DOSLIB_MEMMODE)$(DIRSEP)test.exe joytest.exe
389 # cd $(DOSLIB_ADLIB:$(to_os_path)) && $(DOSLIBMAKE) $(DOSLIB_MEMMODE) && cd $(BUILD_ROOT)
390 # $(COPYCOMMAND) $(DOSLIB_ADLIB:$(to_os_path))$(DIRSEP)$(DOSLIB_MEMMODE)$(DIRSEP)imfplay.exe imfplay.exe
393 cd $(DOSLIB_ADLIB:$(to_os_path)) && $(DOSLIBMAKE) $(DOSLIB_MEMMODE) && cd $(BUILD_ROOT)
394 $(COPYCOMMAND) $(DOSLIB_ADLIB:$(to_os_path))$(DIRSEP)$(DOSLIB_MEMMODE)$(DIRSEP)test.exe opltest.exe
396 16_vl.$(OBJ): $(SRCLIB)/16_vl.c $(SRCLIB)/16_vl.h
397 16_vl_1.$(OBJ): $(SRCLIB)/16_vl_1.c $(SRCLIB)/16_vl.h
398 16_vlpal.$(OBJ): $(SRCLIB)/16_vlpa_.c $(SRCLIB)/16_vlpal.c $(SRCLIB)/16_vlpal.h
399 bakapee.$(OBJ): $(SRCLIB)/bakapee.c $(SRCLIB)/bakapee.h
400 16planar.$(OBJ): $(MODEXLIB16)/16planar.c $(MODEXLIB16)/16planar.h
401 #16_vrs.$(OBJ): $(SRCLIB)/16_vrs.c $(SRCLIB)/16_vrs.h $(DOSLIB)
402 16_spri.$(OBJ): $(SRCLIB)/16_spri.c $(SRCLIB)/16_spri.h
403 planar.$(OBJ): $(SRCLIB)/planar.c $(SRCLIB)/planar.h
404 scroll16.$(OBJ): $(SRCLIB)/scroll16.c $(SRCLIB)/scroll16.h
405 16text.$(OBJ): $(SRCLIB)/16text.c $(SRCLIB)/16text.h
406 16_enti.$(OBJ): $(SRCLIB)/16_enti.c $(SRCLIB)/16_enti.h
407 mapread.$(OBJ): $(SRCLIB)/mapread.c $(SRCLIB)/mapread.h
408 16_map.$(OBJ): $(SRCLIB)/16_map.c $(SRCLIB)/16_map.h
409 16_timer.$(OBJ): $(SRCLIB)/16_timer.c $(SRCLIB)/16_timer.h
410 16_in.$(OBJ): $(SRCLIB)/16_in.c $(SRCLIB)/16_in.h
411 16_mm.$(OBJ): $(SRCLIB)/16_mm.c $(SRCLIB)/16_mm.h
412 16_pm.$(OBJ): $(SRCLIB)/16_pm.c $(SRCLIB)/16_pm.h
413 16_ca.$(OBJ): $(SRCLIB)/16_ca.c $(SRCLIB)/16_ca.h
414 16_rf.$(OBJ): $(SRCLIB)/16_rf.c
415 16_us.$(OBJ): $(SRCLIB)/16_us.c
416 16_dbg.$(OBJ): $(SRCLIB)/16_dbg.c $(SRCLIB)/16_dbg.h
417 16_dbg_1.$(OBJ): $(SRCLIB)/16_dbg_1.c $(SRCLIB)/16_dbg.h
418 16_head.$(OBJ): $(SRCLIB)/16_head.c $(SRCLIB)/16_head.h
419 16_tail.$(OBJ): $(SRCLIB)/16_tail.c $(SRCLIB)/16_tail.h
420 16_tail_.$(OBJ): $(SRCLIB)/16_tail_.c $(SRCLIB)/16_tail.h
421 16_hc.$(OBJ): $(SRCLIB)/16_hc.c $(SRCLIB)/16_hc.h
422 16_sd.$(OBJ): $(SRCLIB)/16_sd.c $(SRCLIB)/16_sd.h
423 jsmn.$(OBJ): $(JSMNLIB)/jsmn.c $(JSMNLIB)/jsmn.h
424 kitten.$(OBJ): $(NYANLIB)/kitten.c $(NYANLIB)/kitten.h
425 vgmSnd.$(OBJ): $(VGMSNDLIB)/vgmSnd.c $(VGMSNDLIB)/vgmSnd.h
426 16_wcpu.$(OBJ): $(WCPULIB)/16_wcpu.c $(WCPULIB)/16_wcpu.h
427 #memory.$(OBJ): $(EXMMLIB)/memory.c $(EXMMLIB)/memory.h
428 #midi.$(OBJ): $(SRCLIB)/midi.c
429 c_utils.$(OBJ): $(MODEXLIB)/c_utils.asm
430 modex.$(OBJ): $(MODEXLIB)/modex.asm
431 ll.$(OBJ): $(SRCLIB)/ll.c $(SRCLIB)/ll.h
432 bitmapl.$(OBJ): $(SRCLIB)/bitmapl.c $(SRCLIB)/bitmapl.h
437 0croll.exe: 0croll.$(OBJ) modex16.obj dos_kb.obj bitmap.obj# $(OLDLIBOBJS) omodex16.$(OBJ)# 16_ino.$(OBJ)
438 wcl -0 $(WCLQ) 0croll.$(OBJ) modex16.obj dos_kb.obj bitmap.obj# omodex16.$(OBJ) bitmap.$(OBJ)# 16_ino.$(OBJ)
439 0croll.$(OBJ): $(SRC)/0croll.c
440 wcl -0 $(WCLQ) -i"src/lib/doslib" -fo=.$(OBJ) -c src/0croll.c
441 1croll.exe: 1croll.$(OBJ) modex16.obj dos_kb.obj bitmap.obj# $(OLDLIBOBJS) omodex16.$(OBJ)# 16_ino.$(OBJ)
442 wcl -0 $(WCLQ) 1croll.$(OBJ) modex16.obj dos_kb.obj bitmap.obj# omodex16.$(OBJ) bitmap.$(OBJ)# 16_ino.$(OBJ)
443 1croll.$(OBJ): $(SRC)/1croll.c
444 wcl -0 $(WCLQ) -i"src/lib/doslib" -fo=.$(OBJ) -c src/1croll.c
445 #16render.$(OBJ): $(OLDMODEX16LIBDIR)/16render.c $(OLDMODEX16LIBDIR)/16render.h
446 # wcl -0 $(WCLQ) -i"src/lib/doslib" -fo=.$(OBJ) -c $(OLDMODEX16LIBDIR)/16render.c
447 bitmap.$(OBJ): $(OLDMODEX16LIBDIR)/bitmap.c $(OLDMODEX16LIBDIR)/bitmap.h
448 wcl -0 $(WCLQ) -i"src/lib/doslib" -fo=.$(OBJ) -c $(OLDMODEX16LIBDIR)/bitmap.c
449 #omodex16.$(OBJ): $(OLDMODEX16LIBDIR)/omodex16.c $(OLDMODEX16LIBDIR)/omodex16.h
450 # wcl -0 $(WCLQ) -i"src/lib/doslib" -fo=.$(OBJ) -c $(OLDMODEX16LIBDIR)/omodex16.c
451 modex16.$(OBJ): $(OLDMODEX16LIBDIR)/modex16.c $(OLDMODEX16LIBDIR)/modex16.h
452 wcl -0 $(WCLQ) -i"src/lib/doslib" -fo=.$(OBJ) -c $(OLDMODEX16LIBDIR)/modex16.c
453 #16_ino.$(OBJ): $(SRCLIB)/16_in.c $(SRCLIB)/16_in.h
454 # wcl -0 $(WCLQ) -i"src/lib/doslib" -fo=16_ino.$(OBJ) -c src/lib/16_in.c
455 dos_kb.$(OBJ): $(OLDMODEX16LIBDIR)/dos_kb.c $(OLDMODEX16LIBDIR)/dos_kb.h
456 wcl -0 $(WCLQ) -i"src/lib/doslib" -fo=.$(OBJ) -c $(OLDMODEX16LIBDIR)/dos_kb.c
462 @if not exist $(DOSLIBDIR)/buildall.sh wmake -s -h initlibs
463 @if not exist ps.exe wmake -s -h ps.exe
464 @wmake -s -h initscript
465 @for %f in ($(ALLEXEC)) do @if exist %f $(REMOVECOMMAND) %f
467 @if exist *.LIB $(REMOVECOMMAND) *.LIB
468 @. src/util/bcexmm.sh
469 @if exist *.EXE $(REMOVECOMMAND) *.EXE
470 @if exist *.OBJ $(REMOVECOMMAND) *.OBJ
471 #@for %f in ($(SPRIUTILEXEC)) do @if exist %f $(REMOVECOMMAND) %f
472 @if not exist vrl2vrs wmake -s -h pcx2vrl
474 @if exist *.o $(REMOVECOMMAND) *.o
476 @if exist *.$(OBJ) $(REMOVECOMMAND) *.$(OBJ)
477 @if exist *.bco $(REMOVECOMMAND) *.bco
478 @if exist *.BCO $(REMOVECOMMAND) *.BCO
479 @if exist *.LIB $(REMOVECOMMAND) *.LIB
480 @if exist *.lnk $(REMOVECOMMAND) *.lnk
481 @if exist *.LNK $(REMOVECOMMAND) *.LNK
482 @if exist *.smp $(REMOVECOMMAND) *.smp
483 @if exist *.SMP $(REMOVECOMMAND) *.SMP
484 @if exist *.hed $(REMOVECOMMAND) *.hed
485 @if exist *.meh $(REMOVECOMMAND) *.meh
486 @if exist *.MEH $(REMOVECOMMAND) *.MEH
487 @if exist *.err $(REMOVECOMMAND) *.err
488 @if exist TC*.SWP $(REMOVECOMMAND) TC*.SWP
490 @if exist *.16W $(REMOVECOMMAND) *.16W
491 @if exist *.16B $(REMOVECOMMAND) *.16B
492 @if exist *.L16 $(REMOVECOMMAND) *.L16
494 # @$(COPYCOMMAND) $(SRC)exmmtest.c $(EXMMTESTDIR)$(SRC)
495 # @$(COPYCOMMAND) $(SRCLIB)16_mm.* $(EXMMTESTDIR)$(SRCLIB)
496 # @$(COPYCOMMAND) $(SRCLIB)16_head.* $(EXMMTESTDIR)$(SRCLIB)
497 # @$(COPYCOMMAND) $(SRCLIB)16_ca.* $(EXMMTESTDIR)$(SRCLIB)
498 # @$(COPYCOMMAND) $(SRCLIB)16_hc.* $(EXMMTESTDIR)$(SRCLIB)
499 # @$(COPYCOMMAND) $(SRCLIB)types.h $(EXMMTESTDIR)$(SRCLIB)
500 # @$(COPYCOMMAND) $(NYANLIB)* $(EXMMTESTDIR)$(NYANLIB)
509 backupconfig: .symbolic
510 @$(COPYCOMMAND) .git$(DIRSEP)config $(GITCONFIGDIR)/git_con.fig
511 @$(COPYCOMMAND) .gitmodules $(GITCONFIGDIR)/git_modu.les
512 @$(COPYCOMMAND) .gitignore $(GITCONFIGDIR)/git_igno.re
514 initconfig: .symbolic
515 @$(COPYCOMMAND) $(GITCONFIGDIR)/git_con.fig .git/config
516 @$(COPYCOMMAND) $(GITCONFIGDIR)/git_modu.les .gitmodules
517 @$(COPYCOMMAND) $(GITCONFIGDIR)/git_igno.re .gitignore
520 backupscript: .symbolic
521 @if exist *.bat $(MOVECOMMAND) *.bat $(SCRIPTBATDIR)/
522 @if exist *.sh $(MOVECOMMAND) *.sh $(SCRIPTBATDIR)/
524 @if exist *.BAT $(MOVECOMMAND) *.BAT $(SCRIPTBATDIR)/
525 @if not exist ud.sh $(COPYCOMMAND) $(SCRIPTBATDIR)/ud.sh ./
527 @if not exist wbuild.sh $(COPYCOMMAND) $(SCRIPTBATDIR)/wbuild.sh ./
528 @if not exist WBUILD.BAT $(COPYCOMMAND) $(SCRIPTBATDIR)/WBUILD.BAT ./
530 initscript: .symbolic
531 @$(COPYCOMMAND) $(SCRIPTBATDIR)/*.bat ./
532 @$(COPYCOMMAND) $(SCRIPTBATDIR)/*.sh ./
534 @$(COPYCOMMAND) $(SCRIPTBATDIR)/*.BAT ./
542 @*upx -9 $(UPXQ) $(EXEC)
545 @if exist 16.exe @wmake -s -h wwwdo
546 @if exist 16.exe @wmake -s -h wwwext
549 @for %f in (/var/www/$(EXEC)) do @if exist /var/www/%f $(REMOVECOMMAND) /var/www/%f
550 @$(REMOVECOMMAND) /var/www/*.exe.zi*
551 @$(REMOVECOMMAND) /var/www/*.zip.zi*
552 @for %f in ($(EXEC)) do @if exist %f @$(COPYCOMMAND) %f /var/www/
553 @./src/util/z.sh $(EXEC) $(EXEC)
554 @./src/util/z2.sh data.zip data
561 ####----@ssh -p $(HOSTPORT) $(HOSTUSER)@$(HOSTADDR) 'rm -f $(HOSTDIR)/16/*exe*'
563 @scp -r -P $(HOSTPORT) *.exe $(HOSTUSER)@$(HOSTADDR):$(HOSTDIR)/16/
564 @scp -r -P $(HOSTPORT) *get.bat $(HOSTUSER)@$(HOSTADDR):$(HOSTDIR)/16/
565 @scp -r -P $(HOSTPORT) /var/www/*.exe.zip.* $(HOSTUSER)@$(HOSTADDR):$(HOSTDIR)/16/
566 #@scp -r -P $(HOSTPORT) $(DATADIR)spri.zip $(HOSTUSER)@$(HOSTADDR):$(HOSTDIR)/16/
567 @scp -r -P $(HOSTPORT) /var/www/data.zip.* $(HOSTUSER)@$(HOSTADDR):$(HOSTDIR)/16/
572 @scp -r -P $(HOST2PORT) *.exe $(HOST2USER)@$(HOST2ADDR):$(HOST2DIR)/16/
573 @scp -r -P $(HOST2PORT) *get.bat $(HOST2USER)@$(HOST2ADDR):$(HOST2DIR)/16/
574 @scp -r -P $(HOST2PORT) /var/www/*.exe.zip.* $(HOST2USER)@$(HOST2ADDR):$(HOST2DIR)/16/
575 #@scp -r -P $(HOST2PORT) $(DATADIR)spri.zip $(HOST2USER)@$(HOST2ADDR):$(HOST2DIR)/16/
576 @scp -r -P $(HOST2PORT) /var/www/data.zip.* $(HOST2USER)@$(HOST2ADDR):$(HOST2DIR)/16/
582 @if exist *.err $(DUMP) *.err
585 ## External library management~ ^^
587 #git submodule add <repo>
589 @cd $(DOSLIBDIR:$(to_os_path))
590 @$(DOSLIBMAKEALL) $(DOSLIB_MEMMODE)
594 @cd $(DOSLIBDIR:$(to_os_path))
595 @$(DOSLIBMAKEALL) $(DOSLIB_MEMMODE) clean
599 @cd $(JSMNLIB:$(to_os_path))
602 @cd $(DOSLIBDIR:$(to_os_path))
606 reinitlibs: .symbolic
607 @$(REMOVECOMMAND) -rf $(DOSLIBDIR)
608 @$(REMOVECOMMAND) -rf $(JSMNLIB)
609 @$(REMOVECOMMAND) -rf 16/CatacombApocalypse
610 @$(REMOVECOMMAND) -rf 16/wolf3d
611 @$(REMOVECOMMAND) -rf 16/keen
612 @$(REMOVECOMMAND) -rf 16/Catacomb3D
613 @$(REMOVECOMMAND) -rf 16/shitman
614 @wmake -s -h initlibs
617 @wmake -s -h initconfig
620 @git clone https://github.com/FlatRockSoft/CatacombApocalypse.git
621 @git clone https://github.com/id-Software/wolf3d.git
622 @git clone https://github.com/keendreams/keen.git
623 @git clone https://github.com/FlatRockSoft/Catacomb3D.git
625 @$(COPYCOMMAND) $(DOSLIBDIR)/make-lowercase .
628 @cd $(SRCLIB:$(to_os_path))
629 @git clone https://github.com/joncampbell123/doslib.git
630 @git clone https://github.com/zserge/jsmn.git
633 initshitman: .symbolic
635 @git clone https://github.com/joncampbell123/shitman.git
637 @$(REMOVECOMMAND) -rf doslib
638 @git clone https://github.com/joncampbell123/doslib.git
658 @wmake -s -h -f makefile all
665 @cd $(DOSLIB_VGA:$(to_os_path))
668 @for %f in ($(SPRIUTILEXEC)) do @if exist %f $(COPYCOMMAND) %f $(BUILD_ROOT)#$(DIRSEP)