-DOSLIBOBJ = adlib.$(OBJ) midi.$(OBJ) 8254.$(OBJ) 8259.$(OBJ) cpu.$(OBJ)
-16LIBOBJS = 16_in.$(OBJ) 16_mm.$(OBJ) wcpu.$(OBJ) 16_head.$(OBJ) scroll16.$(OBJ) 16_ca.$(OBJ) $(DOSLIBOBJ)
-GFXLIBOBJS = modex16.$(OBJ) bitmap.$(OBJ) planar.$(OBJ) 16text.$(OBJ)
+16FLAGS=-fh=16.hed
+BAKAPIFLAGS=-fh=bakapi.hed
+SFLAGS=-sg -st -of+ -zu -zdf -zff -zgf -k56000#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
+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)
+
+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
+# tsthimem.exe
+#testemm.exe testemm0.exe fonttes0.exe miditest.exe sega.exe sountest.exe
+EXEC = 16.exe bakapi.exe $(TESTEXEC) tesuto.exe