36 lines
749 B
Makefile
36 lines
749 B
Makefile
FONTARTS := $(sort \
|
|
$(patsubst %.otf,%,\
|
|
$(patsubst %.woff,%,\
|
|
$(patsubst %.woff2,%,\
|
|
$(wildcard *.woff2 *.woff *.otf)\
|
|
))))
|
|
OTFS := $(patsubst %,%.otf,$(FONTARTS))
|
|
WOFFS := $(patsubst %,%.woff,$(FONTARTS))
|
|
WOFF2S := $(patsubst %,%.woff2,$(FONTARTS))
|
|
FONTS := $(OTFS) $(WOFFS) $(WOFF2S)
|
|
CACHES := $(patsubst %,%.fc,$(FONTS))
|
|
|
|
all: fonts caches
|
|
.PHONY: all
|
|
|
|
fonts: $(FONTS)
|
|
.PHONY: all
|
|
|
|
caches: $(CACHES)
|
|
.PHONY: all
|
|
|
|
%.woff: %.otf
|
|
sfnt2woff-zopfli "$<"
|
|
|
|
%.woff2: %.otf
|
|
woff2_compress "$<"
|
|
|
|
%.otf.fc: %.otf fc.format
|
|
> "$@" LANG=C LC_NUMERIC=C fc-scan --format "$$(cat fc.format)" "$<"
|
|
|
|
%.woff.fc: %.woff fc.format
|
|
> "$@" LANG=C LC_NUMERIC=C fc-scan --format "$$(cat fc.format)" "$<"
|
|
|
|
%.woff2.fc: %.woff.fc
|
|
cp "$<" "$@"
|