OCCAM=occam
LINK=E:\ITOOLS\TOOLS\ilink
CONFIG=iconf
ADDBOOT=iboot
OCCOPT=/e
LINKOPT=
CONFOPT=
BOOTOPT=

toptarget:	
		@ECHO make script for 32 bit and 16 bit Transputer Forth
		@ECHO make either forth16 or forth32

forth16:	boot16.btl forth.bin
		check | load /3 boot16.btl
		iserver /ss

boot16.btl:	boot16.pgm booter.t2u 
		$(CONFIG) boot16 /o boot16.btl $(CONFOPT)

booter.t2u:	booter.occ forthlib.inc
		$(OCCAM) booter /t2 /w /u /o booter.t2u $(OCCOPT)

forth32:	boot32.btl forth.bin
		iserver /sb boot32.btl

boot32.btl:	boot32.pgm booter.tau 
		$(CONFIG) boot32 /o boot32.btl $(CONFOPT)

booter.tau:	booter.occ forthlib.inc
		$(OCCAM) booter /ta /w /u /o booter.tau $(OCCOPT)

forth.bin:	builder.b4h
		@ECHO Guess load address, (4000) check at end of build. If different,
		@ECHO delete forth.bin, then reMAKE, putting in correct value.
		iserver /sb builder.b4h

builder.b4h:	builder.occ
	$(OCCAM) builder /t4 /h /o builder.t4h $(OCCOPT)
	$(LINK) /f builder.l4h /o builder.c4h $(LINKOPT)
	$(ADDBOOT) builder.c4h /o builder.b4h $(BOOTOPT)

