Update Makefile to aggressively compress files
- Also, the compression should now be deterministic
diff --git a/Makefile b/Makefile
index 59724a4..7cb1d80 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-FILE_SIZE_LIMIT_MB = 25
+FILE_SIZE_LIMIT_MB = 10
LARGE_FILES := $(shell find . -type f -size +$(FILE_SIZE_LIMIT_MB)M -not -path "./.git/*")
LARGE_FILES_GZ := $(addsuffix .gz, $(LARGE_FILES))
@@ -22,6 +22,7 @@
mv mag/caravel_out.gds gds
+
.PHONY: clean
clean:
echo "clean"
@@ -35,12 +36,12 @@
$(LARGE_FILES_GZ): %.gz: %
- @if ! [ $(suffix $<) == ".gz" ]; then\
- gzip -n $< > /dev/null &&\
+ if ! [ $(suffix $<) == ".gz" ]; then\
+ gzip -n --best $< > /dev/null &&\
echo "$< -> $@";\
fi
-# This target compresses all files larger than 25 MB
+# This target compresses all files larger than $(FILE_SIZE_LIMIT_MB) MB
.PHONY: compress
compress: $(LARGE_FILES_GZ)
@echo "Files larger than $(FILE_SIZE_LIMIT_MB) MBytes are compressed!"
@@ -48,8 +49,8 @@
$(ARCHIVE_SOURCES): %: %.gz
- gzip -d $< &&\
- echo "$< -> $@"
+ @gzip -d $< &&\
+ echo "$< -> $@";\
.PHONY: uncompress
uncompress: $(ARCHIVE_SOURCES)