CPMDIR	= c:
CC	= c:\c\bin\cl -AC -Zi
ASM80	= c:\cpm80\z80 $(CPMDIR)m80
LINK80	= c:\cpm80\z80 $(CPMDIR)l80
CREF80	= c:\cpm80\z80 $(CPMDIR)cref80

.SUFFIXES:	.com .rel .mac

.mac.rel:
		$(ASM80) $*,$*=$* /c

.rel.com:
		$(LINK80) $*,$@ /e /n
		$(CREF80) $*.lst=$*
		- del $*.crf

zds:		boot\
		boot2\
		monitor\
		vgmoni

cpm:		bios\
		bdos\
		ccp\
		dpb	#DPB-Anzeige

boot:		boot.sec
boot2:		boot2.sec
monitor:	monitor.rom
vgmoni:		vgmoni.rom
bios:		bios.lod
ccp:		ccp.lod
bdos:		bdos.lod
load:		load.com
dpb:		dpb.com

boot.sec:	boot.rel\
		makefile
		$(LINK80) $*,$@ /e /n
		$(CREF80) $*.lst=$*
		- del $*.crf

boot.rel:	boot.mac\
		zds.mac
		$(ASM80) $*,$*=$* /c

boot2.sec:	boot2.rel\
		makefile
		$(LINK80) $*,$@ /e /n
		$(CREF80) $*.lst=$*
		- del $*.crf

boot2.rel:	boot2.mac\
		zds.mac
		$(ASM80) $*,$*=$* /c

monitor.rom:	monitor.rel\
		makefile
		$(LINK80) $*,$@ /e /n
		$(CREF80) $*.lst=$*
		- del $*.crf

monitor.rel:	monitor.mac\
		zds.mac
		$(ASM80) $*,$*=$* /c

vgmoni.rom:	vgmoni.rel\
		makefile
		$(LINK80) $*,$@ /e /n
		$(CREF80) $*.lst=$*
		- del $*.crf

vgmoni.rel:	monitor.mac\
		vgmoni.mac\
		zds.mac
		$(ASM80) $@,$*.lst=$* /c

bios.lod:	bios.rel\
		makefile
		$(LINK80) $*,$@ /e /n
		$(CREF80) $*.lst=$*
		- del $*.crf

bios.rel:	bios.mac
		$(ASM80) $*,$*=$* /c

ccp.lod:	ccp.rel\
		makefile
		$(LINK80) $*,$@ /e /n
		$(CREF80) $*.lst=$*
		- del $*.crf

ccp.rel:	ccp.mac
		$(ASM80) $*,$*=$* /c

bdos.lod:	bdos.rel\
		makefile
		$(LINK80) $*,$@ /e /n
		$(CREF80) $*.lst=$*
		- del $*.crf

bdos.rel:	bdos.mac
		$(ASM80) $*,$*=$* /c

readdump:	readdump.c
		$(CC) readdump.c

load.com:	load.rel\
		makefile
		$(LINK80) $*,$@ /e /n
		$(CREF80) $*.lst=$*
		- del $*.crf

load.rel:	load.mac\
		zds.mac
		$(ASM80) $*,$*=$* /c

