AFLAGS=/m /w-LCO
LDFLAGS=/3

.asm.exe:
	$(AS) $(AFLAGS) $&.asm
	tlink $(LDFLAGS) $&.obj

all:	test.exe testx.exe emulator.exe

test.exe: test.asm dos.ash
	$(AS) $(AFLAGS) $&.asm
	tlink $(LDFLAGS) $&.obj
	lzexe $&.exe

testx.exe: testx.asm dos.ash
	$(AS) $(AFLAGS) $&.asm
	tlink $(LDFLAGS) $&.obj
	lzexe $&.exe

emulator.exe: emulator.asm emulator.ash

clean:
	deltree /Y test.old testx.old test.map testx.map
	deltree /Y test.obj testx.obj emulator.map emulator.obj

distclean:
	deltree /Y test.exe testx.exe emulator.exe test.old testx.old
	deltree /Y test.map testx.map emulator.map *.obj
