]> 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 128768d387764a465506d3651f2ec5d057fe6170..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.
@@ -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
@@ -109,9 +115,9 @@ UPXQ=-qqq
 # compile flags
 #
 S_FLAGS=-sg -st -of+ -zu -zdf -zff -zgf -k24576#32768
-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
+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
@@ -210,7 +216,7 @@ SPRIUTILEXEC = &
        pcxsscut &
        vrl2vrs &
        vrsdump
-UTILEXEC += $(SPRIUTILEXEC)
+#UTILEXEC += $(SPRIUTILEXEC)
 !endif
 
 EXEC = &
@@ -218,9 +224,9 @@ EXEC = &
        bakapi.exe &
        $(TESTEXEC)
 
-!ifdef __LINUX__
-EXEC += $(SPRIUTILEXEC)
-!endif
+#!ifdef __LINUX__
+#EXEC += $(SPRIUTILEXEC)
+#!endif
 
 ALLEXEC = &
        $(EXEC) &
@@ -379,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
@@ -411,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)
@@ -495,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