From 3b5709e330b0029b4f183287e416f22e7a6b72c2 Mon Sep 17 00:00:00 2001 From: sparky4 Date: Sat, 27 Aug 2016 13:19:15 -0500 Subject: [PATCH] pushing new make file w --- 16.c | 99 ++++++++++ 16.h | 43 +++++ WBUILD.BAT | 4 +- makefile.wat | 505 +++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 649 insertions(+), 2 deletions(-) create mode 100755 16.c create mode 100755 16.h create mode 100755 makefile.wat diff --git a/16.c b/16.c new file mode 100755 index 00000000..6ad5334f --- /dev/null +++ b/16.c @@ -0,0 +1,99 @@ +/* Project 16 Source Code~ + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * + * This file is part of Project 16. + * + * Project 16 is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * Project 16 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see , or + * write to the Free Software Foundation, Inc., 51 Franklin Street, + * Fifth Floor, Boston, MA 02110-1301 USA. + * + */ + +#include "src/16.h" + +global_game_variables_t gvar; +engi_stat_t engi_stat; +const char *cpus; +byte *dpal, *gpal; +player_t player[MaxPlayers]; + +void +main(int argc, char *argv[]) +{ + // DOSLIB: check our environment + probe_dos(); + + // DOSLIB: what CPU are we using? + // NTS: I can see from the makefile Sparky4 intends this to run on 8088 by the -0 switch in CFLAGS. + // So this code by itself shouldn't care too much what CPU it's running on. Except that other + // parts of this project (DOSLIB itself) rely on CPU detection to know what is appropriate for + // the CPU to carry out tasks. --J.C. + cpu_probe(); + + // DOSLIB: check for VGA + if (!probe_vga()) { + printf("VGA probe failed\n"); + return; + } + // hardware must be VGA or higher! + if (!(vga_state.vga_flags & VGA_IS_VGA)) { + printf("This program requires VGA or higher graphics hardware\n"); + return; + } + + if (_DEBUG_INIT() == 0) { +#ifdef DEBUGSERIAL + printf("WARNING: Failed to initialize DEBUG output\n"); +#endif + } + _DEBUG("Serial debug output started\n"); // NTS: All serial output must end messages with newline, or DOSBox-X will not emit text to log + _DEBUGF("Serial debug output printf test %u %u %u\n",1U,2U,3U); + + engi_stat = ENGI_RUN; + textInit(); + + /* save the palette */ + dpal = modexNewPal(); + modexPalSave(dpal); + modexFadeOff(4, dpal); + gpal = modexNewPal(); + modexPalSave(gpal); + modexSavePalFile("data/g.pal", gpal); + VGAmodeX(1, 1, &gvar); +// modexPalBlack(); //so player will not see loadings~ + IN_Startup(); + IN_Default(0,&player,ctrl_Joystick); + //modexprint(&screen, 32, 32, 1, 2, 0, "a", 1); + start_timer(&gvar); + while(ENGI_EXIT != engi_stat) + { + IN_ReadControl(0,&player); + if(IN_KeyDown(sc_Escape)) engi_stat = ENGI_EXIT; + shinku(&gvar); + _DEBUGF("Serial debug output printf test %u %u %u\n",1U,2U,3U); + } + switch(detectcpu()) + { + case 0: cpus = "8086/8088 or 186/88"; break; + case 1: cpus = "286"; break; + case 2: cpus = "386 or newer"; break; + default: cpus = "internal error"; break; + } + VGAmodeX(0, 1, &gvar); + printf("Project 16 16.exe. This is supposed to be the actual finished game executable!\n"); + printf("version %s\n", VERSION); + printf("detected CPU type: %s\n", cpus); + IN_Shutdown(); + modexFadeOn(4, dpal); +} diff --git a/16.h b/16.h new file mode 100755 index 00000000..7f792bbb --- /dev/null +++ b/16.h @@ -0,0 +1,43 @@ +/* Project 16 Source Code~ + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * + * This file is part of Project 16. + * + * Project 16 is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * Project 16 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see , or + * write to the Free Software Foundation, Inc., 51 Franklin Street, + * Fifth Floor, Boston, MA 02110-1301 USA. + * + */ + +#ifndef __16_H_ +#define __16_H_ + +#include "src/lib/16_head.h" +#include "src/lib/16_in.h" +#include "src/lib/modex16.h" +#include "src/lib/wcpu/wcpu.h" +//#include "src/lib/planar.h" +#include "src/lib/scroll16.h" +#include "src/lib/16_timer.h" +#include "src/lib/16_dbg.h" + +typedef enum { + ENGI_EXIT, + ENGI_QUIT, + ENGI_RUN, + ENGI_INPUT, + ENGI_PAUSE +} engi_stat_t; + +#endif /*__16_H_*/ diff --git a/WBUILD.BAT b/WBUILD.BAT index 4a61ec18..2cffdc10 100755 --- a/WBUILD.BAT +++ b/WBUILD.BAT @@ -1,6 +1,6 @@ @echo off -wmake -h clean -wmake -h +wmake -h clean -f makefile.wat +wmake -h -f makefile.wat rem wmake -h comp if exist *.err (wmake vomitchan) rem if exist *.o (del *.o) diff --git a/makefile.wat b/makefile.wat new file mode 100755 index 00000000..35dcf91f --- /dev/null +++ b/makefile.wat @@ -0,0 +1,505 @@ +# +# Higanbana Project makefile +# +# +# Possible optimizations for 8088 class processors +# +# -oa Relax alias checking +# -ob Try to generate straight line code +# -oe - expand user functions inline (-oe=20 is default, adds lots of code) +# -oh Enable repeated optimizations +# -oi generate certain lib funcs inline +# -oi+ Set max inline depth (C++ only, use -oi for C) +# -ok Flowing of register save into function flow graph +# -ol loop optimizations +# -ol+ loop optimizations plus unrolling +# -or Reorder for pipelined (486+ procs); not sure if good to use +# -os Favor space over time +# -ot Favor time over space +# -ei Allocate an "int" for all enum types +# -zp2 Allow compiler to add padding to structs +# -zpw Use with above; make sure you are warning free! +# -0 8088/8086 class code generation +# -s disable stack overflow checking + +# -zk0u translate kanji to unicode... wwww +# -zk0 kanji support~ +# -zkl current codepage + +# 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 + +#192x144 +#wwww will add these +!ifdef __LINUX__ +#!ifdef UNIX +to_os_path=\=/ +REMOVECOMMAND=rm -f +COPYCOMMAND=cp -f +DIRSEP=/ +OBJ=o +DUMP=cat +!else #DOS ^^ +to_os_path=/=\ +REMOVECOMMAND=*del +COPYCOMMAND=*copy /y +DIRSEP=\ +OBJ=obj +DUMP=*type +!endif + +TARGET_OS = dos + +#EXMMTESTDIR=16$(DIRSEP)exmmtest$(DIRSEP) +PDIR=..$(DIRSEP) +SRC=src$(DIRSEP) +DATADIR=data$(DIRSEP) +SPRI=$(DATADIR)$(DIRSEP)spri$(DIRSEP) +SRCLIB=$(SRC)lib$(DIRSEP) +JSMNLIB=$(SRCLIB)jsmn$(DIRSEP) +NYANLIB=$(SRCLIB)nyan$(DIRSEP) +#EXMMLIB=$(SRCLIB)exmm$(DIRSEP) +MODEXLIB=$(SRCLIB)modex16$(DIRSEP) +MODEXLIB_=$(SRCLIB)modex$(DIRSEP) +VGMSNDLIB=$(SRCLIB)vgmsnd$(DIRSEP) +DOSLIB=$(SRCLIB)doslib$(DIRSEP) +DOSLIBDIR=$(SRCLIB)doslib +WCPULIB=$(SRCLIB)wcpu$(DIRSEP) + +# +# quiet flags +# +WLIBQ=-q +WCLQ=-zq $(WLIBQ) +UPXQ=-qqq + +# +# compile flags +# +AFLAGS=-mh -0 -d1 +SFLAGS=-sg -st -of+ -zu -zdf -zff -zgf -k32768#54096#60000 +DFLAGS=-bt=dos -DTARGET_MSDOS=16 -DMSDOS=1 $(SFLAGS) +ZFLAGS=-zk0 -zc -zp8 -zm $(WCLQ) +LFLAGS=-lr -l=dos -v +CFLAGS=$(AFLAGS) $(IFLAGS) -wo -i$(DOSLIB) $(LFLAGS) -fo=.$(OBJ) +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) +GFXLIBOBJS = modex16.$(OBJ) bitmap.$(OBJ) 16text.$(OBJ) bakapee.$(OBJ) scroll16.$(OBJ) 16render.$(OBJ) $(DOSLIBLIBS) 16_vrs.$(OBJ) 16_sprit.$(OBJ) +#planar.$(OBJ) 16planar.$(OBJ) +DOSLIBLIBS=$(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)cpu$(DIRSEP)dos86h$(DIRSEP)cpu.lib $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)dos$(DIRSEP)dos86h$(DIRSEP)dos.lib $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)vga$(DIRSEP)dos86h$(DIRSEP)vga.lib + +!ifeq DEBUGSERIAL 1 +FLAGS += -DDEBUGSERIAL +DOSLIBOBJ += 8250.$(OBJ) +DOSLIBLIBS += $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)8250$(DIRSEP)dos86h$(DIRSEP)8250.lib +!endif + +TESTEXEC = test.exe test0.exe pcxtest.exe pcxtest2.exe palettec.exe maptest.exe fmemtest.exe fonttest.exe fontgfx.exe scroll.exe vgmtest.exe inputest.exe palettel.exe exmmtest.exe vrstest.exe +EXEC = 16.exe bakapi.exe tesuto.exe 0.exe $(TESTEXEC) + +all: $(EXEC) joytest.exe +#16.lib => $(16LIBOBJS) bug.... +16LIB=$(16LIBOBJS) +#16LIB=16.lib + +!ifeq DEBUGSERIAL 1 +16LIBOBJS += $(DOSLIBLIBS) +!endif + +# +# Rules for compiling +# +.c.obj: + *wcl $(CPPFLAGS) $(CFLAGS) $(extra_$^&_obj_opts) -c $[@ + +.asm.obj: + *wcl $(AFLAGS) $(extra_$^&_obj_opts) -c $[@ + +.obj.exe : + *wcl $(LFLAGS) $(extra_$^&_exe_opts) -fe=$@ $< + +.obj.lib : + *wcl $(LIBFLAGS) $(extra_$^&_lib_opts) $@ $< + +.c : $(SRC);$(SRCLIB);$(JSMNLIB);$(NYANLIB);$(VGMSNDLIB);$(WCPULIB) + +.asm : $(MODEXLIB_) + +.lib : .;$(DOSLIBDIR)/hw/cpu/dos86h;$(DOSLIBDIR)/hw/dos/dos86h;$(DOSLIBDIR)/hw/vga/dos86h;$(DOSLIBDIR)/hw/8250/dos86h + +# +#game and bakapi executables +# +16.exe: 16.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) $(16LIB) gfx.lib + *wcl $(FLAGS) $(16FLAGS) 16.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) $(16LIB) gfx.lib -fm=16.mah + +bakapi.exe: bakapi.$(OBJ) gfx.lib $(DOSLIBLIBS) + *wcl $(FLAGS) $(BAKAPIFLAGS) bakapi.$(OBJ) gfx.lib $(DOSLIBLIBS) -fm=bakapi.mah + +# +#Test Executables! +# +scroll.exe: scroll.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) $(16LIB) gfx.lib + *wcl $(FLAGS) scroll.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) $(16LIB) gfx.lib -fm=scroll.mah +scroll.$(OBJ): $(SRC)scroll.c + *wcl $(FLAGS) -c $(SRC)scroll.c + +tesuto.exe: tesuto.$(OBJ) $(DOSLIBLIBS) 16_head.$(OBJ) gfx.lib + *wcl $(FLAGS) $(WCLQ) tesuto.$(OBJ) $(DOSLIBLIBS) 16_head.$(OBJ) gfx.lib +tesuto.$(OBJ): $(SRC)tesuto.c + *wcl $(FLAGS) $(WCLQ) -c $(SRC)tesuto.c + +0.exe: 0.$(OBJ) $(DOSLIBLIBS) gfx.lib $(16LIB) + *wcl $(FLAGS) $(WCLQ) 0.$(OBJ) $(DOSLIBLIBS) gfx.lib $(16LIB) +0.$(OBJ): $(SRC)0.c + *wcl $(FLAGS) $(WCLQ) -c $(SRC)0.c + +test.exe: test.$(OBJ) gfx.lib $(DOSLIBLIBS) $(16LIB) + *wcl $(FLAGS) test.$(OBJ) gfx.lib $(DOSLIBLIBS) $(16LIB) -fm=test.mah + +#test2.exe: test2.$(OBJ) $(DOSLIBLIBS) gfx.lib +# *wcl $(FLAGS) test2.$(OBJ) $(DOSLIBLIBS) gfx.lib -fm=test2.mah + +test0.exe: test0.$(OBJ) + *wcl $(FLAGS) test0.$(OBJ) -fm=test0.mah + +fonttest.exe: fonttest.$(OBJ) $(16LIB) gfx.lib + *wcl $(FLAGS) fonttest.$(OBJ) $(16LIB) gfx.lib -fm=fonttest.mah + +#fonttes0.exe: fonttes0.$(OBJ) $(16LIB) +# *wcl $(FLAGS) fonttes0.$(OBJ) $(16LIB) + +fontgfx.exe: fontgfx.$(OBJ) $(16LIB) gfx.lib $(DOSLIBLIBS) + *wcl $(FLAGS) fontgfx.$(OBJ) $(16LIB) gfx.lib $(DOSLIBLIBS) -fm=fontgfx.mah + +inputest.exe: inputest.$(OBJ) $(16LIB) + *wcl $(FLAGS) inputest.$(OBJ) $(16LIB) -fm=inputest.mah + +#sountest.exe: sountest.$(OBJ) $(16LIB) +# *wcl $(FLAGS) sountest.$(OBJ) $(16LIB) + +pcxtest.exe: pcxtest.$(OBJ) gfx.lib + *wcl $(FLAGS) pcxtest.$(OBJ) gfx.lib -fm=pcxtest.mah + +vrstest.exe: vrstest.$(OBJ) gfx.lib $(16LIB) + *wcl $(FLAGS) vrstest.$(OBJ) gfx.lib $(16LIB) -fm=vrstest.mah + +palettec.exe: palettec.$(OBJ) gfx.lib #$(16LIB) + *wcl $(FLAGS) palettec.$(OBJ) gfx.lib -fm=palettec.mah #$(16LIB) + +palettel.exe: palettel.$(OBJ) gfx.lib #$(16LIB) + *wcl $(FLAGS) palettel.$(OBJ) gfx.lib -fm=palettel.mah #$(16LIB) + +pcxtest2.exe: pcxtest2.$(OBJ) gfx.lib + *wcl $(FLAGS) pcxtest2.$(OBJ) gfx.lib -fm=pcxtest2.mah + +##planrpcx.exe: planrpcx.$(OBJ) gfx.lib +## *wcl $(FLAGS) planrpcx.$(OBJ) gfx.lib -fm=planrpcx.mah + +maptest.exe: maptest.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) $(16LIB) gfx.lib + *wcl $(FLAGS) maptest.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) $(16LIB) gfx.lib -fm=maptest.mah + +fmemtest.exe: fmemtest.$(OBJ) $(16LIB) + *wcl $(FLAGS) fmemtest.$(OBJ) $(16LIB) -fm=fmemtest.mah + +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) + +vgmtest.exe: vgmtest.$(OBJ) vgmsnd.lib $(16LIB) + *wcl $(FLAGS) vgmtest.$(OBJ) vgmsnd.lib -fm=vgmtest.mah $(16LIB) + + +# +#executable's objects +# +16.$(OBJ): $(SRC)16.h $(SRC)16.c +bakapi.$(OBJ): $(SRC)bakapi.h $(SRC)bakapi.c +test.$(OBJ): $(SRC)test.c $(SRCLIB)modex16.h +#test2.$(OBJ): $(SRC)test2.c $(SRCLIB)modex16.h +test0.$(OBJ): $(SRC)test0.c +pcxtest.$(OBJ): $(SRC)pcxtest.c $(SRCLIB)modex16.h +vrstest.$(OBJ): $(SRC)vrstest.c $(SRCLIB)modex16.h +##planrpcx.$(OBJ): $(SRC)planrpcx.c $(SRCLIB)modex16.h +pcxtest2.$(OBJ): $(SRC)pcxtest2.c $(SRCLIB)modex16.h +palettec.$(OBJ): $(SRC)palettec.c +palettel.$(OBJ): $(SRC)palettel.c +maptest.$(OBJ): $(SRC)maptest.c $(SRCLIB)modex16.h +#emmtest.$(OBJ): $(SRC)emmtest.c +#emsdump.$(OBJ): $(SRC)emsdump.c +fmemtest.$(OBJ): $(SRC)fmemtest.c +fonttest.$(OBJ): $(SRC)fonttest.c +#fonttes0.$(OBJ): $(SRC)fonttes0.c +fontgfx.$(OBJ): $(SRC)fontgfx.c +inputest.$(OBJ): $(SRC)inputest.c +#sountest.$(OBJ): $(SRC)sountest.c +#miditest.$(OBJ): $(SRC)miditest.c +#testemm.$(OBJ): $(SRC)testemm.c +#testemm0.$(OBJ): $(SRC)testemm0.c +#tsthimem.$(OBJ): $(SRC)tsthimem.c +exmmtest.$(OBJ): $(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 + +# +#non executable objects libraries +# +#.C.LIB: +# *wlib -b $(WLIBQ) $[@ + +16.lib: $(16LIBOBJS)# doslib.lib vgmsnd.lib + *wlib -b $(WLIBQ) 16.lib $(16LIBOBJS)# doslib.lib vgmsnd.lib + +gfx.lib: $(GFXLIBOBJS) + *wlib -b $(WLIBQ) gfx.lib $(GFXLIBOBJS) + +vgmsnd.lib: $(VGMSNDOBJ) + *wlib -b $(WLIBQ) vgmsnd.lib $(VGMSNDOBJ) + +# extdep: +# !include $(DOSLIBDIR)$(DIRSEP)extdep.mak + +# library deps 16-bit huge +$(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)cpu$(DIRSEP)dos86h$(DIRSEP)cpu.lib: + cd $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)cpu && .$(DIRSEP)make.sh +$(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)dos$(DIRSEP)dos86h$(DIRSEP)dos.lib: + cd $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)dos && .$(DIRSEP)make.sh +$(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)vga$(DIRSEP)dos86h$(DIRSEP)vgatty.lib: + cd $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)vga && .$(DIRSEP)make.sh +$(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)vga$(DIRSEP)dos86h$(DIRSEP)vga.lib: + cd $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)vga && .$(DIRSEP)make.sh +$(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)8250$(DIRSEP)dos86h$(DIRSEP)8250.lib: + cd $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)8250 && .$(DIRSEP)make.sh + +joytest.exe: + cd $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)joystick && .$(DIRSEP)make.sh && $(COPYCOMMAND) dos86h$(DIRSEP)test.exe $(PDIR)$(PDIR)$(PDIR)$(PDIR)$(PDIR)joytest.exe +#$(DOSLIBLIBS): .symbolic +# @cd $(DOSLIB) +# @.$(DIRSEP)buildall.sh +# @cd $(PDIR)$(PDIR)$(PDIR) + +modex16.$(OBJ): $(SRCLIB)modex16.h $(SRCLIB)modex16.c + #*wcl $(FLAGS) -c $(SRCLIB)modex16.c + +bakapee.$(OBJ): $(SRCLIB)bakapee.h $(SRCLIB)bakapee.c + #*wcl $(FLAGS) -c $(SRCLIB)bakapee.c + +16render.$(OBJ): $(SRCLIB)16render.h $(SRCLIB)16render.c + #*wcl $(FLAGS) -c $(MODEXLIB)16render.c + +##16planar.$(OBJ): $(MODEXLIB)16planar.h $(MODEXLIB)16planar.c +## *wcl $(FLAGS) -c $(MODEXLIB)16planar.c + +16_vrs.$(OBJ): $(SRCLIB)16_vrs.h $(SRCLIB)16_vrs.c $(DOSLIBLIBS) + #*wcl $(FLAGS) -c $(SRCLIB)16_vrs.c $(DOSLIBLIBS) +16_sprit.$(OBJ): $(SRCLIB)16_sprit.h $(SRCLIB)16_sprit.c + #*wcl $(FLAGS) -c $(SRCLIB)16_sprit.c + + +bitmap.$(OBJ): $(SRCLIB)bitmap.h $(SRCLIB)bitmap.c + #*wcl $(FLAGS) -c $(SRCLIB)bitmap.c + +##planar.$(OBJ): $(SRCLIB)planar.h $(SRCLIB)planar.c +## *wcl $(FLAGS) -c $(SRCLIB)planar.c + +scroll16.$(OBJ): $(SRCLIB)scroll16.h $(SRCLIB)scroll16.c + #*wcl $(FLAGS) -c $(SRCLIB)scroll16.c + +16text.$(OBJ): $(SRCLIB)16text.c + #*wcl $(FLAGS) -c $(SRCLIB)16text.c + +mapread.$(OBJ): $(SRCLIB)mapread.h $(SRCLIB)mapread.c + #*wcl $(FLAGS) -c $(SRCLIB)mapread.c + +16_timer.$(OBJ): $(SRCLIB)16_timer.h $(SRCLIB)16_timer.c + #*wcl $(FLAGS) -c $(SRCLIB)16_timer.c + +16_in.$(OBJ): $(SRCLIB)16_in.h $(SRCLIB)16_in.c + #*wcl $(FLAGS) -c $(SRCLIB)16_in.c + +16_mm.$(OBJ): $(SRCLIB)16_mm.h $(SRCLIB)16_mm.c + #*wcl $(FLAGS) -c $(SRCLIB)16_mm.c + +16_ca.$(OBJ): $(SRCLIB)16_ca.h $(SRCLIB)16_ca.c + #*wcl $(FLAGS) -c $(SRCLIB)16_ca.c + +16_dbg.$(OBJ): $(SRCLIB)16_dbg.h $(SRCLIB)16_dbg.c + #*wcl $(FLAGS) -c $(SRCLIB)16_dbg.c + +midi.$(OBJ): $(SRCLIB)midi.h $(SRCLIB)midi.c + #*wcl $(FLAGS) -c $(SRCLIB)midi.c + +16_head.$(OBJ): $(SRCLIB)16_head.h $(SRCLIB)16_head.c + #*wcl $(FLAGS) -c $(SRCLIB)16_head.c + +16_hc.$(OBJ): $(SRCLIB)16_hc.h $(SRCLIB)16_hc.c + #*wcl $(FLAGS) -c $(SRCLIB)16_hc.c + +16_snd.$(OBJ): $(SRCLIB)16_snd.h $(SRCLIB)16_snd.c + #*wcl $(FLAGS) -c $(SRCLIB)16_snd.c + +jsmn.$(OBJ): $(JSMNLIB)jsmn.h $(JSMNLIB)jsmn.c + #*wcl $(FLAGS) -c $(JSMNLIB)jsmn.c +kitten.$(OBJ): $(NYANLIB)kitten.h $(NYANLIB)kitten.c + #*wcl $(FLAGS) -c $(NYANLIB)kitten.c +vgmSnd.$(OBJ): $(VGMSNDLIB)vgmSnd.h $(VGMSNDLIB)vgmSnd.c + #*wcl $(FLAGS) -c $(VGMSNDLIB)vgmSnd.c +wcpu.$(OBJ): $(WCPULIB)wcpu.h $(WCPULIB)wcpu.c + #*wcl $(FLAGS) -c $(WCPULIB)wcpu.c + +#memory.$(OBJ): $(EXMMLIB)memory.h $(EXMMLIB)memory.c +# *wcl $(FLAGS) $(MFLAGS) -c $(EXMMLIB)memory.c + +c_utils.$(OBJ): $(MODEXLIB_)c_utils.asm + *wcl -c $(AFLAGS) $(MODEXLIB_)c_utils.asm +modex.$(OBJ): $(MODEXLIB_)modex.asm + *wcl -c $(AFLAGS) $(MODEXLIB_)modex.asm + +# +#other~ +# +clean: .symbolic + @$(REMOVECOMMAND) $(EXEC) + @$(REMOVECOMMAND) *.$(OBJ) +!ifdef __LINUX__ + @rm *.LIB +!endif + @$(REMOVECOMMAND) 16.lib + @$(REMOVECOMMAND) gfx.lib + @$(REMOVECOMMAND) vgmsnd.lib + @*wlib -n $(WLIBQ) 16.lib + @*wlib -n $(WLIBQ) gfx.lib + @*wlib -n $(WLIBQ) vgmsnd.lib + @$(REMOVECOMMAND) *.16W + @$(REMOVECOMMAND) *.16B + @$(REMOVECOMMAND) *.OBJ + @$(REMOVECOMMAND) *.o + @$(REMOVECOMMAND) *.BCO + #@$(REMOVECOMMAND) makefi~1 + #@$(REMOVECOMMAND) makefile~ + @$(REMOVECOMMAND) __wcl__.LNK +# @$(REMOVECOMMAND) *.smp + @$(REMOVECOMMAND) *.SMP + @$(REMOVECOMMAND) *.hed + @$(REMOVECOMMAND) *.MAH + @$(REMOVECOMMAND) *.mah + @$(REMOVECOMMAND) *.err + @echo $(OBJ) + #@cd $(DOSLIB) + #@./buildall.sh clean + #@cd $(PDIR)$(PDIR)$(PDIR) +# @$(COPYCOMMAND) $(SRC)exmmtest.c $(EXMMTESTDIR)$(SRC) +# @$(COPYCOMMAND) $(SRCLIB)16_mm.* $(EXMMTESTDIR)$(SRCLIB) +# @$(COPYCOMMAND) $(SRCLIB)16_head.* $(EXMMTESTDIR)$(SRCLIB) +# @$(COPYCOMMAND) $(SRCLIB)16_ca.* $(EXMMTESTDIR)$(SRCLIB) +# @$(COPYCOMMAND) $(SRCLIB)16_hc.* $(EXMMTESTDIR)$(SRCLIB) +# @$(COPYCOMMAND) $(SRCLIB)types.h $(EXMMTESTDIR)$(SRCLIB) +# @$(COPYCOMMAND) $(NYANLIB)* $(EXMMTESTDIR)$(NYANLIB) +# @echo $(watcom) +# @echo $(INCLUDE) + +backupconfig: .symbolic + @$(COPYCOMMAND) .git$(DIRSEP)config git_con.fig + @$(COPYCOMMAND) .gitmodules git_modu.les + @$(COPYCOMMAND) .gitignore git_igno.re + +comp: .symbolic + @*upx -9 $(EXEC) + +comq: .symbolic + @*upx -9 $(UPXQ) $(EXEC) + +www: .symbolic + @ssh -p 26 sparky4@4ch.mooo.com 'rm -f /var/www/16/*exe*' + #@rm -f /var/www/$(EXEC)* + @rm -f /var/www/*.exe.zip* + #@cp ./$(EXEC) $(DIRSEP)var$(DIRSEP)www$(DIRSEP) + @./src/util/z.sh $(EXEC) $(EXEC) + @scp -r -P 26 *.exe 4ch.mooo.com:/var/www/16/ + @scp -r -P 26 x4get.bat 4ch.mooo.com:/var/www/16/ + @scp -r -P 26 /var/www/*.exe.zip.* 4ch.mooo.com:/var/www/16/ + +getwww: .symbolic + *x4get.bat $(EXEC) + +vomitchan: .symbolic + @$(DUMP) *.err + +## +## External library management~ ^^ +## +#git submodule add +mkdl: .symbolic + @cd $(DOSLIB) + @./buildall.sh + @cd $(PDIR)$(PDIR)$(PDIR) + +uplibs: .symbolic + @cd $(JSMNLIB) + @git pull + @cd $(PDIR)$(PDIR)$(PDIR) + @cd $(DOSLIB) + @git pull + @cd $(PDIR)$(PDIR)$(PDIR) + +reinitlibs: .symbolic + @rm -rf $(SRCLIB)doslib + @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 $(PDIR)$(PDIR) + @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) + @cp $(SRCLIB)doslib/make-lowercase . + +## +## experimental libs +## +xlib: .symbolic + @cd 16$(DIRSEP)xlib + @wmake -h clean + @wmake -h all + @cd $(PDIR)$(PDIR) + +mx: .symbolic + @cd 16$(DIRSEP)xw +# @wmake clean + @wmake -h all + @cd $(PDIR)$(PDIR) + +mx_: .symbolic + @cd 16$(DIRSEP)xw_ + @wmake -h -f makefile all + @cd $(PDIR)$(PDIR) + +vrs: .symbolic + @cd $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)vga + #@make clean + @make all + @mv pcx2vrl ../../../../../ + @mv pcxsscut ../../../../../ + @mv vrl2vrs ../../../../../ + @mv vrsdump ../../../../../ + @cd ../../../../../ -- 2.39.5