diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 000000000000..1f349248fd8d --- /dev/null +++ b/Makefile @@ -0,0 +1,33 @@ +SFD := $(wildcard *.sfd) +BDF := + +all: + +define add-bdf-font +_bdfo := $$(patsubst %.sfd,%-$$(shell fontforge -quiet -c 'print(open("$1").bitmapSizes[0])').bdf,$1) + +BDF += $$(_bdfo) +$$(_bdfo): $1 + fontforge -quiet -c 'open("$1").generate("$(1:.sfd=.bdf)", bitmap_type="bdf")' + +undefine _bdfo +endef + +$(foreach S,$(SFD),$(eval $(call add-bdf-font,$S))) + +OTB := $(patsubst %.bdf,%.otb,$(BDF)) +PCF := $(patsubst %.bdf,%.pcf,$(BDF)) +PCFGZ := $(patsubst %,%.gz,$(PCF)) + +all: $(BDF) $(OTB) $(PCFGZ) +clean: + $(RM) $(BDF) $(OTB) $(PCF) $(PCFGZ) + +%.gz: % + gzip -9c $< > $@ + +%.pcf: %.bdf + bdftopcf -o $@ $< + +%.otb: %.bdf + fonttosfnt -o $@ -- $< |