added webp encoding
This commit is contained in:
parent
576b2050a7
commit
d5b43658d0
@ -13,6 +13,10 @@ LDFLAGS =
|
|||||||
EMBED_TOOL = tools/bin/embed
|
EMBED_TOOL = tools/bin/embed
|
||||||
EMBED_ARGS = -f=h
|
EMBED_ARGS = -f=h
|
||||||
|
|
||||||
|
CONVERT_TOOL = $(shell which convert)
|
||||||
|
CONVERT_ARGS = -define webp
|
||||||
|
:lossless=false -define webp:alpha-compression=1 -define webp:alpha-quality=70 -define webp:emulate-jpeg-size=true -o
|
||||||
|
|
||||||
DIST = dist
|
DIST = dist
|
||||||
SRC_DIR = src
|
SRC_DIR = src
|
||||||
RAW_DIST = dist/raw
|
RAW_DIST = dist/raw
|
||||||
@ -28,7 +32,9 @@ libdzonerzy:
|
|||||||
@mkdir -p $(DIST)
|
@mkdir -p $(DIST)
|
||||||
@mkdir -p $(RAW_DIST)
|
@mkdir -p $(RAW_DIST)
|
||||||
@mkdir -p $(SITE_DIST)
|
@mkdir -p $(SITE_DIST)
|
||||||
@$(foreach file, $(wildcard res/*), $(EMBED_TOOL) -i $(file) -o $(SRC_INC_DIR)/$(notdir $(file)).h $(EMBED_ARGS);)
|
$(foreach file, $(wildcard res/*.jpg res/*.gif res/*.png), $(CONVERT_TOOL) $(file) $(CONVERT_ARGS) $(file).webp;)
|
||||||
|
@$(foreach file, $(wildcard res/*), $(EMBED_TOOL) -i $(file).webp -o $(SRC_INC_DIR)/$(notdir $(file).webp).h $(EMBED_ARGS);)
|
||||||
|
@rm -f res/*.webp
|
||||||
@ls $(SRC_INC_DIR)/*.h | xargs -n1 basename | sed 's/^/#include </' | sed 's/$$/>/' >> $(SRC_DIR)/res.h
|
@ls $(SRC_INC_DIR)/*.h | xargs -n1 basename | sed 's/^/#include </' | sed 's/$$/>/' >> $(SRC_DIR)/res.h
|
||||||
$(CC) $(CFLAGS) $(LDFLAGS) -o $(DIST)/$(OUTPUT) $(SRC_DIR)/libdzonerzy.so.c $(SRC_DIR)/challenge.o
|
$(CC) $(CFLAGS) $(LDFLAGS) -o $(DIST)/$(OUTPUT) $(SRC_DIR)/libdzonerzy.so.c $(SRC_DIR)/challenge.o
|
||||||
|
|
||||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user