From fec69518c3e133deb8ee619947304c590363b7b0 Mon Sep 17 00:00:00 2001 From: Konrad Beckmann Date: Tue, 27 Apr 2021 22:41:32 +0200 Subject: [PATCH] Makefile: Add COMPRESS variable to control if compression should be performed --- Makefile.common | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Makefile.common b/Makefile.common index 5b14324e..692c4e03 100644 --- a/Makefile.common +++ b/Makefile.common @@ -21,6 +21,14 @@ else EXTFLASH_SIZE ?= 1048576 endif +# Compress supported ROMs by default. Set to 0 to disable. +COMPRESS ?= 1 +ifeq ($(COMPRESS),1) + COMPRESS_PARAM := --compress +else + COMPRESS_PARAM := --no-compress +endif + PYTHON3 ?= /usr/bin/env python3 ####################################### @@ -294,7 +302,7 @@ $(BUILD_DIR)/rom_files.txt: FORCE | $(BUILD_DIR) $(BUILD_DIR)/roms.a: $(BUILD_DIR)/rom_files.txt parse_roms.py $(V)$(ECHO) [ PYTHON3 ] $(notdir $<) - $(V)$(PYTHON3) parse_roms.py --flash-size $(EXTFLASH_SIZE) + $(V)$(PYTHON3) parse_roms.py --flash-size $(EXTFLASH_SIZE) $(COMPRESS_PARAM) $(BUILD_DIR)/config.h $(BUILD_DIR)/saveflash.ld &: $(BUILD_DIR)/roms.a $(V)/bin/sh -c true @@ -423,4 +431,4 @@ distclean: clean ####################################### -include $(wildcard $(BUILD_DIR)/*.d) -# *** EOF *** \ No newline at end of file +# *** EOF ***