1CC = /opt/wasi-sdk/bin/clang 2TARGET = wasm32-unknown-wasi 3SYSROOT = 4 5OBJ = $(patsubst c/%.c, wasm/%.wasm, $(wildcard c/*.c)) 6all: $(OBJ) 7 8wasm/%.wasm : c/%.c 9 $(CC) $< --target=$(TARGET) --sysroot=$(SYSROOT) -s -o $@ 10 11.PHONY clean: 12 rm -f $(OBJ) 13