# Makefile - Don Yang (uguu.org)
#
# 07/20/08

width1 = 170
height1 = `perl -e 'print int($(width1) * 0.5 * 1037.0 / 1794.0)'`
width2 = 160
height2 = `perl -e 'print int($(width2) * 0.5 * 854.0 / 1173.0)'`

all: kanata.txt konata.txt

kanata.txt: kanata.png Makefile
	perl anytotxt.pl $< $(width1) $(height1) | perl trim_space.pl > $@
	perl freq.pl $@

konata.txt: konata.png Makefile
	perl anytotxt.pl $< $(width2) $(height2) | perl trim_space.pl > $@
	perl freq.pl $@

clean:
	-rm -f kanata.txt konata.txt

backup:
	-rm -f backup.tar.gz
	tar cf backup.tar *.pl *.cdr Makefile
	gzip -9 backup.tar
