X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=makefile;h=2a735ead81b19c4ad88b52f9af9bd43a493903e4;hb=482dcb216b9068878dbfcf8265d9b7fd2cdc82a2;hp=4e2ed1fccd6e87a059d319fc9976a5aae89d7be3;hpb=0f1f17dc05c1f9530651580fc5c23b121b8969ab;p=16.git diff --git a/makefile b/makefile index 4e2ed1fc..2a735ead 100755 --- a/makefile +++ b/makefile @@ -1,3 +1,34 @@ +# +# 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 + +#%.C +#192x144 +#wwww will add these !ifdef __LINUX__ REMOVECOMMAND=rm -f COPYCOMMAND=cp -f @@ -15,9 +46,6 @@ OBJ=obj #!endif TARGET_OS = dos -#-zk0u = translate kanji to unicode... wwww -#-zk0 = kanji support~ -#-zkl = current codepage #EXMMTESTDIR=16$(DIRSEP)exmmtest$(DIRSEP) SRC=src$(DIRSEP) @@ -25,28 +53,32 @@ 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) WCPULIB=$(SRCLIB)wcpu$(DIRSEP) +AFLAGS=-mh -0 -d1 16FLAGS=-fh=16.hed BAKAPIFLAGS=-fh=bakapi.hed -SFLAGS=-sg -st -of+ -zu -zdf -zff -zgf -k56000#60000#32768 +SFLAGS=-sg -st -of+ -zu -zdf -zff -zgf -k55808#60000#32768 DFLAGS=-DTARGET_MSDOS=16 -DMSDOS=1 $(SFLAGS) -ZFLAGS=-zk0 -zq -zc -zp8# -zm -CFLAGS=$(IFLAGS) -mh -lr -l=dos -wo# -d2##wwww -OFLAGS=-obmiler -out -oh -ei -zp8 -0 -fpi87 -onac -ol+ -ok####x +ZFLAGS=-zk0 -zc -zp8# -zq ## -zm +CFLAGS=$(AFLAGS) $(IFLAGS)-lr -l=dos -wo##wwww +OFLAGS=-obmiler -out -oh -ei -zp8 -fpi87 -onac -ol+ -ok####x FLAGS=$(CFLAGS) $(OFLAGS) $(DFLAGS) $(ZFLAGS) + DOSLIBEXMMOBJ = himemsys.$(OBJ) emm.$(OBJ) 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) kitten.$(OBJ) 16_hc.$(OBJ) timer.$(OBJ) # #3812intf.$(OBJ) -GFXLIBOBJS = modex16.$(OBJ) bitmap.$(OBJ) planar.$(OBJ) 16text.$(OBJ) bakapee.$(OBJ) scroll16.$(OBJ) +GFXLIBOBJS = modex16.$(OBJ) bitmap.$(OBJ) planar.$(OBJ) 16text.$(OBJ) bakapee.$(OBJ) scroll16.$(OBJ) 16render.$(OBJ) 16planar.$(OBJ) -TESTEXEC = exmmtest.exe test.exe pcxtest.exe pcxtest2.exe test2.exe palettec.exe maptest.exe fmemtest.exe fonttest.exe fontgfx.exe scroll.exe vgmtest.exe inputest.exe +TESTEXEC = exmmtest.exe test.exe pcxtest.exe pcxtest2.exe test2.exe palettec.exe maptest.exe fmemtest.exe fonttest.exe fontgfx.exe scroll.exe vgmtest.exe inputest.exe palettel.exe planrpcx.exe # tsthimem.exe #testemm.exe testemm0.exe fonttes0.exe miditest.exe sega.exe sountest.exe EXEC = 16.exe bakapi.exe $(TESTEXEC) tesuto.exe @@ -59,8 +91,8 @@ all: $(EXEC) 16.exe: 16.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) $(16LIBOBJS) gfx.lib wcl $(FLAGS) $(16FLAGS) 16.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) $(16LIBOBJS) gfx.lib -fm=16.map -bakapi.exe: bakapi.$(OBJ) $(16LIBOBJS) gfx.lib - wcl $(FLAGS) $(BAKAPIFLAGS) bakapi.$(OBJ) $(16LIBOBJS) gfx.lib -fm=bakapi.map +bakapi.exe: bakapi.$(OBJ) $(16LIBOBJS) gfx.lib modex.lib + wcl $(FLAGS) $(BAKAPIFLAGS) bakapi.$(OBJ) $(16LIBOBJS) gfx.lib modex.lib -fm=bakapi.map # #Test Executables! # @@ -79,8 +111,8 @@ tesuto.$(OBJ): $(SRC)tesuto.c #sega.$(OBJ): $(SRC)sega.c # wcl $(FLAGS) -c $(SRC)sega.c -test.exe: test.$(OBJ) gfx.lib - wcl $(FLAGS) test.$(OBJ) gfx.lib -fm=test.map +test.exe: test.$(OBJ) gfx.lib 16_in.$(OBJ) 16_head.$(OBJ) + wcl $(FLAGS) test.$(OBJ) gfx.lib 16_in.$(OBJ) 16_head.$(OBJ) -fm=test.map test2.exe: test2.$(OBJ) gfx.lib wcl $(FLAGS) test2.$(OBJ) gfx.lib -fm=test2.map @@ -118,9 +150,15 @@ pcxtest.exe: pcxtest.$(OBJ) gfx.lib palettec.exe: palettec.$(OBJ) $(16LIBOBJS) gfx.lib wcl $(FLAGS) palettec.$(OBJ) $(16LIBOBJS) gfx.lib -fm=palettec.map +palettel.exe: palettel.$(OBJ) $(16LIBOBJS) gfx.lib + wcl $(FLAGS) palettel.$(OBJ) $(16LIBOBJS) gfx.lib -fm=palettel.map + pcxtest2.exe: pcxtest2.$(OBJ) gfx.lib wcl $(FLAGS) pcxtest2.$(OBJ) gfx.lib -fm=pcxtest2.map +planrpcx.exe: planrpcx.$(OBJ) gfx.lib + wcl $(FLAGS) planrpcx.$(OBJ) gfx.lib -fm=planrpcx.map + maptest.exe: maptest.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) $(16LIBOBJS) gfx.lib wcl $(FLAGS) maptest.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) $(16LIBOBJS) gfx.lib -fm=maptest.map @@ -162,12 +200,18 @@ test2.$(OBJ): $(SRC)test2.c $(SRCLIB)modex16.h pcxtest.$(OBJ): $(SRC)pcxtest.c $(SRCLIB)modex16.h wcl $(FLAGS) -c $(SRC)pcxtest.c +planrpcx.$(OBJ): $(SRC)planrpcx.c $(SRCLIB)modex16.h + wcl $(FLAGS) -c $(SRC)planrpcx.c + pcxtest2.$(OBJ): $(SRC)pcxtest2.c $(SRCLIB)modex16.h wcl $(FLAGS) -c $(SRC)pcxtest2.c palettec.$(OBJ): $(SRC)palettec.c wcl $(FLAGS) -c $(SRC)palettec.c +palettel.$(OBJ): $(SRC)palettel.c + wcl $(FLAGS) -c $(SRC)palettel.c + maptest.$(OBJ): $(SRC)maptest.c $(SRCLIB)modex16.h wcl $(FLAGS) -c $(SRC)maptest.c @@ -238,6 +282,12 @@ modex16.$(OBJ): $(SRCLIB)modex16.h $(SRCLIB)modex16.c bakapee.$(OBJ): $(SRCLIB)bakapee.h $(SRCLIB)bakapee.c wcl $(FLAGS) -c $(SRCLIB)bakapee.c +16render.$(OBJ): $(MODEXLIB)16render.h $(MODEXLIB)16render.c + wcl $(FLAGS) -c $(MODEXLIB)16render.c + +16planar.$(OBJ): $(MODEXLIB)16planar.h $(MODEXLIB)16planar.c + wcl $(FLAGS) -c $(MODEXLIB)16planar.c + bitmap.$(OBJ): $(SRCLIB)bitmap.h $(SRCLIB)bitmap.c wcl $(FLAGS) -c $(SRCLIB)bitmap.c @@ -326,13 +376,21 @@ vgmSnd.$(OBJ): $(VGMSNDLIB)vgmSnd.h $(VGMSNDLIB)vgmSnd.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) - @$(REMOVECOMMAND) *.lib + @$(REMOVECOMMAND) 16.lib + @$(REMOVECOMMAND) gfx.lib + @$(REMOVECOMMAND) doslib.lib + @$(REMOVECOMMAND) vgmsnd.lib @wlib -n 16.lib @wlib -n gfx.lib @wlib -n doslib.lib @@ -364,9 +422,36 @@ clean: .symbolic # @echo $(INCLUDE) comp: .symbolic - upx -9 $(EXEC) + @upx -9 $(EXEC) +## @upx -9 -qqq x-demo.exe + +#git submodule add +uplibs: .symbolic + @wmake updatelibs updatelibs: .symbolic - cd $(JSMNLIB) - git pull - cd ../../../ + @cd $(JSMNLIB) + @git pull + @cd ../../../ + @cd $(DOSLIB) + @git pull + @./buildall.sh + @cd ../../../ + +xlib: .symbolic + @cd 16/xlib + @wmake clean + @wmake all + @cd ../../ + +mx: .symbolic + @cd 16/xw +# @wmake clean + @wmake all + @cd ../../ + +mx_: .symbolic + @cd 16/xw_ + @wmake -f makefile all + @cd ../../ +