diff options
Diffstat (limited to '')
-rw-r--r-- | c/wasmtime-basic/Makefile | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/c/wasmtime-basic/Makefile b/c/wasmtime-basic/Makefile new file mode 100644 index 0000000..ad70fce --- /dev/null +++ b/c/wasmtime-basic/Makefile @@ -0,0 +1,17 @@ +CC = gcc +CFLAGS = -Wall -Wextra -g -I$(WASMTIME_C_API)/include -L$(WASMTIME_C_API)/lib +LDFLAGS = -Wl,-rpath,$(WASMTIME_C_API)/lib + +WASM_CC = clang +WASM_CFLAGS = -Wall -Wextra -fno-strict-aliasing --target=wasm32-wasi --sysroot=$(WASI_SYSROOT) + +all: wasmtime test.wasm + +wasmtime: wasmtime.c + $(CC) $(CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $< -lwasmtime + +test.wasm: test.c + $(WASM_CC) $(WASM_CFLAGS) -o $@ $< + +clean: + rm -f wasmtime test.wasm |