# Makefile - Don Yang (uguu.org)
#
# 09/17/08

width1 = 80
height1 = `perl -e 'print int($(width1) * 0.5 * 1133.0 / 1398.0)'`
width2 = 80
height2 = `perl -e 'print int($(width2) * 0.5 * 615.0 / 795.0)'`

all: akyuu.txt cirno.txt

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

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

clean:
	-rm -f akyuu.txt cirno.txt

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