summaryrefslogblamecommitdiff
path: root/c/wasmtime-basic/Makefile
blob: ad70fce664344f1d9f4aac2ab69b8a3508c2299d (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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