]> 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 2632b8b803171052d8efb12c46cc8071c73f3816..6c97f4e4fae4f6574dc736390ea2055cd3a8a95c 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.
@@ -31,6 +36,8 @@
 # serial output is plain text ASCII.
 DEBUGSERIAL=1
 
+DELLOGFILE=1
+
 #192x144
 #wwww will add these
 !ifdef __LINUX__
@@ -38,6 +45,7 @@ DEBUGSERIAL=1
 to_os_path=\=/
 REMOVECOMMAND=rm -f
 COPYCOMMAND=cp -f
+MOVECOMMAND=mv
 DIRSEP=/
 OBJ=obj
 DUMP=cat
@@ -47,6 +55,7 @@ DOSLIBMAKEALL=./buildall.sh build all
 to_os_path=/=\
 REMOVECOMMAND=del
 COPYCOMMAND=copy /y
+MOVECOMMAND=move
 DIRSEP=\
 OBJ=obj
 DUMP=type
@@ -64,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
@@ -104,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=-opn -oe=24 -oil+ -outback -ohm                                -zp4##-ei -or
-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
@@ -206,7 +216,7 @@ SPRIUTILEXEC = &
        pcxsscut &
        vrl2vrs &
        vrsdump
-UTILEXEC += $(SPRIUTILEXEC)
+#UTILEXEC += $(SPRIUTILEXEC)
 !endif
 
 EXEC = &
@@ -214,9 +224,9 @@ EXEC = &
        bakapi.exe &
        $(TESTEXEC)
 
-!ifdef __LINUX__
-EXEC += $(SPRIUTILEXEC)
-!endif
+#!ifdef __LINUX__
+#EXEC += $(SPRIUTILEXEC)
+#!endif
 
 ALLEXEC = &
        $(EXEC) &
@@ -375,7 +385,8 @@ clean: .symbolic
        @. 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
@@ -388,13 +399,15 @@ clean: .symbolic
        @if exist *.smp $(REMOVECOMMAND) *.smp
        @if exist *.SMP $(REMOVECOMMAND) *.SMP
        @if exist *.hed $(REMOVECOMMAND) *.hed
-       @if exist *.mah $(REMOVECOMMAND) *.mah
-       @if exist *.MAH $(REMOVECOMMAND) *.MAH
+       @if exist *.meh $(REMOVECOMMAND) *.meh
+       @if exist *.MEH $(REMOVECOMMAND) *.MEH
        @if exist *.err $(REMOVECOMMAND) *.err
        @if exist TC*.SWP $(REMOVECOMMAND) TC*.SWP
-#      @if exist *.16W $(REMOVECOMMAND) *.16W
-#      @if exist *.16B $(REMOVECOMMAND) *.16B
-
+!ifeq DELLOGFILE 1
+       @if exist *.16W $(REMOVECOMMAND) *.16W
+       @if exist *.16B $(REMOVECOMMAND) *.16B
+       @if exist *.L16 $(REMOVECOMMAND) *.L16
+!endif
 #      @$(COPYCOMMAND) $(SRC)exmmtest.c $(EXMMTESTDIR)$(SRC)
 #      @$(COPYCOMMAND) $(SRCLIB)16_mm.* $(EXMMTESTDIR)$(SRCLIB)
 #      @$(COPYCOMMAND) $(SRCLIB)16_head.* $(EXMMTESTDIR)$(SRCLIB)
@@ -405,14 +418,36 @@ 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:
+       @$(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)/
+!endif
+
+initscript: .symbolic
+       @if not exist *.bat $(COPYCOMMAND) $(SCRIPTBATDIR)/*.bat ./
+       @if not exist *.sh $(COPYCOMMAND) $(SCRIPTBATDIR)/*.sh ./
+!ifdef __LINUX__
+       @if not exist *.BAT $(COPYCOMMAND) $(SCRIPTBATDIR)/*.BAT ./
+!endif
+
 
 comp: .symbolic
        @*upx -9 $(EXEC)
@@ -422,10 +457,11 @@ comq: .symbolic
 
 www: .symbolic
        @for %f in (/var/www/$(EXEC)) do @if exist /var/www/%f $(REMOVECOMMAND) /var/www/%f
-       @$(REMOVECOMMAND) /var/www/*.exe.zip*
+       @$(REMOVECOMMAND) /var/www/*.exe.zi*
+       @$(REMOVECOMMAND) /var/www/*.zip.zi*
        @for %f in ($(EXEC)) do @if exist %f @$(COPYCOMMAND) %f /var/www/
        @./src/util/z.sh $(EXEC) $(EXEC)
-       @./src/util/z.sh data data
+       @./src/util/z2.sh data.zip data
        @wmake -h wwwext
 
 wwwext: .symbolic
@@ -488,9 +524,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