# makefile for scrolly NC
#
# This needs zmac, available from:
# - http://www.nenie.org/cpcip/index.html#zmac
# - ftp://ftp.ibiblio.org/pub/Linux/devel/lang/assemblers/

all: scrolly.com

# the 1Ah at EOF is to avoid problems when xmodemming across to the
# ROM OS.
#
scrolly.com: main.z 4x6font.dat sidebmp.pbm
	zmac main.z
	cat 4x6font.dat >>main.bin
	dd if=sidebmp.pbm bs=1 skip=10 >>main.bin 2>/dev/null
	printf '\x1a' >>main.bin
	mv main.bin scrolly.com

# assumes this source is in an `src' subdir
install: scrolly.com scrolly.bas
	cp scrolly.com scrolly.bas ..

clean:
	$(RM) *~ *.bin *.lst

distclean: clean
	$(RM) scrolly.com

tgz: ../scrollync-src.tar.gz

../scrollync-src.tar.gz: distclean
	cd ..;tar zcvf scrollync-src.tar.gz src
