#
# $ProjectVersion: 0.80 $
#

COMPILER=	picforth.fs
LIBRARIES=	picisr.fs libfetch.fs libstore.fs picflash.fs piceeprom.fs

PROGS=		booster.hex example.hex dcc2.hex generator.hex

workingon:	generator.asm
all:	${PROGS}
.PHONY:	all

.SUFFIXES: .fs .hex .asm .disasm .dump

interactive:
	gforth picforth.fs -e 'host picquit'

.fs.hex: ${COMPILER} ${LIBRARIES}
	gforth picforth.fs $< -e 'file-dump $@ map bye' | sort -o ${<:fs=map}

.fs.disasm: ${COMPILER} ${LIBRARIES}
	gforth picforth.fs $< -e 'dis bye' > $@

.hex.asm:
	gpdasm $< > $@

.disasm.dump:
	less $<

# $Format: "RELEASEVERSION = $ReleaseVersion$"$
RELEASEVERSION = 0.6

release:
	prcs rekey
	$(MAKE) release2

release2:
	mkdir picforth-${RELEASEVERSION}
	install -m 644 `cat MANIFEST` picforth-${RELEASEVERSION}
	tar zcvf picforth-${RELEASEVERSION}.tar.gz picforth-${RELEASEVERSION}
	rm -rf picforth-${RELEASEVERSION}
	chmod a+r picforth-${RELEASEVERSION}.tar.gz
