marcille_width = 123
marcille_height = `perl -e 'print int($(marcille_width) * 0.48)'`
yokujishi_width = 106
yokujishi_height = `perl -e 'print int($(yokujishi_width) * 0.5)'`

target = marcille.txt

all: $(target)

marcille.txt: marcille.png Makefile
	perl anytotxt.pl $< $(marcille_width) $(marcille_height) | perl trim_space.pl > $@
	perl freq.pl $@

yokujishi.txt: yokujishi.png Makefile
	perl anytotxt.pl $< $(yokujishi_width) $(yokujishi_height) | perl trim_space.pl > $@
	perl freq.pl $@


clean:
	-rm -f $(target)

backup:
	-rm -f backup.tar.gz
	tar czf backup.tar.gz *.pl *.svg *.txt Makefile
