Files
waozi 4b9a61d324 Run the Makefile targets as plain commands
The build-queue wrapper no longer exists; Harmony's desktop_run gives a command its resource scope. The tool, native and benchmark targets call their commands directly, and the README shows the test commands without the wrapper.
2026-11-23 05:22:47 -03:00

24 lines
1.6 KiB
Makefile

ZIRAN_ROOT ?= $(if $(ZIRAN_TOOLCHAIN_ROOT),$(ZIRAN_TOOLCHAIN_ROOT),../../ziran)
ZIRAN ?= $(ZIRAN_ROOT)/build/bin/ziran
CC ?= cc
IMAGE_CODEC_ROOT ?= ../image-codec
build/bin/package_tool: tools/package_tool.zi Makefile
mkdir -p build/bin build/scratch/package-tool
"$(ZIRAN)" build --target=c --entry package_tool:main --root tools --module-path "std=$(ZIRAN_ROOT)/std" -o build/scratch/package-tool tools/package_tool.zi
$(CC) -std=c99 -O2 -I"$(ZIRAN_ROOT)/include" -Ibuild/scratch/package-tool build/scratch/package-tool/*.c -lm -o build/bin/package_tool
build/bin/webp-oracle: tools/oracle.zi src/facade.zi src/libwebp.zi src/native_api.zi src/riff.zi src/engine.zi build/native/libimagewebp.a Makefile
mkdir -p build/bin build/scratch/oracle
"$(ZIRAN)" build --target=c --entry oracle:main --root tools --module-path webp=src --module-path "image_codec=$(IMAGE_CODEC_ROOT)/src" --module-path "std=$(ZIRAN_ROOT)/std" -o build/scratch/oracle tools/oracle.zi
$(CC) -std=c99 -O2 -I"$(ZIRAN_ROOT)/include" -Ibuild/scratch/oracle build/scratch/oracle/*.c build/native/libimagewebp.a -lm -o build/bin/webp-oracle
build/bin/webp-bench: tools/bench.zi $(wildcard src/*.zi) build/native/libimagewebp.a Makefile
mkdir -p build/bin build/scratch/bench
"$(ZIRAN)" build --target=c --entry bench:main --root tools --module-path webp_private=src --module-path "image_codec=$(IMAGE_CODEC_ROOT)/src" --module-path "std=$(ZIRAN_ROOT)/std" -o build/scratch/bench tools/bench.zi
$(CC) -std=c99 -O2 -I"$(ZIRAN_ROOT)/include" -Ibuild/scratch/bench build/scratch/bench/*.c build/native/libimagewebp.a -lm -o build/bin/webp-bench
.PHONY: native
native:
sh native/build.sh "$(WEBP_SOURCE)"