# Makefile for the Utopia fonts.

version = 1.0

AFM2TFM = afm2tfm
VPTOVF = vptovf

.PRECIOUS: %.vpl

tfm_files = putr.tfm putri.tfm putb.tfm putbi.tfm putrc.tfm

all: $(tfm_files)

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

putrc.vpl:
	$(AFM2TFM) putr -V putrc.vpl rputr

# 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 *.pfa
distdir = utopia-$(version)
dist:
	rm -rf $(distdir)
	mkdir $(distdir)
	ln $(dist_files) $(distdir)
	tar czf $(distdir). $(distdir)
	rm -rf $(distdir)