mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-11 16:26:20 +00:00
Few notes: - Lots of deprecated SIMD intrinsic warnings & errors in JPEG-XL -> Highway; had to suppress erorrs to make project build. - Moved couple of common link flags to cpp.Dockerfile (note: can't move `EXPORT_ES6` otherwise `configure` will fail). - MODULARIZE=1 is no longer necessary and implied by EXPORT_ES6. - EXPORT_NAME=... is no longer necessary in EXPORT_ES6. - Changed visdif to also use EXPORT_ES6 and ENVIRONMENT=node instead of generic JS.
31 lines
615 B
Makefile
31 lines
615 B
Makefile
CODEC_URL = https://github.com/google/butteraugli/archive/71b18b636b9c7d1ae0c1d3730b85b3c127eb4511.tar.gz
|
|
CODEC_DIR = node_modules/butteraugli
|
|
ENVIRONMENT = node
|
|
|
|
OUT_JS = visdif.js
|
|
OUT_WASM = $(OUT_JS:.js=.wasm)
|
|
|
|
.PHONY: all clean
|
|
|
|
all: $(OUT_JS)
|
|
|
|
%.js: visdif.cpp $(CODEC_DIR)/butteraugli/butteraugli.cc
|
|
$(CXX) \
|
|
-I $(CODEC_DIR) \
|
|
${CXXFLAGS} \
|
|
${LDFLAGS} \
|
|
--bind \
|
|
-s ENVIRONMENT=$(ENVIRONMENT) \
|
|
-s EXPORT_ES6=1 \
|
|
-o $@ \
|
|
$+
|
|
|
|
$(CODEC_DIR)/butteraugli/butteraugli.cc: $(CODEC_DIR)
|
|
|
|
$(CODEC_DIR):
|
|
mkdir -p $@
|
|
curl -sL $(CODEC_URL) | tar xz --strip 1 -C $@
|
|
|
|
clean:
|
|
$(RM) $(OUT_JS) $(OUT_WASM)
|