]> 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 2a24bf8219aab899a8063bb750194bf488e85caf..306538e046912856e9a22ae6119d1dfb806ff19a 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.
@@ -40,6 +45,7 @@ DELLOGFILE=1
 to_os_path=\=/
 REMOVECOMMAND=rm -f
 COPYCOMMAND=cp -f
+MOVECOMMAND=mv
 DIRSEP=/
 OBJ=obj
 DUMP=cat
@@ -49,6 +55,7 @@ DOSLIBMAKEALL=./buildall.sh build all
 to_os_path=/=\
 REMOVECOMMAND=del
 COPYCOMMAND=copy /y
+MOVECOMMAND=move
 DIRSEP=\
 OBJ=obj
 DUMP=type
@@ -66,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
@@ -106,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
@@ -208,7 +216,7 @@ SPRIUTILEXEC = &
        pcxsscut &
        vrl2vrs &
        vrsdump
-UTILEXEC += $(SPRIUTILEXEC)
+#UTILEXEC += $(SPRIUTILEXEC)
 !endif
 
 EXEC = &
@@ -216,9 +224,9 @@ EXEC = &
        bakapi.exe &
        $(TESTEXEC)
 
-!ifdef __LINUX__
-EXEC += $(SPRIUTILEXEC)
-!endif
+#!ifdef __LINUX__
+#EXEC += $(SPRIUTILEXEC)
+#!endif
 
 ALLEXEC = &
        $(EXEC) &
@@ -371,13 +379,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
@@ -409,14 +419,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:
+       @$(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)
@@ -426,10 +461,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
@@ -492,9 +528,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