WAMRC := /opt/wamr-wamrc/wamrc IWASM := /opt/wamr-iwasm/iwasm WASI_SDK := /opt/wasi-sdk SYSROOT := $(WASI_SDK)/share/wasi-sysroot CLANG := $(WASI_SDK)/bin/clang CFLAGS := --target=wasm32-wasi \ --sysroot=$(SYSROOT) \ -O2 SRCS := $(wildcard *.c) WASMS := $(SRCS:.c=.wasm) AOTS := $(WASMS:.wasm=.aot) .PHONY: build-all build-wasms build-aots clean build-all: build-wasms build-aots build-wasms: $(WASMS) %.wasm: %.c $(CLANG) $(CFLAGS) $< -o $@ build-aots: $(AOTS) %.aot: %.wasm $(WAMRC) -o $@ $< clean: rm -f *.wasm rm -f *.aot