Skip to content
This repository has been archived by the owner on Mar 24, 2024. It is now read-only.

Commit

Permalink
Makefile: Add COMPRESS variable to control if compression should be p…
Browse files Browse the repository at this point in the history
…erformed
  • Loading branch information
kbeckmann committed Apr 27, 2021
1 parent fe6bc49 commit fec6951
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -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

#######################################
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -423,4 +431,4 @@ distclean: clean
#######################################
-include $(wildcard $(BUILD_DIR)/*.d)

# *** EOF ***
# *** EOF ***

0 comments on commit fec6951

Please sign in to comment.