DOSLIBDIR=$(SRCLIB)doslib
WCPULIB=$(SRCLIB)wcpu$(DIRSEP)
+#
+# quiet flags
+#
WLIBQ=-q
WCLQ=-zq $(WLIBQ)
UPXQ=-qqq
+#
+# compile flags
+#
AFLAGS=-mh -0 -d1
-16FLAGS=-fh=16.hed
-BAKAPIFLAGS=-fh=bakapi.hed
SFLAGS=-sg -st -of+ -zu -zdf -zff -zgf -k32768#54096#60000
DFLAGS=-DTARGET_MSDOS=16 -DMSDOS=1 $(SFLAGS)
-ZFLAGS=-zk0 -zc -zp8 $(WCLQ) ## -zm
-CFLAGS=$(AFLAGS) $(IFLAGS)-lr -l=dos -wo -i$(DOSLIB)##wwww
-OFLAGS=-obmiler -out -oh -ei -zp8 -fpi87 -onac -ol+ -ok####x
+ZFLAGS=-zk0 -zc -zp8 -zm $(WCLQ)
+LFLAG=-lr -l=dos -fd
+CFLAGS=$(AFLAGS) $(IFLAGS) -wo -i$(DOSLIB) $(LFLAG)
+OFLAGS=-obmilr -oe=24 -out -oh -ei -zp8 -fpi87 -onac -ol+ -ok####x
FLAGS=$(CFLAGS) $(OFLAGS) $(DFLAGS) $(ZFLAGS)
-
+#
+# objects
+#
VGMSNDOBJ = vgmSnd.$(OBJ) 16_snd.$(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)
DOSLIBLIBS += $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)8250$(DIRSEP)dos86h$(DIRSEP)8250.lib
!endif
-TESTEXEC = exmmtest.exe test.exe test0.exe pcxtest.exe pcxtest2.exe test2.exe palettec.exe maptest.exe fmemtest.exe fonttest.exe fontgfx.exe scroll.exe vgmtest.exe inputest.exe palettel.exe planrpcx.exe
+TESTEXEC = test.exe test0.exe pcxtest.exe pcxtest2.exe test2.exe palettec.exe maptest.exe fmemtest.exe fonttest.exe fontgfx.exe scroll.exe vgmtest.exe inputest.exe palettel.exe planrpcx.exe exmmtest.exe
-EXEC = 16.exe bakapi.exe $(TESTEXEC) tesuto.exe
+EXEC = 16.exe bakapi.exe tesuto.exe 0.exe $(TESTEXEC)
-all: $(EXEC) joytest.exe vrs
+all: $(EXEC) joytest.exe
#16.lib => $(16LIBOBJS) bug....
16LIB=$(16LIBOBJS)
!ifeq DEBUGSERIAL 1
tesuto.$(OBJ): $(SRC)tesuto.c
wcl $(FLAGS) $(WCLQ) -c $(SRC)tesuto.c
+0.exe: 0.$(OBJ) $(DOSLIBLIBS) 16_head.$(OBJ) gfx.lib
+ wcl $(FLAGS) $(WCLQ) 0.$(OBJ) $(DOSLIBLIBS) 16_head.$(OBJ) gfx.lib
+0.$(OBJ): $(SRC)0.c
+ wcl $(FLAGS) $(WCLQ) -c $(SRC)0.c
+
test.exe: test.$(OBJ) gfx.lib 16_in.$(OBJ) 16_head.$(OBJ) $(DOSLIBLIBS) $(16LIB)
wcl $(FLAGS) test.$(OBJ) gfx.lib 16_in.$(OBJ) 16_head.$(OBJ) $(DOSLIBLIBS) $(16LIB) -fm=test.mah
fmemtest.exe: fmemtest.$(OBJ) $(16LIB)
wcl $(FLAGS) fmemtest.$(OBJ) $(16LIB) -fm=fmemtest.mah
-exmmtest.exe: exmmtest.$(OBJ) $(16LIB)
+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 $(FLAGS) -c $(SRC)tsthimem.c
exmmtest.$(OBJ): $(SRC)exmmtest.c
- wcl $(FLAGS) -c $(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
backupconfig: .symbolic
@$(COPYCOMMAND) .git$(DIRSEP)config git_con.fig
@$(COPYCOMMAND) .gitmodules git_modu.les
+ @$(COPYCOMMAND) .gitignore git_igno.re
comp: .symbolic
@upx -9 $(EXEC)
@ssh -p 26 sparky4@4ch.mooo.com 'rm -f /var/www/16/*exe.zip*'
@rm -f /var/www/*.exe.zip*
#@cp ./$(EXEC) $(DIRSEP)var$(DIRSEP)www$(DIRSEP)
- @./z.sh $(EXEC) $(EXEC)
+ @./src/util/z.sh $(EXEC) $(EXEC)
@scp -r -P 26 *.exe 4ch.mooo.com:/var/www/16/
@scp -r -P 26 /var/www/*.exe.zip.* 4ch.mooo.com:/var/www/16/
@rm -rf $(SRCLIB)jsmn
@rm -rf 16/CatacombApocalypse
@rm -rf 16/wolf3d
+ @rm -rf 16/keen
@wmake -h initlibs
initlibs: .symbolic
@cp git_con.fig .git/config
@cp git_modu.les .gitmodules
+ @cp git_igno.re .gitignore
@cd $(SRCLIB)
@git clone https://github.com/joncampbell123/doslib.git
@git clone https://github.com/zserge/jsmn.git
@cd 16
@git clone https://github.com/FlatRockSoft/CatacombApocalypse.git
@git clone https://github.com/id-Software/wolf3d.git
+ @git clone https://github.com/keendreams/keen.git
@cd $(PDIR)
##