#
# Makefile to make computer modern RICOH fonts
#
FONTS = cmb cmbsy cmbx cmbxsl cmbxti \
	cmdunh cmex cmff cmfib cminch \
	cmitt cmmi cmmib cmr \
	cmsa cmsltt cmss cmssbx cmssdc \
	cmssi cmssq cmssqi cmsl cmsy \
	cmtcsc cmtex cmti cmtt cmu cmvtt

VERSION = 1.0

LP = RicohFourZeroEightZero


all: $(FONTS)

clean:
	rm -rf *.*gf *.*pk $(FONTS)

.SUFFIXES: .mf .300gf .329gf .360gf .432gf .518gf .622gf .746gf .896gf \
            .1075gf .1290gf .300pk .329pk .360pk .432pk .518pk \
            .622pk .746pk .896pk .1075pk .1290pk

.mf.300gf:
	cmmf '\mode:=$(LP); input $*'

.mf.329gf:
	cmmf '\mode:=$(LP); mag=magstep(0.5); input $*'

.mf.360gf:
	cmmf '\mode:=$(LP); mag=magstep(1); input $*'

.mf.432gf:
	cmmf '\mode:=$(LP); mag=magstep(2); input $*'

.mf.518gf:
	cmmf '\mode:=$(LP); mag=magstep(3); input $*'

.mf.622gf:
	cmmf '\mode:=$(LP); mag=magstep(4); input $*'

.mf.746gf:
	cmmf '\mode:=$(LP); mag=magstep(5); input $*'

.mf.896gf:
	cmmf '\mode:=$(LP); mag=magstep(6); input $*'

.mf.1075gf:
	cmmf '\mode:=$(LP); mag=magstep(7); input $*'

.mf.1290gf:
	cmmf '\mode:=$(LP); mag=magstep(8); input $*'

.mf.300pk:
	cmmf '\mode:=$(LP); input $*'
	gftopk $*.300gf

.mf.329pk:
	cmmf '\mode:=$(LP); mag=magstep(0.5); input $*'
	gftopk $*.329gf

.mf.360pk:
	cmmf '\mode:=$(LP); mag=magstep(1); input $*'
	gftopk $*.360gf

.mf.432pk:
	cmmf '\mode:=$(LP); mag=magstep(2); input $*'
	gftopk $*.432gf

.mf.518pk:
	cmmf '\mode:=$(LP); mag=magstep(3); input $*'
	gftopk $*.518gf

.mf.622pk:
	cmmf '\mode:=$(LP); mag=magstep(4); input $*'
	gftopk $*.622gf

.mf.746pk:
	cmmf '\mode:=$(LP); mag=magstep(5); input $*'
	gftopk $*.746gf

.mf.896pk:
	cmmf '\mode:=$(LP); mag=magstep(6); input $*'
	gftopk $*.896gf

.mf.1075pk:
	cmmf '\mode:=$(LP); mag=magstep(7); input $*'
	gftopk $*.1075gf

.mf.1290pk:
	cmmf '\mode:=$(LP); mag=magstep(8); input $*'
	gftopk $*.1290gf

.300gf.300pk:
	gftopk $*.300gf

.329gf.329pk:
	gftopk $*.329gf

.360gf.360pk:
	gftopk $*.360gf

.432gf.432pk:
	gftopk $*.432gf

.518gf.518pk:
	gftopk $*.518gf

.622gf.622pk:
	gftopk $*.622gf

.746gf.746pk:
	gftopk $*.746gf

.876gf.876pk:
	gftopk $*.876gf

.1075gf.1075pk:
	gftopk $*.1075gf

.1290gf.1290pk:
	gftopk $*.1290gf

# Non standard make file rules
# Computer modern bold
cmb: cmb10
	touch $@

cmb10: cmb10.300pk cmb10.329pk cmb10.360pk cmb10.432pk \
       cmb10.518pk cmb10.622pk cmb10.746pk

# Computer modern math symbols
cmbsy: cmbsy10 
	touch $@

cmbsy10: cmbsy10.300pk cmbsy10.329pk cmbsy10.360pk cmbsy10.432pk \
         cmbsy10.518pk cmbsy10.622pk cmbsy10.746pk

# Computer modern bold extended
cmbx: cmbx5 cmbx6 cmbx7 cmbx8 cmbx9 cmbx10 cmbx12
	touch $@

cmbx5: cmbx5.300pk cmbx5.329pk cmbx5.360pk cmbx5.432pk cmbx5.518pk \
       cmbx5.622pk cmbx5.746pk

cmbx6: cmbx6.300pk

cmbx7: cmbx7.300pk cmbx7.329pk cmbx7.360pk cmbx7.432pk cmbx7.518pk \
       cmbx7.622pk cmbx7.746pk

cmbx8: cmbx8.300pk

cmbx9: cmbx9.300pk

cmbx10: cmbx10.300pk cmbx10.329pk cmbx10.360pk cmbx10.432pk \
        cmbx10.518pk cmbx10.622pk cmbx10.746pk

cmbx12: cmbx12.300pk cmbx12.329pk cmbx12.360pk cmbx12.432pk \
        cmbx12.518pk cmbx12.622pk cmbx12.746pk

# Computer modern bold extended slanted roman
cmbxsl: cmbxsl10
	touch $@

cmbxsl10: cmbxsl10.300pk cmbxsl10.329pk cmbxsl10.360pk \
          cmbxsl10.432pk cmbxsl10.518pk cmbxsl10.622pk cmbxsl10.746pk

# Computer modern bold extended text italic
cmbxti: cmbxti10
	touch $@

cmbxti10: cmbxti10.300pk cmbxti10.329pk cmbxti10.360pk \
          cmbxti10.432pk cmbxti10.518pk cmbxti10.622pk cmbxti10.746pk

# Computer modern roman caps and small caps
cmcsc: cmcsc10
	touch $@

cmcsc10: cmcsc10.300pk cmcsc10.329pk cmcsc10.360pk cmcsc10.432pk \
         cmcsc10.518pk cmcsc10.622pk cmcsc10.746pk

# Computer modern dunhill
cmdunh: cmdunh10
	touch $@

cmdunh10: cmdunh10.300pk cmdunh10.329pk cmdunh10.360pk

# Computer modern math extension
cmex: cmex10
	touch $@

cmex10: cmex10.300pk cmex10.329pk cmex10.360pk cmex10.518pk

# Computer modern funny roman
cmff: cmff10
	touch $@

cmff10: cmff10.300pk cmff10.329pk cmff10.360pk

# Computer modern roman fibonacci
cmfib: cmfib8
	touch $@

cmfib8: cmfib8.300pk

# Computer modern inch high sans serif bold extended caps and digits
cminch: cminch.300pk
	touch $@

# Computer modern italic typewriter text
cmitt: cmitt10
	touch $@

cmitt10: cmitt10.300pk cmitt10.329pk cmitt10.360pk cmitt10.432pk \
         cmitt10.518pk cmitt10.622pk cmitt10.746pk

# Computer modern math italic
cmmi: cmmi5 cmmi6 cmmi7 cmmi8 cmmi9 cmmi10 cmmi12
	touch $@

cmmi5: cmmi5.300pk cmmi5.329pk cmmi5.360pk cmmi5.432pk \
       cmmi5.518pk cmmi5.622pk cmmi5.746pk

cmmi6: cmmi6.300pk

cmmi7: cmmi7.300pk cmmi7.329pk cmmi7.360pk cmmi7.432pk \
       cmmi7.518pk cmmi7.622pk cmmi7.746pk

cmmi8: cmmi8.300pk cmmi8.329pk cmmi8.360pk cmmi8.432pk cmmi8.518pk \
       cmmi8.622pk cmmi8.746pk cmmi8.896pk cmmi8.1075pk cmmi8.1290pk

cmmi9: cmmi9.300pk

cmmi10: cmmi10.300pk cmmi10.329pk cmmi10.360pk cmmi10.432pk \
        cmmi10.518pk cmmi10.622pk cmmi10.746pk

cmmi12: cmmi12.300pk cmmi12.329pk cmmi12.360pk cmmi12.432pk \
        cmmi12.518pk cmmi12.622pk cmmi12.746pk

# Computer modern math italic bold
cmmib: cmmib10
	touch $@

cmmib10: cmmib10.300pk cmmib10.329pk cmmib10.360pk cmmib10.432pk \
         cmmib10.518pk cmmib10.622pk cmmib10.746pk

# Computer modern roman
cmr: cmr5 cmr6 cmr7 cmr8 cmr9 cmr10 cmr12 cmr17
	touch $@

cmr5: cmr5.300pk cmr5.329pk cmr5.360pk cmr5.432pk \
      cmr5.518pk cmr5.622pk cmr5.746pk

cmr6: cmr6.300pk

cmr7: cmr7.300pk cmr7.329pk cmr7.360pk cmr7.432pk \
      cmr7.518pk cmr7.622pk cmr7.746pk

cmr8: cmr8.300pk

cmr9: cmr9.300pk

cmr10: cmr10.300pk cmr10.329pk cmr10.360pk cmr10.432pk cmr10.518pk \
       cmr10.622pk cmr10.746pk

cmr12: cmr12.300pk cmr12.329pk cmr12.360pk cmr12.432pk \
       cmr12.518pk cmr12.622pk cmr12.746pk

cmr17: cmr17.300pk cmr17.329pk cmr17.360pk cmr17.432pk cmr17.518pk \
       cmr17.622pk cmr17.746pk

# Computer modern sail extended ascii
cmsa: cmsa10
	touch $@

cmsa10: cmsa10.300pk cmsa10.329pk cmsa10.360pk

# Computer modern slanted typewriter text
cmsltt: cmsltt10
	touch $@

cmsltt10: cmsltt10.300pk cmsltt10.329pk cmsltt10.360pk cmsltt10.432pk \
          cmsltt10.518pk cmsltt10.622pk cmsltt10.746pk

# Computer modern sans serif
cmss: cmss8 cmss9 cmss10 cmss12 cmss17
	touch $@

cmss8: cmss8.300pk

cmss9: cmss9.300pk

cmss10: cmss10.300pk cmss10.329pk cmss10.360pk cmss10.432pk \
        cmss10.518pk cmss10.622pk cmss10.746pk

cmss12: cmss12.300pk cmss12.329pk cmss12.360pk cmss12.432pk \
        cmss12.518pk cmss12.622pk cmss12.746pk

cmss17: cmss17.300pk cmss17.360pk cmss17.432pk

# Computer modern sans serif bold extended
cmssbx: cmssbx10
	touch $@

cmssbx10: cmssbx10.300pk cmssbx10.329pk cmssbx10.360pk cmssbx10.432pk \
          cmssbx10.518pk cmssbx10.622pk cmssbx10.746pk

# Computer modern sans serif demibold condensed
cmssdc: cmssdc10
	touch $@

cmssdc10: cmssdc10.300pk cmssdc10.329pk cmssdc10.360pk cmssdc10.432pk \
          cmssdc10.518pk cmssdc10.622pk

# Computer modern slanted sans serif
cmssi: cmssi8 cmssi9 cmssi10 cmssi12 cmssi17
	touch $@

cmssi8: cmssi8.300pk

cmssi9: cmssi9.300pk

cmssi10: cmssi10.300pk cmssi10.329pk cmssi10.360pk cmssi10.432pk \
         cmssi10.518pk cmssi10.622pk cmssi10.746pk

cmssi12: cmssi12.300pk cmssi12.329pk cmssi12.360pk cmssi12.432pk \
         cmssi12.518pk cmssi12.622pk cmssi12.746pk

cmssi17: cmssi17.300pk cmssi17.360pk cmssi17.432pk

# Computer modern sans serif quotation style
cmssq: cmssq8
	touch $@

cmssq8: cmssq8.300pk

# Computer modern sans serif quotation style slanted
cmssqi: cmssqi8
	touch $@

cmssqi8: cmssqi8.300pk

# Computer modern slanted
cmsl: cmsl8 cmsl9 cmsl10 cmsl12
	touch cmsl

cmsl8: cmsl8.300pk cmsl8.329pk cmsl8.360pk cmsl8.432pk \
       cmsl8.518pk cmsl8.622pk cmsl8.746pk

cmsl9: cmsl9.300pk

cmsl10: cmsl10.300pk cmsl10.329pk cmsl10.360pk cmsl10.432pk \
        cmsl10.518pk cmsl10.622pk cmsl10.746pk

cmsl12: cmsl12.300pk cmsl12.329pk cmsl12.360pk cmsl12.432pk \
        cmsl12.518pk cmsl12.622pk cmsl12.746pk

# Computer modern math symbols
cmsy: cmsy5 cmsy6 cmsy7 cmsy8 cmsy9 cmsy10
	touch $@

cmsy5: cmsy5.300pk cmsy5.329pk cmsy5.360pk cmsy5.432pk \
       cmsy5.518pk cmsy5.622pk cmsy5.746pk

cmsy6: cmsy6.300pk

cmsy7: cmsy7.300pk cmsy7.329pk cmsy7.360pk cmsy7.432pk \
       cmsy7.518pk cmsy7.622pk cmsy7.746pk

cmsy8: cmsy8.300pk cmsy8.329pk cmsy8.360pk cmsy8.432pk \
       cmsy8.518pk cmsy8.622pk cmsy8.746pk cmsy8.896pk \
       cmsy8.1075pk cmsy8.1290pk

cmsy9: cmsy9.300pk

cmsy10: cmsy10.300pk cmsy10.329pk cmsy10.360pk cmsy10.432pk \
        cmsy10.518pk cmsy10.622pk cmsy10.746pk

# Computer modern typewrite caps and small caps
cmtcsc: cmtcsc10
	touch $@

cmtcsc10: cmtcsc10.300pk cmtcsc10.329pk cmtcsc10.360pk cmtcsc10.432pk \
          cmtcsc10.518pk cmtcsc10.622pk cmtcsc10.746pk

# Computer modern Tex extended ascii
cmtex: cmtex8 cmtex9 cmtex10
	touch $@

cmtex8: cmtex8.300pk

cmtex9: cmtex9.300pk

cmtex10: cmtex10.300pk cmtex10.329pk cmtex10.360pk

# Computer modern text italic
cmti: cmti7 cmti8 cmti9 cmti10 cmti12
	touch $@

cmti7: cmti7.300pk cmti7.329pk cmti7.360pk cmti7.432pk \
       cmti7.518pk cmti7.622pk cmti7.746pk

cmti8: cmti8.300pk

cmti9: cmti9.300pk

cmti10: cmti10.300pk cmti10.329pk cmti10.360pk cmti10.432pk \
        cmti10.518pk cmti10.622pk cmti10.746pk

cmti12: cmti12.300pk cmti12.329pk cmti12.360pk cmti12.432pk \
        cmti12.518pk cmti12.622pk cmti12.746pk

# Computer modern typewriter text
cmtt: cmtt8 cmtt9 cmtt10 cmtt12
	touch $@

cmtt8: cmtt8.300pk cmtt8.329pk cmtt8.360pk cmtt8.432pk \
       cmtt8.518pk cmtt8.622pk cmtt8.746pk cmtt8.896pk \
       cmtt8.1075pk cmtt8.1290pk
cmtt9: cmtt9.300pk

cmtt10: cmtt10.300pk cmtt10.329pk cmtt10.360pk cmtt10.432pk \
        cmtt10.518pk cmtt10.622pk cmtt10.746pk

cmtt12: cmtt12.300pk cmtt12.329pk cmtt12.360pk cmtt12.432pk \
        cmtt12.518pk cmtt12.622pk cmtt12.746pk

# Computer modern unslanted italic
cmu: cmu10
	touch $@

cmu10: cmu10.300pk cmu10.329pk cmu10.360pk cmu10.432pk \
       cmu10.518pk cmu10.622pk cmu10.746pk

# Computer modern variable width typewriter text
cmvtt: cmvtt10
	touch $@

cmvtt10: cmvtt10.300pk cmvtt10.329pk cmvtt10.360pk

# Computer modern lasy?
lasy: lasy5 lasy6 lasy7 lasy8 lasy9 lasy10

lasy5: lasy5.300pk lasy5.329pk lasy5.360pk lasy5.432pk \
       lasy5.518pk lasy5.622pk lasy5.746pk

lasy6: lasy6.300pk

lasy7: lasy7.300pk lasy7.329pk lasy7.360pk lasy7.432pk \
       lasy7.518pk lasy7.622pk lasy7.746pk

lasy8: lasy8.300pk lasy8.329pk lasy8.360pk lasy8.432pk \
       lasy8.518pk lasy8.622pk lasy8.746pk lasy8.896pk \
       lasy8.1075pk lasy8.1290pk
 
lasy9: lasy9.300pk

lasy10: lasy10.300pk lasy10.329pk lasy10.360pk lasy10.432pk \
        lasy10.518pk lasy10.622pk lasy10.746pk

# Computer modern bold lasy?
lasyb: lasyb10
	touch $@

lasyb10: lasyb10.300pk lasyb10.329pk lasyb10.360pk lasyb10.432pk \
         lasyb10.518pk lasyb10.622pk lasyb10.746pk

# figure fonts
figures: lcircle10 lcirclew10
	touch $@

lcircle10: lcircle10.300pk

lcirclew10: lcirclew10.300pk

line10: line10.300pk

linew10: linew10.300pk
