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

all: scrolly2.com

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

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

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

distclean: clean
	$(RM) scrolly2.com

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

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