FONTS=bold200.bin norm200.bin bold500.bin norm500.bin 
SOURCE=master8b.txt master14b.txt master8n.txt master14n.txt Makefile
DOCS=README.txt

ZIPFILES=$(FONTS) $(SOURCE) $(DOCS)

#CC = gcc
#CFLAGS = -g -Wall

all:	$(FONTS) #fontdiff

zip: $(ZIPFILES)
	-rm fonts.zip
	zip fonts.zip $(ZIPFILES)

clean:
	rm $(FONTS) #fontdiff

%.psf: %.txt
	txt2psf $< $@

bold200.bin:	master14b.psf master8b.psf
	psfxform --codepage=PPCGREEK --height=16 master14b.psf | psf2raw > tmp0
	psfxform --codepage=PPCGREEK --height=16 master8b.psf  | psf2raw > tmp1
	psfxform --codepage=PPC865   --height=16 master14b.psf | psf2raw > tmp2
	psfxform --codepage=PPC865   --height=16 master8b.psf  | psf2raw > tmp3
	psfxform --codepage=PPC860   --height=16 master14b.psf | psf2raw > tmp4
	psfxform --codepage=PPC860   --height=16 master8b.psf  | psf2raw > tmp5
	psfxform --codepage=PPC437   --height=16 master14b.psf | psf2raw > tmp6
	psfxform --codepage=PPC437   --height=16 master8b.psf  | psf2raw > tmp7
	cat tmp0 tmp1 tmp2 tmp3 tmp4 tmp5 tmp6 tmp7 > $@
	rm tmp0 tmp1 tmp2 tmp3 tmp4 tmp5 tmp6 tmp7

norm200.bin:	master14n.psf master8n.psf
	psfxform --codepage=PPCGREEK --height=16 master14n.psf | psf2raw > tmp0
	psfxform --codepage=PPCGREEK --height=16 master8n.psf  | psf2raw > tmp1
	psfxform --codepage=PPC865   --height=16 master14n.psf | psf2raw > tmp2
	psfxform --codepage=PPC865   --height=16 master8n.psf  | psf2raw > tmp3
	psfxform --codepage=PPC860   --height=16 master14n.psf | psf2raw > tmp4
	psfxform --codepage=PPC860   --height=16 master8n.psf  | psf2raw > tmp5
	psfxform --codepage=PPC437   --height=16 master14n.psf | psf2raw > tmp6
	psfxform --codepage=PPC437   --height=16 master8n.psf  | psf2raw > tmp7
	cat tmp0 tmp1 tmp2 tmp3 tmp4 tmp5 tmp6 tmp7 > $@
	rm tmp0 tmp1 tmp2 tmp3 tmp4 tmp5 tmp6 tmp7

bold500.bin:	master8b.psf
	psfxform --codepage=PPCGREEK master8b.psf | psf2raw > tmp0
	psfxform --codepage=PPC865   master8b.psf | psf2raw > tmp1
	psfxform --codepage=PPC860   master8b.psf | psf2raw > tmp2
	psfxform --codepage=PPC437   master8b.psf | psf2raw > tmp3
	cat tmp0 tmp1 tmp2 tmp3 > $@
	rm tmp0 tmp1 tmp2 tmp3

norm500.bin:	master8n.psf
	psfxform --codepage=PPCGREEK master8n.psf | psf2raw > tmp0
	psfxform --codepage=PPC865   master8n.psf | psf2raw > tmp1
	psfxform --codepage=PPC860   master8n.psf | psf2raw > tmp2
	psfxform --codepage=PPC437   master8n.psf | psf2raw > tmp3
	cat tmp0 tmp1 tmp2 tmp3 > $@
	rm tmp0 tmp1 tmp2 tmp3



