# Makefile for the Charter fonts.

version = 1.0

AFM2TFM = afm2tfm
VPTOVF = vptovf

.PRECIOUS: %.vpl

tfm_files = bchr.tfm bchri.tfm bchb.tfm bchbi.tfm bchrc.tfm

all: $(tfm_files)
# Make the raw TFM file as well as the VPL file.
%.vpl: %.afm
	$(AFM2TFM) $< -v $@ r$*

bchrc.vpl:
	$(AFM2TFM) bchr -V bchrc.vpl rbchr

# Make the VF file as well as the TFM file.
%.tfm: %.vpl
	$(VPTOVF) $< $*.vf $@

distclean clean mostlyclean:
	rm -f *.dvi *.log *.vpl *.ps

realclean: distclean
	rm -f *.vf *.tfm

dist_files = ChangeLog Makefile README psfonts.add *.tfm *.vf *.afm *.pfb
distdir = charter-$(version)
dist: all
	rm -rf $(distdir)
	mkdir $(distdir)
	ln $(dist_files) $(distdir)
	tar czf $(distdir). $(distdir)
	rm -rf $(distdir)