From 879381f9f178ddddbfc036a7071bf3e30d9a80c1 Mon Sep 17 00:00:00 2001 From: Andrew Clayton Date: Fri, 6 Sep 2024 21:24:07 +0100 Subject: w-h/0.2.0/shared.mk: Use variables for the various tools Signed-off-by: Andrew Clayton --- c/wasi-http/0.2.0/shared.mk | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'c/wasi-http/0.2.0') diff --git a/c/wasi-http/0.2.0/shared.mk b/c/wasi-http/0.2.0/shared.mk index 7e43601..d3e06f0 100644 --- a/c/wasi-http/0.2.0/shared.mk +++ b/c/wasi-http/0.2.0/shared.mk @@ -9,6 +9,9 @@ export WASI_SYSROOT ADAPTOR_TYPE ?= reactor +WIT_BINDGEN = /home/andrew/src/c/wasm/git/wit-bindgen/target/release/wit-bindgen +WASM_TOOLS = /home/andrew/src/c/wasm/git/wasm-tools/target/release/wasm-tools + CC = clang CFLAGS = -Wall -Wextra --target=wasm32-wasi --sysroot=$(WASI_SYSROOT) LDFLAGS = -Wl,--no-entry,--export=__heap_base,--export=__data_end,--export=malloc,--export=free,--stack-first,-z,stack-size=$$((8*1024*1024)) -mexec-model=reactor --rtlib=compiler-rt @@ -16,8 +19,8 @@ LDFLAGS = -Wl,--no-entry,--export=__heap_base,--export=__data_end,--export=mallo all: component.wasm bindgen: - /home/andrew/src/c/wasm/git/wit-bindgen/target/release/wit-bindgen c ../../wit/wasi-http/0.2.0 --autodrop-borrows yes --world proxy - /home/andrew/src/c/wasm/git/wit-bindgen/target/release/wit-bindgen markdown ../../wit/wasi-http/0.2.0 --world proxy + $(WIT_BINDGEN) c ../../wit/wasi-http/0.2.0 --autodrop-borrows yes --world proxy + $(WIT_BINDGEN) markdown ../../wit/wasi-http/0.2.0 --world proxy .PHONY: module.wasm: bindgen @@ -25,7 +28,7 @@ module.wasm: bindgen .PHONY: component.wasm: module.wasm - /home/andrew/src/c/wasm/git/wasm-tools/target/release/wasm-tools component new module.wasm --adapt ../../adaptors/24.0.0/wasi_snapshot_preview1.$(ADAPTOR_TYPE).wasm -o component.wasm + $(WASM_TOOLS) component new module.wasm --adapt ../../adaptors/24.0.0/wasi_snapshot_preview1.$(ADAPTOR_TYPE).wasm -o component.wasm clean: rm -f component.wasm module.wasm proxy* -- cgit