%.sfd: sr-%.sfd orig/%.sfd merge
	@cp sr-$@ $@ && \
	./merge $@ 2>/dev/null

%.ttf: %.sfd
	@echo -n "Generating $@ ... "; \
	(./gen `echo $@ | sed 's+ttf$$+sfd+'` $@  2>/dev/null && echo "done") || echo "error"

%.pfb: %.sfd
	@echo -n "Generating $@ ... "; \
	(./gen `echo $@ | sed 's+pfb$$+sfd+'` $@  2>/dev/null && echo "done") || echo "error"

all: gothic bookman century nimbus palladio chancery

gothic: a010013l.ttf a010015l.ttf a010033l.ttf a010035l.ttf

bookman: b018012l.ttf b018015l.ttf b018032l.ttf b018035l.ttf

century: c059013l.ttf c059016l.ttf c059033l.ttf c059036l.ttf

nimbus-sans: n019003l.ttf n019004l.ttf n019023l.ttf n019024l.ttf

nimbus-sans-cond: n019043l.ttf n019044l.ttf n019063l.ttf n019064l.ttf

nimbus-roman: n021003l.ttf n021004l.ttf n021023l.ttf n021024l.ttf

nimbus-mono: n022003l.ttf n022004l.ttf n022023l.ttf n022024l.ttf

nimbus: nimbus-sans nimbus-sans-cond nimbus-roman nimbus-mono

palladio: p052003l.ttf p052004l.ttf p052023l.ttf p052024l.ttf

palladio-ps: p052003l.pfb p052004l.pfb p052023l.pfb p052024l.pfb

chancery: z003034l.ttf

psfonts: \
     a010013l.pfb a010015l.pfb a010033l.pfb a010035l.pfb \
     b018012l.pfb b018015l.pfb b018032l.pfb b018035l.pfb \
     c059013l.pfb c059016l.pfb c059033l.pfb c059036l.pfb \
     n019003l.pfb n019004l.pfb n019023l.pfb n019024l.pfb \
     n019043l.pfb n019044l.pfb n019063l.pfb n019064l.pfb \
     n021003l.pfb n021004l.pfb n021023l.pfb n021024l.pfb \
     n022003l.pfb n022004l.pfb n022023l.pfb n022024l.pfb \
     p052003l.pfb p052004l.pfb p052023l.pfb p052024l.pfb \
     z003034l.pfb

clean:
	rm -f *.ttf *.enc *.tfm *.afm *.pfm *.pfb *.sfd~
