-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
22 lines (18 loc) · 837 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
SVG_FILES = $(shell find ./ -type f -name '*.svg')
HTML_FILES = $(shell find ./ -type f -name '*.html')
TTF_FILES = $(shell find ./ -type f -name '*.ttf')
WOFF_FILES = $(shell find ./ -type f -name '*.woff')
WOFF2_FILES = $(shell find ./ -type f -name '*.woff2')
SVG_GZ_FILES = $(addsuffix .svg.gz, $(basename $(SVG_FILES)))
HTML_GZ_FILES = $(addsuffix .html.gz, $(basename $(HTML_FILES)))
TTF_GZ_FILES = $(addsuffix .ttf.gz, $(basename $(TTF_FILES)))
WOFF_GZ_FILES = $(addsuffix .woff.gz, $(basename $(WOFF_FILES)))
WOFF2_GZ_FILES = $(addsuffix .woff2.gz, $(basename $(WOFF2_FILES)))
GZIP_COMMAND = gzip -k -9
.PHONY: all
all: $(SVG_GZ_FILES) $(HTML_GZ_FILES) $(TTF_GZ_FILES) $(WOFF_GZ_FILES) $(WOFF2_GZ_FILES)
%.gz: %
@echo "* Compressing $?"
@$(GZIP_COMMAND) $< -f
clean:
rm -f $(SVG_GZ_FILES) $(HTML_GZ_FILES) $(TTF_GZ_FILES)