mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-16 18:49:50 +00:00
Some other Makefile edits
This commit is contained in:
@@ -7,6 +7,7 @@ ENVIRONMENT = worker
|
|||||||
OUT_JS := enc/basis_enc.js dec/basis_dec.js
|
OUT_JS := enc/basis_enc.js dec/basis_dec.js
|
||||||
OUT_WASM := $(OUT_JS:.js=.wasm)
|
OUT_WASM := $(OUT_JS:.js=.wasm)
|
||||||
|
|
||||||
|
# TODO: Go back to -O3
|
||||||
COMMON_FLAGS := -O0 -g -fno-strict-aliasing
|
COMMON_FLAGS := -O0 -g -fno-strict-aliasing
|
||||||
|
|
||||||
override CXXFLAGS += $(COMMON_FLAGS)
|
override CXXFLAGS += $(COMMON_FLAGS)
|
||||||
@@ -35,18 +36,18 @@ CODEC_C_SOURCE_FILES := \
|
|||||||
encoder/apg_bmp.c \
|
encoder/apg_bmp.c \
|
||||||
zstd/zstd.c
|
zstd/zstd.c
|
||||||
|
|
||||||
|
# TODO: Remove me
|
||||||
override CXXFLAGS += -DBASISU_FORCE_DEVEL_MESSAGES=1
|
override CXXFLAGS += -DBASISU_FORCE_DEVEL_MESSAGES=1
|
||||||
|
|
||||||
.PHONY: all clean
|
.PHONY: all clean
|
||||||
|
|
||||||
.PRECIOUS: $(CODEC_C_OBJECT_FILES) $(CODEC_CPP_OBJECT_FILES)
|
|
||||||
|
|
||||||
all: $(CODEC_DIR) $(OUT_JS)
|
all: $(CODEC_DIR) $(OUT_JS)
|
||||||
|
|
||||||
# Define dependencies for all variations of build artifacts.
|
# Define dependencies for all variations of build artifacts.
|
||||||
$(filter enc/%,$(OUT_JS)): enc/basis_enc.cpp
|
$(filter enc/%,$(OUT_JS)): enc/basis_enc.cpp
|
||||||
$(filter dec/%,$(OUT_JS)): dec/basis_dec.cpp
|
$(filter dec/%,$(OUT_JS)): dec/basis_dec.cpp
|
||||||
|
|
||||||
|
# TODO: Make it build for node
|
||||||
# enc/mozjpeg_node_enc.js dec/mozjpeg_node_dec.js: ENVIRONMENT = node
|
# enc/mozjpeg_node_enc.js dec/mozjpeg_node_dec.js: ENVIRONMENT = node
|
||||||
|
|
||||||
%.js: $(CODEC_LIB)
|
%.js: $(CODEC_LIB)
|
||||||
@@ -82,4 +83,4 @@ $(CODEC_DIR):
|
|||||||
curl -sL $(CODEC_URL) | tar xz --strip 1 -C $@
|
curl -sL $(CODEC_URL) | tar xz --strip 1 -C $@
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM) $(OUT_JS) $(OUT_WASM) $(CODEC_BUILD_DIR)
|
$(RM) -r $(OUT_JS) $(OUT_WASM) $(CODEC_BUILD_DIR)
|
||||||
|
|||||||
Reference in New Issue
Block a user