From 763c2e234355ca28e36c90d1272f6f426bfde0d7 Mon Sep 17 00:00:00 2001 From: Valentin Brandl Date: Mon, 16 Jul 2018 12:19:40 +0200 Subject: [PATCH] Add Makefile for ahead of time compression --- Makefile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..8b6a6af --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ +.PHONY: default clean + +TARGETS = $(shell find . -type f -name '*.html') +TARGETS += $(shell find . -type f -name '*.asc') +TARGETS += $(shell find . -type f -name '*.css') +TARGETS += $(shell find . -type f -name '*.js') +TARGETS += $(shell find . -type f -name '*.txt') +TARGETS += $(shell find . -type f -name '*.xml') +TARGETS += $(shell find . -type f -name '*.svg') +TARGETS_GZ = $(patsubst %, %.gz, $(TARGETS)) + +CC=gzip +CFLAGS=-k -f -9 + +default: $(TARGETS_GZ) + +%.gz : % + $(CC) $(CFLAGS) $< + +clean: + rm -f $(TARGETS_GZ)