#
# $ProjectVersion: 0.108 $
#

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

PROGS=		booster.hex example.hex dcc2.hex generator.hex silver.hex \
		spifcard.fs

workingon:	generator.disasm
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 'include $< file-dump $@ map bye' | \
		sort -o ${<:fs=map}

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

.hex.asm:
	gpdasm $< > $@

.disasm.dump:
	less $<

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

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
