PNGS = $(shell ./countchars.sh characters.png "pngs/%03.0f.png") NARROWSVGS = $(shell ./countchars.sh characters.png "narrow-svgs/%03.0f.svg") WIDESVGS = $(shell ./countchars.sh characters.png "wide-svgs/%03.0f.svg") all: msx-screen0.woff pngs: mkdir -p pngs $(PNGS): characters.png | pngs gm convert -crop 8x8 characters.png +adjoin pngs/%03d.png narrow-svgs: mkdir -p narrow-svgs wide-svgs: mkdir -p wide-svgs $(NARROWSVGS): narrow-svgs/%.svg: pngs/%.png | narrow-svgs ./createsvg.sh "$<" "$@" 6 8 $(WIDESVGS): wide-svgs/%.svg: pngs/%.png | wide-svgs ./createsvg.sh "$<" "$@" 8 8 svgs: $(NARROWSVGS) $(WIDESVGS) unicode2msx.txt: msx2utf8.py ./msx2utf8.py -l | awk '{ print $$2" "$$1 }' > unicode2msx.txt msx-screen0.sfd msx-screen0.woff: $(NARROWSVGS) unicode2msx.txt importchars.py fontforge -script importchars.py \ --output-sfd msx-screen0.sfd \ --output-woff msx-screen0.woff \ --fullname 'MSX-Screen0' \ unicode2msx.txt narrow-svgs msx-screen0.sfd msx-screen0.woff: $(NARROWSVGS) unicode2msx.txt importchars.py fontforge -script importchars.py \ --output-sfd msx-screen0.sfd \ --output-woff msx-screen0.woff \ --fullname 'MSX-Screen0' \ unicode2msx.txt narrow-svgs MSX-Screen0.woff: msx-screen0.sfd MSX-Screen0.ttf: msx-screen0.sfd MSX-Screen1.woff: msx-screen1.sfd MSX-Screen1.ttf: msx-screen1.sfd .PHONY: clean clean: rm -rf narrow-svgs wide-svgs pngs