diff options
author | Brian Woods | 2023-02-22 15:35:42 -0500 |
---|---|---|
committer | Brian Woods | 2023-02-22 15:35:42 -0500 |
commit | 3846be2ff4b06371a02546aa7a8b6aa3c4b8fa98 (patch) | |
tree | 1b64e6c0ebf50f2b7b7e575a9800e8e06193e030 /webp/Makefile.double | |
parent | 8fe5bf1295799a63aca7a16469771e257e5cfc49 (diff) |
webp: added webp input image support
Changed Makefile.double to accept both PNGs and WEBPs as input, since
both allow for lossless images.
Diffstat (limited to 'webp/Makefile.double')
-rw-r--r-- | webp/Makefile.double | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/webp/Makefile.double b/webp/Makefile.double index dec381c..18a1f8b 100644 --- a/webp/Makefile.double +++ b/webp/Makefile.double @@ -8,9 +8,12 @@ LOW_OUT_DIR=low_quality HIGH_WEBP_OPT=-near_lossless 60 LOW_WEBP_OPT=-af -pass 6 -psnr 38 -SRC=$(shell find src/ -type f -name '*.png') -HIGH_OUT=$(patsubst ${SRC_DIR}/%.png, ${HIGH_OUT_DIR}/%.webp, $(SRC)) -LOW_OUT=$(patsubst ${SRC_DIR}/%.png, ${LOW_OUT_DIR}/%.webp, $(SRC)) +SRC_PNG=$(shell find src/ -type f -iname '*.png') +SRC_WEBP=$(shell find src/ -type f -iname '*.webp') +HIGH_OUT=$(patsubst ${SRC_DIR}/%.png, ${HIGH_OUT_DIR}/%.webp, $(SRC_PNG)) \ + $(patsubst ${SRC_DIR}/%.webp, ${HIGH_OUT_DIR}/%.webp, $(SRC_WEBP)) +LOW_OUT=$(patsubst ${SRC_DIR}/%.png, ${LOW_OUT_DIR}/%.webp, $(SRC_PNG)) \ + $(patsubst ${SRC_DIR}/%.webp, ${LOW_OUT_DIR}/%.webp, $(SRC_WEBP)) .PHONY: all clean high low .SECONDARY: main-build-high main-build-low @@ -27,9 +30,9 @@ pre-build-low: main-build-high: ${HIGH_OUT} main-build-low: ${LOW_OUT} -${HIGH_OUT_DIR}/%.webp: ${SRC_DIR}/%.png +${HIGH_OUT_DIR}/%.webp: ${SRC_DIR}/%.* cwebp ${HIGH_WEBP_OPT} "$<" -o "$@" -${LOW_OUT_DIR}/%.webp: ${SRC_DIR}/%.png +${LOW_OUT_DIR}/%.webp: ${SRC_DIR}/%.* cwebp ${LOW_WEBP_OPT} "$<" -o "$@" clean: |