]> 4ch.mooo.com Git - 16.git/blobdiff - makefile
__seguse.txt added to show _seg usage also OpenVGMFile needs to be ported to 16_snd...
[16.git] / makefile
index 7a6087479ce62e5e99e348c44e0e3903267683f9..defcd3fddbab487a593c3b91f6ce4b59d8eaf4ca 100755 (executable)
--- a/makefile
+++ b/makefile
 # -zk0u        translate kanji to unicode... wwww
 # -zk0 kanji support~
 # -zkl         current codepage
+# -zd{f,p} DS floats vs DS pegged to DGROUP
+# -zu SS != DGROUP
+# -zp{1,2,4,8,16} struct packing align.
+# -ei force enums to be type int
+# -wo diagnose problems in overlaid code
 
 # this enables debug output to the serial port.
 # comment this out on game release.
 # serial output goes to COM1 at 9600 baud 1 stop bit odd parity.
 # serial output is plain text ASCII.
-DEBUGSERIAL=1
+DEBUGSERIAL=0
 
 DELLOGFILE=1
 
@@ -68,6 +73,7 @@ SPRI=$(DATADIR)/spri
 SRC=src
 UTIL=$(SRC)/util
 GITCONFIGDIR=$(UTIL)/git
+SCRIPTBATDIR=$(UTIL)/shbat
 SRCLIB=$(SRC)/lib
 JSMNLIB=$(SRCLIB)/jsmn
 NYANLIB=$(SRCLIB)/nyan
@@ -108,10 +114,10 @@ UPXQ=-qqq
 #
 # compile flags
 #
-S_FLAGS=-sg -st -of+ -zu -zdf -zff -zgf -k32768
-Z_FLAGS=-zk0 -zc -zp8 -zm
-O_FLAGS=-opnr -oe=24 -oil+ -outback -ohm                               -zp4##-ei
-T_FLAGS=-bt=dos -wx -m$(MEMORYMODE) -0 -fpi87 -d1 -fo=.$(OBJ) ##-e=65536
+S_FLAGS=-sg -st -of+ -zu -zdf -zff -zgf -k24576#32768
+Z_FLAGS=-zk0 -zc -zm#### -zp4 -ei
+O_FLAGS=-opnr -oe=24 -oil+ -outback -ohm
+T_FLAGS=-bt=dos -wx -m$(MEMORYMODE) -0 -fpi87 -d1 -fo=.$(OBJ)##-e=65536
 
 DBUGFLAGS=-fm=$^&.meh -fd=$^&
 CPPFLAGS=-DTARGET_MSDOS=16 -DMSDOS=1
@@ -129,7 +135,8 @@ LIBFLAGS=$(WLIBQ) -b -n
 VGMSNDOBJ = vgmSnd.$(OBJ) 16_snd.$(OBJ)
 #OLDLIBOBJS=bitmap.$(OBJ) 16render.$(OBJ)
 GFXLIBOBJS = 16_vl.$(OBJ) 16_vlpal.$(OBJ) 16text.$(OBJ) bakapee.$(OBJ) scroll16.$(OBJ) 16_vrs.$(OBJ) 16_spri.$(OBJ) $(OLDLIBOBJS)
-16LIBOBJS = 16_mm.$(OBJ) 16_pm.$(OBJ) 16_ca.$(OBJ) 16_tail.$(OBJ) 16_head.$(OBJ) 16_in.$(OBJ) 16_enti.$(OBJ) 16_dbg.$(OBJ) kitten.$(OBJ) 16_hc.$(OBJ) 16_wcpu.$(OBJ) 16_timer.$(OBJ) jsmn.$(OBJ) 16_map.$(OBJ) 16text.$(OBJ)
+16LIBNOINOBJS = 16_mm.$(OBJ) 16_pm.$(OBJ) 16_ca.$(OBJ) 16_tail.$(OBJ) 16_head.$(OBJ) 16_enti.$(OBJ) 16_dbg.$(OBJ) kitten.$(OBJ) 16_hc.$(OBJ) 16_wcpu.$(OBJ) 16_timer.$(OBJ) jsmn.$(OBJ) 16_map.$(OBJ) 16text.$(OBJ)
+16LIBOBJS = $(16LIBNOINOBJS) 16_in.$(OBJ)
 DOSLIBOBJ = adlib.$(OBJ) 8254.$(OBJ) 8259.$(OBJ) dos.$(OBJ) cpu.$(OBJ)
 !ifeq DEBUGSERIAL 1
 DOSLIBOBJ += 8250.$(OBJ)
@@ -210,7 +217,7 @@ SPRIUTILEXEC = &
        pcxsscut &
        vrl2vrs &
        vrsdump
-UTILEXEC += $(SPRIUTILEXEC)
+#UTILEXEC += $(SPRIUTILEXEC)
 !endif
 
 EXEC = &
@@ -218,9 +225,9 @@ EXEC = &
        bakapi.exe &
        $(TESTEXEC)
 
-!ifdef __LINUX__
-EXEC += $(SPRIUTILEXEC)
-!endif
+#!ifdef __LINUX__
+#EXEC += $(SPRIUTILEXEC)
+#!endif
 
 ALLEXEC = &
        $(EXEC) &
@@ -255,6 +262,7 @@ fonttest.exe:        fonttest.$(OBJ) gfx.lib
 #fonttes0.exe: fonttes0.$(OBJ) $(16LIB)
 fontgfx.exe:   fontgfx.$(OBJ) gfx.lib $(DOSLIB)
 inputest.exe:   inputest.$(OBJ) $(16LIB) $(DOSLIB) gfx.lib
+inntest.exe:           inntest.$(OBJ)  $(16LIBNOINOBJS) 16_in_1.$(OBJ) $(DOSLIB) gfx.lib
 #sountest.exe: sountest.$(OBJ) $(16LIB)
 pcxtest.exe:   pcxtest.$(OBJ) gfx.lib $(DOSLIB) $(16LIB)
 vrstest.exe:   vrstest.$(OBJ) $(16LIB) gfx.lib $(DOSLIB)
@@ -295,6 +303,7 @@ fonttest.$(OBJ):$(SRC)/fonttest.c
 #fonttes0.$(OBJ): $(SRC)/fonttes0.c
 fontgfx.$(OBJ):$(SRC)/fontgfx.c
 inputest.$(OBJ):$(SRC)/inputest.c
+inntest.$(OBJ):$(SRC)/inntest.c
 #sountest.$(OBJ): $(SRC)/sountest.c
 #miditest.$(OBJ): $(SRC)/miditest.c
 #testemm.$(OBJ):$(SRC)/testemm.c
@@ -349,10 +358,12 @@ mapread.$(OBJ):$(SRCLIB)/mapread.c $(SRCLIB)/mapread.h
 16_map.$(OBJ):$(SRCLIB)/16_map.c $(SRCLIB)/16_map.h
 16_timer.$(OBJ):$(SRCLIB)/16_timer.c $(SRCLIB)/16_timer.h
 16_in.$(OBJ):   $(SRCLIB)/16_in.c $(SRCLIB)/16_in.h
+16_in_1.$(OBJ):         $(SRCLIB)/16_in_1.c $(SRCLIB)/16_in_1.h
 16_rf.$(OBJ):   $(SRCLIB)/16_rf.c      $(SRCLIB)/16_rf.h
 16_mm.$(OBJ):   $(SRCLIB)/16_mm.c      $(SRCLIB)/16_mm.h
 16_pm.$(OBJ):   $(SRCLIB)/16_pm.c      $(SRCLIB)/16_pm.h
 16_ca.$(OBJ):   $(SRCLIB)/16_ca.c      $(SRCLIB)/16_ca.h
+16_us.$(OBJ):   $(SRCLIB)/16_us.c
 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
@@ -373,13 +384,15 @@ ll.$(OBJ):                $(SRCLIB)/ll.c  $(SRCLIB)/ll.h
 #
 clean: .symbolic
        @if not exist $(DOSLIBDIR)/buildall.sh wmake -h initlibs
+       @wmake -h initscript
        @for %f in ($(ALLEXEC)) do @if exist %f $(REMOVECOMMAND) %f
 !ifdef __LINUX__
        @if exist *.LIB $(REMOVECOMMAND) *.LIB
        @. src/util/bcexmm.sh
        @if exist *.EXE $(REMOVECOMMAND) *.EXE
        @if exist *.OBJ $(REMOVECOMMAND) *.OBJ
-       @for %f in ($(SPRIUTILEXEC)) do @if exist %f $(REMOVECOMMAND) %f
+       #@for %f in ($(SPRIUTILEXEC)) do @if exist %f $(REMOVECOMMAND) %f
+       @if not exist vrl2vrs wmake -h vrs
 !else
        @if exist *.o $(REMOVECOMMAND) *.o
 !endif
@@ -411,14 +424,39 @@ clean: .symbolic
 
 nuke: .symbolic
        @wmake clean
+       @wmake backupscript
        @wmake cldl
        @wmake all
        @wmake comp
 
 backupconfig: .symbolic
-       @$(COPYCOMMAND) .git$(DIRSEP)config $(GITCONFIGDIR)git_con.fig
-       @$(COPYCOMMAND) .gitmodules $(GITCONFIGDIR)git_modu.les
-       @$(COPYCOMMAND) .gitignore $(GITCONFIGDIR)git_igno.re
+       @$(COPYCOMMAND) .git$(DIRSEP)config $(GITCONFIGDIR)/git_con.fig
+       @$(COPYCOMMAND) .gitmodules $(GITCONFIGDIR)/git_modu.les
+       @$(COPYCOMMAND) .gitignore $(GITCONFIGDIR)/git_igno.re
+
+initconfig: .symbolic
+       @$(COPYCOMMAND) $(GITCONFIGDIR)/git_con.fig .git/config
+       @$(COPYCOMMAND) $(GITCONFIGDIR)/git_modu.les .gitmodules
+       @$(COPYCOMMAND) $(GITCONFIGDIR)/git_igno.re .gitignore
+
+
+backupscript: .symbolic
+       @if exist *.bat $(MOVECOMMAND) *.bat $(SCRIPTBATDIR)/
+       @if exist *.sh $(MOVECOMMAND) *.sh $(SCRIPTBATDIR)/
+!ifdef __LINUX__
+       @if exist *.BAT $(MOVECOMMAND) *.BAT $(SCRIPTBATDIR)/
+       @if not exist ud.sh $(COPYCOMMAND) $(SCRIPTBATDIR)/ud.sh ./
+!endif
+       @if not exist wbuild.sh $(COPYCOMMAND) $(SCRIPTBATDIR)/wbuild.sh ./
+       @if not exist WBUILD.BAT $(COPYCOMMAND) $(SCRIPTBATDIR)/WBUILD.BAT ./
+
+initscript: .symbolic
+       @$(COPYCOMMAND) $(SCRIPTBATDIR)/*.bat ./
+       @$(COPYCOMMAND) $(SCRIPTBATDIR)/*.sh ./
+!ifdef __LINUX__
+       @$(COPYCOMMAND) $(SCRIPTBATDIR)/*.BAT ./
+!endif
+
 
 comp: .symbolic
        @*upx -9 $(EXEC)
@@ -495,9 +533,7 @@ reinitlibs: .symbolic
        @wmake -h initlibs
 
 initlibs: .symbolic
-       @$(COPYCOMMAND) $(GITCONFIGDIR)git_con.fig .git/config
-       @$(COPYCOMMAND) $(GITCONFIGDIR)git_modu.les .gitmodules
-       @$(COPYCOMMAND) $(GITCONFIGDIR)git_igno.re .gitignore
+       @wmake -h initconfig
        @wmake -h getlib
        @cd 16
        @git clone https://github.com/FlatRockSoft/CatacombApocalypse.git