]> 4ch.mooo.com Git - 16.git/commitdiff
reverted to makefile.med until issue is solved makefile.meb is the debugging make...
authorsparky4 <sparky4@cock.li>
Sun, 28 Aug 2016 04:15:59 +0000 (23:15 -0500)
committersparky4 <sparky4@cock.li>
Sun, 28 Aug 2016 04:15:59 +0000 (23:15 -0500)
makefile.meb
makefile.med

index 354855f4b1f0441d2884c037899018156e7a168c..92f9727cc21b9558d961ac94c8d16b1a7f208e2a 100755 (executable)
@@ -84,221 +84,347 @@ UPXQ=-qqq
 #
 # compile flags
 #
-SFLAGS=-sg -st -of+ -zu -zdf -zff -zgf -k32768#54096#60000
-DFLAGS=-DTARGET_MSDOS=16 -DMSDOS=1 $(SFLAGS)
-ZFLAGS=-zk0 -zc -zp8 -zm $(WCLQ)
-OFLAGS=-obmilr -oe=24 -out -oh -ei -zp8  -onac -ol+ -ok####x
-FLAGS=$(AFLAGS) $(IFLAGS) -wo -i$(DOSLIB) $(LFLAGS) -fo=.$(OBJ) $(OFLAGS) $(DFLAGS) $(ZFLAGS)
-T_FLAGS=-bt=dos -mh -0 -fpi87
-
-CPPFLAGS=-DTARGET_MSDOS=16
+S_FLAGS=-sg -st -of+ -zu -zdf -zff -zgf -k32768#54096#60000
+Z_FLAGS=-zk0 -zc -zp8 -zm
+O_FLAGS=-obmilr -oe=24 -out -oh -ei -onac -ol+ -ok##x
+T_FLAGS=-bt=dos -mh -0 -fpi87 -fo=.$(OBJ) -d1
+
+CPPFLAGS=-DTARGET_MSDOS=16 -DMSDOS=1
 !ifeq DEBUGSERIAL 1
 CPPFLAGS += -DDEBUGSERIAL
 !endif
-AFLAGS=$(WCLQ) $(T_FLAGS) -d1 -fo=.$(OBJ)
-CFLAGS=$(WCLQ) $(T_FLAGS) -d1 -fo=.$(OBJ) -wo -i"$(DOSLIB)" $(FLAGS)# $(O_FLAGS) $(S_FLAGS) $(Z_FLAGS)
-LFLAGS=$(WCLQ) -l=dos -fm=$^&.mah
+AFLAGS=$(WCLQ) $(T_FLAGS)
+CFLAGS=$(WCLQ) $(T_FLAGS) -wo -i"$(DOSLIB)" $(O_FLAGS) $(S_FLAGS) $(Z_FLAGS)
+LFLAGS=$(WCLQ) -l=dos -fm=$^&.mah -lr
 LIBFLAGS=$(WLIBQ) -b -n
 
+FLAGS=$(CPPFLAGS) $(CFLAGS)
+
 #
 # objects
 #
 VGMSNDOBJ = vgmSnd.$(OBJ) 16_snd.$(OBJ)
-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)
-GFXLIBOBJS = modex16.$(OBJ) bitmap.$(OBJ) 16text.$(OBJ) bakapee.$(OBJ) scroll16.$(OBJ) 16render.$(OBJ) 16_vrs.$(OBJ) 16_sprit.$(OBJ)
-#16planar.$(OBJ) planar.$(OBJ)
 DOSLIBOBJ = adlib.$(OBJ) 8254.$(OBJ) 8259.$(OBJ) dos.$(OBJ) cpu.$(OBJ)
+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)
+GFXLIBOBJS = modex16.$(OBJ) bitmap.$(OBJ) 16text.$(OBJ) bakapee.$(OBJ) scroll16.$(OBJ) 16render.$(OBJ) $(DOSLIBLIBS) 16_vrs.$(OBJ) 16_sprit.$(OBJ)
+#planar.$(OBJ) 16planar.$(OBJ)
+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
+
 !ifeq DEBUGSERIAL 1
+FLAGS += -DDEBUGSERIAL
 DOSLIBOBJ += 8250.$(OBJ)
+DOSLIBLIBS += $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)8250$(DIRSEP)dos86h$(DIRSEP)8250.lib
 !endif
 
-#
-# libraries
-#
-DOSLIBLIBS = $(DOSLIB_CPU)/dos86h/cpu.lib $(DOSLIB_DOS)/dos86h/dos.lib $(DOSLIB_VGA)/dos86h/vga.lib
+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
+#planrpcx.exe test2.exe
+EXEC = 16.exe bakapi.exe tesuto.exe 0.exe $(TESTEXEC)
+
+all: $(EXEC) joytest.exe
+#16.lib => $(16LIBOBJS) bug....
+16LIB=$(16LIBOBJS)
+#16LIB=16.lib
+
 !ifeq DEBUGSERIAL 1
-DOSLIBLIBS += $(DOSLIB_8250)/dos86h/8250.lib
+16LIBOBJS += $(DOSLIBLIBS)
 !endif
-16LIB=$(16LIBOBJS)#16.lib bad program lock up
-
 #
-#      Files locations
+#game and bakapi executables
 #
-.c : $(SRC);$(SRCLIB);$(MODEXLIB16);$(JSMNLIB);$(NYANLIB);$(VGMSNDLIB);$(WCPULIB)
+16.exe: 16.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) $(16LIB) gfx.lib
+       wcl $(FLAGS) $(16FLAGS) 16.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) $(16LIB) gfx.lib -fm=16.mah
 
-.asm : $(MODEXLIB)
+bakapi.exe: bakapi.$(OBJ) gfx.lib $(DOSLIBLIBS)
+       wcl $(FLAGS) $(BAKAPIFLAGS) bakapi.$(OBJ) gfx.lib $(DOSLIBLIBS) -fm=bakapi.mah
+#modex.lib
+#
+#Test Executables!
+#
+scroll.exe: scroll.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) $(16LIB) gfx.lib
+       wcl $(FLAGS) scroll.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) $(16LIB) gfx.lib -fm=scroll.mah
+scroll.$(OBJ): $(SRC)scroll.c
+       wcl $(FLAGS) -c $(SRC)scroll.c
 
-.lib : .;$(DOSLIB_CPU)/dos86h;$(DOSLIB_DOS)/dos86h;$(DOSLIB_VGA)/dos86h;$(DOSLIB_8250)/dos86h
 
-.obj : .
+# NOTE: dos86h = 16-bit huge memory model. memory model must match!
+tesuto.exe: tesuto.$(OBJ) $(DOSLIBLIBS) 16_head.$(OBJ) gfx.lib
+#      %write tmp.cmd option quiet option max=tesuto.mah $(DOSLIB_LDFLAGS_DOS16H) file tesuto.obj name tesuto.exe
+#      %write tmp.cmd library $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)cpu$(DIRSEP)dos86h$(DIRSEP)cpu.lib
+#      %write tmp.cmd library $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)dos$(DIRSEP)dos86h$(DIRSEP)dos.lib
+#      @wlink @tmp.cmd
 
 #
-#      Default make rules
+# add this ww to reduce junk www
+#
+# NTS we have to construct the command line into tmp.cmd because for MS-DOS
+# systems all arguments would exceed the pitiful 128 char command line limit
+#.C.OBJ:
+#      %write temp.cmd $(CFLAGS_THIS) $(CFLAGS_CON) $[@
+#      wcl @temp.cmd
 #
-.c.obj:
-       *wcl $(CPPFLAGS) $(CFLAGS) $(extra_$^&_obj_opts) -c $[@
+       wcl $(FLAGS) $(WCLQ) tesuto.$(OBJ) $(DOSLIBLIBS) 16_head.$(OBJ) gfx.lib
+tesuto.$(OBJ): $(SRC)tesuto.c
+       wcl $(FLAGS) $(WCLQ) -c $(SRC)tesuto.c
 
-.asm.obj:
-       *wcl $(AFLAGS) $(extra_$^&_obj_opts) -c $[@
+0.exe: 0.$(OBJ) $(DOSLIBLIBS) gfx.lib $(16LIB)
+       wcl $(FLAGS) $(WCLQ) 0.$(OBJ) $(DOSLIBLIBS) gfx.lib $(16LIB)
+0.$(OBJ): $(SRC)0.c
+       wcl $(FLAGS) $(WCLQ) -c $(SRC)0.c
 
-.obj.exe :
-       *wcl $(LFLAGS) $(extra_$^&_exe_opts) -fe=$@ $<
+test.exe: test.$(OBJ) gfx.lib $(DOSLIBLIBS) $(16LIB)
+       wcl $(FLAGS) test.$(OBJ) gfx.lib $(DOSLIBLIBS) $(16LIB) -fm=test.mah
 
-.obj.lib :
-       *wlib $(LIBFLAGS) $(extra_$^&_lib_opts) $@ $<
+#test2.exe: test2.$(OBJ) $(DOSLIBLIBS) gfx.lib
+#      wcl $(FLAGS) test2.$(OBJ) $(DOSLIBLIBS) gfx.lib -fm=test2.mah
 
-#
-# List of executables to build
-#
-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
-EXEC = &
-    16.exe &
-    bakapi.exe &
-    tesuto.exe &
-    0.exe &
-    $(TESTEXEC)
+test0.exe: test0.$(OBJ)
+       wcl $(FLAGS) test0.$(OBJ) -fm=test0.mah
 
-all: $(EXEC) joytest.exe
+fonttest.exe: fonttest.$(OBJ) $(16LIB) gfx.lib
+       wcl $(FLAGS) fonttest.$(OBJ) $(16LIB) gfx.lib -fm=fonttest.mah
 
-#
-# game and bakapi executables
-#
-16.exe:           16.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) $(16LIB) gfx.lib $(DOSLIBLIBS)
-bakapi.exe:       bakapi.$(OBJ) gfx.lib $(DOSLIBLIBS)
+#fonttes0.exe: fonttes0.$(OBJ) $(16LIB)
+#      wcl $(FLAGS) fonttes0.$(OBJ) $(16LIB)
+
+fontgfx.exe: fontgfx.$(OBJ) $(16LIB) gfx.lib $(DOSLIBLIBS)
+       wcl $(FLAGS) fontgfx.$(OBJ) $(16LIB) gfx.lib $(DOSLIBLIBS) -fm=fontgfx.mah
+
+inputest.exe: inputest.$(OBJ) $(16LIB)
+       wcl $(FLAGS) inputest.$(OBJ) $(16LIB) -fm=inputest.mah
+
+#sountest.exe: sountest.$(OBJ) $(16LIB)
+#      wcl $(FLAGS) sountest.$(OBJ) $(16LIB)
+
+pcxtest.exe: pcxtest.$(OBJ) gfx.lib
+       wcl $(FLAGS) pcxtest.$(OBJ) gfx.lib -fm=pcxtest.mah
+
+vrstest.exe: vrstest.$(OBJ) gfx.lib $(16LIB)
+       wcl $(FLAGS) vrstest.$(OBJ) gfx.lib $(16LIB) -fm=vrstest.mah
+
+palettec.exe: palettec.$(OBJ) gfx.lib #$(16LIB)
+       wcl $(FLAGS) palettec.$(OBJ) gfx.lib -fm=palettec.mah #$(16LIB)
+
+palettel.exe: palettel.$(OBJ) gfx.lib #$(16LIB)
+       wcl $(FLAGS) palettel.$(OBJ) gfx.lib -fm=palettel.mah #$(16LIB)
+
+pcxtest2.exe: pcxtest2.$(OBJ) gfx.lib
+       wcl $(FLAGS) pcxtest2.$(OBJ) gfx.lib -fm=pcxtest2.mah
+
+##planrpcx.exe: planrpcx.$(OBJ) gfx.lib
+##     wcl $(FLAGS) planrpcx.$(OBJ) gfx.lib -fm=planrpcx.mah
+
+maptest.exe: maptest.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) $(16LIB) gfx.lib
+       wcl $(FLAGS) maptest.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) $(16LIB) gfx.lib -fm=maptest.mah
+
+fmemtest.exe: fmemtest.$(OBJ) $(16LIB)
+       wcl $(FLAGS) fmemtest.$(OBJ) $(16LIB) -fm=fmemtest.mah
+
+exmmtest.exe: exmmtest.$(OBJ) 16_in.$(OBJ) 16_mm.$(OBJ) wcpu.$(OBJ) 16_head.$(OBJ) 16_ca.$(OBJ) 16_hc.$(OBJ) kitten.$(OBJ)
+       wcl $(FLAGS) exmmtest.$(OBJ) -fm=exmmtest.mah $(16LIB)
+####0000       ./wlink32 @__wcl__.lnk
+
+vgmtest.exe: vgmtest.$(OBJ) vgmsnd.lib $(16LIB)
+       wcl $(FLAGS) vgmtest.$(OBJ) vgmsnd.lib -fm=vgmtest.mah $(16LIB)
+       #====wcl -mc vgmtest.$(OBJ) $(VGMSNDOBJ) -fm=vgmtest.mah
 
-#
-# Test Executables!
-#
-scroll.exe:       scroll.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) $(16LIB) gfx.lib $(DOSLIBLIBS)
-scroll.$(OBJ):    $(SRC)/scroll.c
-tesuto.exe:       tesuto.$(OBJ) 16_head.$(OBJ) gfx.lib $(DOSLIBLIBS)
-tesuto.$(OBJ):    $(SRC)/tesuto.c
-0.exe:            0.$(OBJ) $(16LIB) gfx.lib $(DOSLIBLIBS)
-0.$(OBJ):         $(SRC)/0.c
-test.exe:         test.$(OBJ) $(16LIB) gfx.lib $(DOSLIBLIBS)
-#test2.exe:       test2.$(OBJ) gfx.lib $(DOSLIBLIBS)
-test0.exe:        test0.$(OBJ)
-fonttest.exe:     fonttest.$(OBJ) gfx.lib
-#fonttes0.exe:    fonttes0.$(OBJ) $(16LIB)
-fontgfx.exe:      fontgfx.$(OBJ) gfx.lib $(DOSLIBLIBS)
-inputest.exe:     inputest.$(OBJ) $(16LIB) $(DOSLIBLIBS)
-#sountest.exe:    sountest.$(OBJ) $(16LIB)
-pcxtest.exe:      pcxtest.$(OBJ) gfx.lib $(DOSLIBLIBS)
-vrstest.exe:      vrstest.$(OBJ) $(16LIB) gfx.lib $(DOSLIBLIBS)
-palettec.exe:     palettec.$(OBJ) gfx.lib $(DOSLIBLIBS)
-palettel.exe:     palettel.$(OBJ) gfx.lib $(DOSLIBLIBS)
-pcxtest2.exe:     pcxtest2.$(OBJ) gfx.lib $(DOSLIBLIBS)
-#planrpcx.exe:    planrpcx.$(OBJ) gfx.lib
-maptest.exe:      maptest.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) gfx.lib $(DOSLIBLIBS)
-fmemtest.exe:     fmemtest.$(OBJ)
-exmmtest.exe:     exmmtest.$(OBJ) $(16LIB) $(DOSLIBLIBS)
-vgmtest.exe:      vgmtest.$(OBJ) vgmsnd.lib $(16LIB) $(DOSLIBLIBS)
 
 #
-# executable's objects
+#executable's objects
 #
-16.$(OBJ):        $(SRC)/16.c $(SRC)/16.h
-bakapi.$(OBJ):    $(SRC)/bakapi.c $(SRC)/bakapi.h
-test.$(OBJ):      $(SRC)/test.c $(SRCLIB)/modex16.h
-#test2.$(OBJ):    $(SRC)/test2.c $(SRCLIB)/modex16.h
-test0.$(OBJ):     $(SRC)/test0.c
-pcxtest.$(OBJ):   $(SRC)/pcxtest.c $(SRCLIB)/modex16.h
-vrstest.$(OBJ):   $(SRC)/vrstest.c $(SRCLIB)/modex16.h
-#planrpcx.$(OBJ): $(SRC)/planrpcx.c $(SRCLIB)/modex16.h
-pcxtest2.$(OBJ):  $(SRC)/pcxtest2.c $(SRCLIB)/modex16.h
-palettec.$(OBJ):  $(SRC)/palettec.c
-palettel.$(OBJ):  $(SRC)/palettel.c
-maptest.$(OBJ):   $(SRC)/maptest.c $(SRCLIB)/modex16.h
-#emmtest.$(OBJ):  $(SRC)/emmtest.c
-#emsdump.$(OBJ):  $(SRC)/emsdump.c
-fmemtest.$(OBJ):  $(SRC)/fmemtest.c
-fonttest.$(OBJ):  $(SRC)/fonttest.c
-#fonttes0.$(OBJ): $(SRC)/fonttes0.c
-fontgfx.$(OBJ):   $(SRC)/fontgfx.c
-inputest.$(OBJ):  $(SRC)/inputest.c
-#sountest.$(OBJ): $(SRC)/sountest.c
-#miditest.$(OBJ): $(SRC)/miditest.c
-#testemm.$(OBJ):  $(SRC)/testemm.c
-#testemm0.$(OBJ): $(SRC)/testemm0.c
-#tsthimem.$(OBJ): $(SRC)/tsthimem.c
-exmmtest.$(OBJ):  $(SRC)/exmmtest.c
-vgmtest.$(OBJ):   $(SRC)/vgmtest.c
+16.$(OBJ): $(SRC)16.h $(SRC)16.c
+       wcl $(FLAGS) -c $(SRC)16.c
+
+bakapi.$(OBJ): $(SRC)bakapi.h $(SRC)bakapi.c
+       wcl $(FLAGS) -c $(SRC)bakapi.c
+
+test.$(OBJ): $(SRC)test.c $(SRCLIB)modex16.h
+       wcl $(FLAGS) -c $(SRC)test.c
+
+#test2.$(OBJ): $(SRC)test2.c $(SRCLIB)modex16.h
+#      wcl $(FLAGS) -c $(SRC)test2.c
+
+test0.$(OBJ): $(SRC)test0.c
+       wcl $(FLAGS) -c $(SRC)test0.c
+
+pcxtest.$(OBJ): $(SRC)pcxtest.c $(SRCLIB)modex16.h
+       wcl $(FLAGS) -c $(SRC)pcxtest.c
+
+vrstest.$(OBJ): $(SRC)vrstest.c $(SRCLIB)modex16.h
+       wcl $(FLAGS) -c $(SRC)vrstest.c
+
+##planrpcx.$(OBJ): $(SRC)planrpcx.c $(SRCLIB)modex16.h
+##     wcl $(FLAGS) -c $(SRC)planrpcx.c
+
+pcxtest2.$(OBJ): $(SRC)pcxtest2.c $(SRCLIB)modex16.h
+       wcl $(FLAGS) -c $(SRC)pcxtest2.c
+
+palettec.$(OBJ): $(SRC)palettec.c
+       wcl $(FLAGS) -c $(SRC)palettec.c
+
+palettel.$(OBJ): $(SRC)palettel.c
+       wcl $(FLAGS) -c $(SRC)palettel.c
+
+maptest.$(OBJ): $(SRC)maptest.c $(SRCLIB)modex16.h
+       wcl $(FLAGS) -c $(SRC)maptest.c
+
+#emmtest.$(OBJ): $(SRC)emmtest.c
+#      wcl $(FLAGS) $(MFLAGS) -c $(SRC)emmtest.c
+
+#emsdump.$(OBJ): $(SRC)emsdump.c
+#      wcl $(FLAGS) $(MFLAGS) -c $(SRC)emsdump.c
+
+fmemtest.$(OBJ): $(SRC)fmemtest.c
+       wcl $(FLAGS) -c $(SRC)fmemtest.c
+
+fonttest.$(OBJ): $(SRC)fonttest.c
+       wcl $(FLAGS) -c $(SRC)fonttest.c
+
+#fonttes0.$(OBJ): $(SRC)fonttes0.c
+#      wcl $(FLAGS) -c $(SRC)fonttes0.c
+
+fontgfx.$(OBJ): $(SRC)fontgfx.c
+       wcl $(FLAGS) -c $(SRC)fontgfx.c
+
+inputest.$(OBJ): $(SRC)inputest.c
+       wcl $(FLAGS) -c $(SRC)inputest.c
+
+#sountest.$(OBJ): $(SRC)sountest.c
+#      wcl $(FLAGS) -c $(SRC)sountest.c
+
+#miditest.$(OBJ): $(SRC)miditest.c
+#      wcl $(FLAGS) -c $(SRC)miditest.c
+
+#testemm.$(OBJ): $(SRC)testemm.c
+#      wcl $(FLAGS) -c $(SRC)testemm.c
+
+#testemm0.$(OBJ): $(SRC)testemm0.c
+#      wcl $(FLAGS) -c $(SRC)testemm0.c
+
+tsthimem.$(OBJ): $(SRC)tsthimem.c
+       wcl $(FLAGS) -c $(SRC)tsthimem.c
+
+exmmtest.$(OBJ): $(SRC)exmmtest.c
+       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)
+
+vgmtest.$(OBJ): $(SRC)vgmtest.c
+       wcl $(FLAGS) -c $(SRC)vgmtest.c
+       #====wcl -mc -c $(SRC)vgmtest.c
 
 #
-# non executable objects libraries
+#non executable objects libraries
 #
-
-16.lib: $(16LIBOBJS)
-vgmsnd.lib: $(VGMSNDOBJ)
+16.lib: $(16LIBOBJS)# doslib.lib vgmsnd.lib
+       wlib -b $(WLIBQ) 16.lib $(16LIBOBJS)# doslib.lib vgmsnd.lib
 
 gfx.lib: $(GFXLIBOBJS)
-       *wlib $(LIBFLAGS) $(extra_$^&_lib_opts) $@ $<
+       wlib -b $(WLIBQ) gfx.lib $(GFXLIBOBJS)
+
+vgmsnd.lib: $(VGMSNDOBJ)
+       wlib -b $(WLIBQ) vgmsnd.lib $(VGMSNDOBJ)
 
 # extdep:
 # !include $(DOSLIBDIR)$(DIRSEP)extdep.mak
 
 # library deps 16-bit huge
-$(DOSLIB_CPU)/dos86h/cpu.lib:
-       cd $(DOSLIB_CPU:$(to_os_path)) && .$(DIRSEP)make.sh && cd $(BUILD_ROOT)
-$(DOSLIB_DOS)/dos86h/dos.lib:
-       cd $(DOSLIB_DOS:$(to_os_path)) && .$(DIRSEP)make.sh && cd $(BUILD_ROOT)
-$(DOSLIB_VGA)/dos86h/vgatty.lib:
-       cd $(DOSLIB_VGA:$(to_os_path)) && .$(DIRSEP)make.sh && cd $(BUILD_ROOT)
-$(DOSLIB_VGA)/dos86h/vga.lib:
-       cd $(DOSLIB_VGA:$(to_os_path)) && .$(DIRSEP)make.sh && cd $(BUILD_ROOT)
-$(DOSLIB_8250)/dos86h/8250.lib:
-       cd $(DOSLIB_8250:$(to_os_path)) && .$(DIRSEP)make.sh && cd $(BUILD_ROOT)
+$(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)cpu$(DIRSEP)dos86h$(DIRSEP)cpu.lib:
+       cd $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)cpu && .$(DIRSEP)make.sh
+$(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)dos$(DIRSEP)dos86h$(DIRSEP)dos.lib:
+       cd $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)dos && .$(DIRSEP)make.sh
+$(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)vga$(DIRSEP)dos86h$(DIRSEP)vgatty.lib:
+       cd $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)vga && .$(DIRSEP)make.sh
+$(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)vga$(DIRSEP)dos86h$(DIRSEP)vga.lib:
+       cd $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)vga && .$(DIRSEP)make.sh
+$(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)8250$(DIRSEP)dos86h$(DIRSEP)8250.lib:
+       cd $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)8250 && .$(DIRSEP)make.sh
 
 joytest.exe:
-       cd $(DOSLIB_JOYSTICK:$(to_os_path)) && .$(DIRSEP)make.sh && cd $(BUILD_ROOT)
-       $(COPYCOMMAND) $(DOSLIB_JOYSTICK:$(to_os_path))$(DIRSEP)dos86h$(DIRSEP)test.exe joytest.exe
+       cd $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)joystick && .$(DIRSEP)make.sh && $(COPYCOMMAND) dos86h$(DIRSEP)test.exe $(PDIR)$(PDIR)$(PDIR)$(PDIR)$(PDIR)joytest.exe
 #$(DOSLIBLIBS): .symbolic
-#      @cd $(DOSLIB:$(to_os_path))
+#      @cd $(DOSLIB)
 #      @.$(DIRSEP)buildall.sh
-#      @cd $(BUILD_ROOT)
-
-modex16.$(OBJ):   $(SRCLIB)/modex16.c $(SRCLIB)/modex16.h
-bakapee.$(OBJ):   $(SRCLIB)/bakapee.c $(SRCLIB)/bakapee.h
-16render.$(OBJ):  $(SRCLIB)/16render.c $(SRCLIB)/16render.h
-16planar.$(OBJ):  $(MODEXLIB16)/16planar.c $(MODEXLIB16)/16planar.h
-16_vrs.$(OBJ):    $(SRCLIB)/16_vrs.c $(SRCLIB)/16_vrs.h $(DOSLIBLIBS)
-16_sprit.$(OBJ):  $(SRCLIB)/16_sprit.c $(SRCLIB)/16_sprit.h
-bitmap.$(OBJ):    $(SRCLIB)/bitmap.c $(SRCLIB)/bitmap.h
-planar.$(OBJ):    $(SRCLIB)/planar.c $(SRCLIB)/planar.h
-scroll16.$(OBJ):  $(SRCLIB)/scroll16.c $(SRCLIB)/scroll16.h
-16text.$(OBJ):    $(SRCLIB)/16text.c
-mapread.$(OBJ):   $(SRCLIB)/mapread.c $(SRCLIB)/mapread.h
-16_timer.$(OBJ):  $(SRCLIB)/16_timer.c $(SRCLIB)/16_timer.h
-16_in.$(OBJ):     $(SRCLIB)/16_in.c $(SRCLIB)/16_in.h
-16_mm.$(OBJ):     $(SRCLIB)/16_mm.c $(SRCLIB)/16_mm.h
-16_ca.$(OBJ):     $(SRCLIB)/16_ca.c $(SRCLIB)/16_ca.h
-16_dbg.$(OBJ):    $(SRCLIB)/16_dbg.c $(SRCLIB)/16_dbg.h
-midi.$(OBJ):      $(SRCLIB)/midi.c $(SRCLIB)/midi.h
-16_head.$(OBJ):   $(SRCLIB)/16_head.c $(SRCLIB)/16_head.h
-16_hc.$(OBJ):     $(SRCLIB)/16_hc.c $(SRCLIB)/16_hc.h
-16_snd.$(OBJ):    $(SRCLIB)/16_snd.c $(SRCLIB)/16_snd.h
-jsmn.$(OBJ):      $(JSMNLIB)/jsmn.c $(JSMNLIB)/jsmn.h
-kitten.$(OBJ):    $(NYANLIB)/kitten.c $(NYANLIB)/kitten.h
-vgmSnd.$(OBJ):    $(VGMSNDLIB)/vgmSnd.c $(VGMSNDLIB)/vgmSnd.h
-wcpu.$(OBJ):      $(WCPULIB)/wcpu.c $(WCPULIB)/wcpu.h
-#memory.$(OBJ):   $(EXMMLIB)/memory.c $(EXMMLIB)/memory.h
-c_utils.$(OBJ):   $(MODEXLIB)/c_utils.asm
-modex.$(OBJ):     $(MODEXLIB)/modex.asm
+#      @cd $(PDIR)$(PDIR)$(PDIR)
+
+modex16.$(OBJ): $(SRCLIB)modex16.h $(SRCLIB)modex16.c
+       wcl $(FLAGS) -c $(SRCLIB)modex16.c
+
+bakapee.$(OBJ): $(SRCLIB)bakapee.h $(SRCLIB)bakapee.c
+       wcl $(FLAGS) -c $(SRCLIB)bakapee.c
+
+16render.$(OBJ): $(SRCLIB)16render.h $(SRCLIB)16render.c
+       wcl $(FLAGS) -c $(SRCLIB)16render.c
+
+##16planar.$(OBJ): $(MODEXLIB)16planar.h $(MODEXLIB)16planar.c
+##     wcl $(FLAGS) -c $(MODEXLIB)16planar.c
+
+16_vrs.$(OBJ): $(SRCLIB)16_vrs.h $(SRCLIB)16_vrs.c $(DOSLIBLIBS)
+       wcl $(FLAGS) -c $(SRCLIB)16_vrs.c $(DOSLIBLIBS)
+16_sprit.$(OBJ): $(SRCLIB)16_sprit.h $(SRCLIB)16_sprit.c
+       wcl $(FLAGS) -c $(SRCLIB)16_sprit.c
+
+
+bitmap.$(OBJ): $(SRCLIB)bitmap.h $(SRCLIB)bitmap.c
+       wcl $(FLAGS) -c $(SRCLIB)bitmap.c
+
+##planar.$(OBJ): $(SRCLIB)planar.h $(SRCLIB)planar.c
+##     wcl $(FLAGS) -c $(SRCLIB)planar.c
+
+scroll16.$(OBJ): $(SRCLIB)scroll16.h $(SRCLIB)scroll16.c
+       wcl $(FLAGS) -c $(SRCLIB)scroll16.c
+
+wcpu.$(OBJ): $(WCPULIB)wcpu.h $(WCPULIB)wcpu.c
+       wcl $(FLAGS) -c $(WCPULIB)wcpu.c
+
+16text.$(OBJ): $(SRCLIB)16text.c
+       wcl $(FLAGS) -c $(SRCLIB)16text.c
+
+mapread.$(OBJ): $(SRCLIB)mapread.h $(SRCLIB)mapread.c
+       wcl $(FLAGS) -c $(SRCLIB)mapread.c
+
+16_timer.$(OBJ): $(SRCLIB)16_timer.h $(SRCLIB)16_timer.c
+       wcl $(FLAGS) -c $(SRCLIB)16_timer.c
+
+16_in.$(OBJ): $(SRCLIB)16_in.h $(SRCLIB)16_in.c
+       wcl $(FLAGS) -c $(SRCLIB)16_in.c
+
+16_mm.$(OBJ): $(SRCLIB)16_mm.h $(SRCLIB)16_mm.c
+       wcl $(FLAGS) -c $(SRCLIB)16_mm.c
+
+16_ca.$(OBJ): $(SRCLIB)16_ca.h $(SRCLIB)16_ca.c
+       wcl $(FLAGS) -c $(SRCLIB)16_ca.c
+
+16_dbg.$(OBJ): $(SRCLIB)16_dbg.h $(SRCLIB)16_dbg.c
+       wcl $(FLAGS) -c $(SRCLIB)16_dbg.c
+
+midi.$(OBJ): $(SRCLIB)midi.h $(SRCLIB)midi.c
+       wcl $(FLAGS) -c $(SRCLIB)midi.c
+
+16_head.$(OBJ): $(SRCLIB)16_head.h $(SRCLIB)16_head.c
+       wcl $(FLAGS) -c $(SRCLIB)16_head.c
+
+16_hc.$(OBJ): $(SRCLIB)16_hc.h $(SRCLIB)16_hc.c
+       wcl $(FLAGS) -c $(SRCLIB)16_hc.c
+
+16_snd.$(OBJ): $(SRCLIB)16_snd.h $(SRCLIB)16_snd.c
+       wcl $(FLAGS) -c $(SRCLIB)16_snd.c
+       #====wcl -mc -c $(SRCLIB)16_snd.c
+
+jsmn.$(OBJ): $(JSMNLIB)jsmn.h $(JSMNLIB)jsmn.c
+       wcl $(FLAGS) -c $(JSMNLIB)jsmn.c
+
+kitten.$(OBJ): $(NYANLIB)kitten.h $(NYANLIB)kitten.c
+       wcl $(FLAGS) -c $(NYANLIB)kitten.c
+
+vgmSnd.$(OBJ): $(VGMSNDLIB)vgmSnd.h $(VGMSNDLIB)vgmSnd.c
+       wcl $(FLAGS) -c $(VGMSNDLIB)vgmSnd.c
+       #====wcl -c -mc $(VGMSNDLIB)vgmSnd.c
+
+#memory.$(OBJ): $(EXMMLIB)memory.h $(EXMMLIB)memory.c
+#      wcl $(FLAGS) $(MFLAGS) -c $(EXMMLIB)memory.c
+
+c_utils.$(OBJ): $(MODEXLIB_)c_utils.asm
+       wcl -c $(AFLAGS) $(MODEXLIB_)c_utils.asm
+modex.$(OBJ): $(MODEXLIB_)modex.asm
+       wcl -c $(AFLAGS) $(MODEXLIB_)modex.asm
 
 #
 #other~
@@ -333,7 +459,6 @@ clean: .symbolic
        @$(REMOVECOMMAND) *.MAH
        @$(REMOVECOMMAND) *.mah
        @$(REMOVECOMMAND) *.err
-       @echo $(OBJ)
        #@cd $(DOSLIB:$(to_os_path))
        #@./buildall.sh clean
        #@cd $(BUILD_ROOT)
index e37e64bbc89aa15bdc03ea3f26388d571cc70948..28c80b077c67f76cdcb8bf4e86916c3f33791e66 100755 (executable)
@@ -425,20 +425,26 @@ modex.$(OBJ): $(MODEXLIB_)modex.asm
 clean: .symbolic\r
        @$(REMOVECOMMAND) $(EXEC)\r
        @$(REMOVECOMMAND) *.$(OBJ)\r
+!ifdef __LINUX__\r
+       @rm *.LIB\r
+       @rm *.EXE\r
+       #@$(REMOVECOMMAND) *.\$\$\$\r
+!else\r
+       @*$(REMOVECOMMAND) *.$$$\r
+!endif\r
        @$(REMOVECOMMAND) 16.lib\r
        @$(REMOVECOMMAND) gfx.lib\r
        @$(REMOVECOMMAND) vgmsnd.lib\r
-       @wlib -n $(WLIBQ) 16.lib\r
-       @wlib -n $(WLIBQ) gfx.lib\r
-       @wlib -n $(WLIBQ) vgmsnd.lib\r
-       @$(REMOVECOMMAND) *.16\r
+       @*wlib -n $(WLIBQ) 16.lib\r
+       @*wlib -n $(WLIBQ) gfx.lib\r
+       @*wlib -n $(WLIBQ) vgmsnd.lib\r
        @$(REMOVECOMMAND) *.16W\r
        @$(REMOVECOMMAND) *.16B\r
        @$(REMOVECOMMAND) *.OBJ\r
        @$(REMOVECOMMAND) *.o\r
        @$(REMOVECOMMAND) *.BCO\r
-       @$(REMOVECOMMAND) makefi~1\r
-       @$(REMOVECOMMAND) makefile~\r
+       #@$(REMOVECOMMAND) makefi~1\r
+       #@$(REMOVECOMMAND) makefile~\r
        @$(REMOVECOMMAND) __wcl__.LNK\r
 #      @$(REMOVECOMMAND) *.smp\r
        @$(REMOVECOMMAND) *.SMP\r
@@ -446,9 +452,9 @@ clean: .symbolic
        @$(REMOVECOMMAND) *.MAH\r
        @$(REMOVECOMMAND) *.mah\r
        @$(REMOVECOMMAND) *.err\r
-       #@cd $(DOSLIB)\r
+       #@cd $(DOSLIB:$(to_os_path))\r
        #@./buildall.sh clean\r
-       #@cd $(PDIR)$(PDIR)$(PDIR)\r
+       #@cd $(BUILD_ROOT)\r
 #      @$(COPYCOMMAND) $(SRC)exmmtest.c $(EXMMTESTDIR)$(SRC)\r
 #      @$(COPYCOMMAND) $(SRCLIB)16_mm.* $(EXMMTESTDIR)$(SRCLIB)\r
 #      @$(COPYCOMMAND) $(SRCLIB)16_head.* $(EXMMTESTDIR)$(SRCLIB)\r
@@ -465,10 +471,10 @@ backupconfig: .symbolic
        @$(COPYCOMMAND) .gitignore git_igno.re\r
 \r
 comp: .symbolic\r
-       @upx -9 $(EXEC)\r
+       @*upx -9 $(EXEC)\r
 \r
 comq: .symbolic\r
-       @upx -9 $(UPXQ) $(EXEC)\r
+       @*upx -9 $(UPXQ) $(EXEC)\r
 \r
 www: .symbolic\r
        @ssh -p 26 sparky4@4ch.mooo.com 'rm -f /var/www/16/*exe*'\r
@@ -481,7 +487,7 @@ www: .symbolic
        @scp -r -P 26 /var/www/*.exe.zip.* 4ch.mooo.com:/var/www/16/\r
 \r
 getwww: .symbolic\r
-       @x4get.bat $(EXEC)\r
+       *x4get.bat $(EXEC)\r
 \r
 vomitchan: .symbolic\r
        @$(DUMP) *.err\r
@@ -491,17 +497,17 @@ vomitchan: .symbolic
 ##\r
 #git submodule add <repo>\r
 mkdl: .symbolic\r
-       @cd $(DOSLIB)\r
+       @cd $(DOSLIB:$(to_os_path))\r
        @./buildall.sh\r
-       @cd $(PDIR)$(PDIR)$(PDIR)\r
+       @cd $(BUILD_ROOT)\r
 \r
 uplibs: .symbolic\r
-       @cd $(JSMNLIB)\r
+       @cd $(JSMNLIB:$(to_os_path))\r
        @git pull\r
-       @cd $(PDIR)$(PDIR)$(PDIR)\r
-       @cd $(DOSLIB)\r
+       @cd $(BUILD_ROOT)\r
+       @cd $(DOSLIB:$(to_os_path))\r
        @git pull\r
-       @cd $(PDIR)$(PDIR)$(PDIR)\r
+       @cd $(BUILD_ROOT)\r
 \r
 reinitlibs: .symbolic\r
        @rm -rf $(SRCLIB)doslib\r
@@ -515,16 +521,16 @@ initlibs: .symbolic
        @cp git_con.fig .git/config\r
        @cp git_modu.les .gitmodules\r
        @cp git_igno.re .gitignore\r
-       @cd $(SRCLIB)\r
+       @cd $(SRCLIB:$(to_os_path))\r
        @git clone https://github.com/joncampbell123/doslib.git\r
        @git clone https://github.com/zserge/jsmn.git\r
-       @cd $(PDIR)$(PDIR)\r
+       @cd $(BUILD_ROOT)\r
        @cd 16\r
        @git clone https://github.com/FlatRockSoft/CatacombApocalypse.git\r
        @git clone https://github.com/id-Software/wolf3d.git\r
        @git clone https://github.com/keendreams/keen.git\r
-       @cd $(PDIR)\r
-       @cp $(SRCLIB)doslib/make-lowercase .\r
+       @cd $(BUILD_ROOT)\r
+       @cp $(DOSLIB)/make-lowercase .\r
 \r
 ##\r
 ##     experimental libs\r
@@ -533,25 +539,25 @@ xlib: .symbolic
        @cd 16$(DIRSEP)xlib\r
        @wmake -h clean\r
        @wmake -h all\r
-       @cd $(PDIR)$(PDIR)\r
+       @cd $(BUILD_ROOT)\r
 \r
 mx: .symbolic\r
        @cd 16$(DIRSEP)xw\r
 #      @wmake clean\r
        @wmake -h all\r
-       @cd $(PDIR)$(PDIR)\r
+       @cd $(BUILD_ROOT)\r
 \r
 mx_: .symbolic\r
        @cd 16$(DIRSEP)xw_\r
        @wmake -h -f makefile all\r
-       @cd $(PDIR)$(PDIR)\r
+       @cd $(BUILD_ROOT)\r
 \r
 vrs: .symbolic\r
-       @cd $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)vga\r
+       @cd $(DOSLIB_VGA:$(to_os_path))\r
        #@make clean\r
        @make all\r
-       @mv pcx2vrl ../../../../../\r
-       @mv pcxsscut ../../../../../\r
-       @mv vrl2vrs ../../../../../\r
-       @mv vrsdump ../../../../../\r
-       @cd ../../../../../\r
+       @mv pcx2vrl $(BUILD_ROOT)$(DIRSEP)\r
+       @mv pcxsscut $(BUILD_ROOT)$(DIRSEP)\r
+       @mv vrl2vrs $(BUILD_ROOT)$(DIRSEP)\r
+       @mv vrsdump $(BUILD_ROOT)$(DIRSEP)\r
+       @cd $(BUILD_ROOT)\r