Compression settings are passed to Makefile of mkespfsimage and can be set from command line

This commit is contained in:
Jindra Dolezy
2015-04-11 16:20:41 +02:00
parent 2ae9c904d4
commit 391b6d014e
2 changed files with 19 additions and 4 deletions
+14
View File
@@ -1,10 +1,24 @@
GZIP_COMPRESSION ?= "no"
USE_HEATSHRINK ?= "yes"
CFLAGS=-I../../lib/heatshrink -I.. -std=gnu99
ifeq ($(GZIP_COMPRESSION),"yes")
CFLAGS += -DESPFS_GZIP
endif
ifeq ($(USE_HEATSHRINK),"yes")
CFLAGS += -DESPFS_HEATSHRINK
endif
OBJS=main.o heatshrink_encoder.o
TARGET=mkespfsimage
$(TARGET): $(OBJS)
ifeq ($(GZIP_COMPRESSION),"yes")
$(CC) -o $@ $^ -lz
else
$(CC) -o $@ $^
endif
clean:
rm -f $(TARGET) $(OBJS)