node/test/wasi/Makefile
snek b3bf07e019
wasi: fast calls
PR-URL: https://github.com/nodejs/node/pull/43697
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2022-12-08 04:22:37 +00:00

14 lines
320 B
Makefile

CC = /opt/wasi-sdk/bin/clang
TARGET = wasm32-wasi
SYSROOT =
CFLAGS = -D_WASI_EMULATED_PROCESS_CLOCKS -lwasi-emulated-process-clocks
OBJ = $(patsubst c/%.c, wasm/%.wasm, $(wildcard c/*.c))
all: $(OBJ)
wasm/%.wasm : c/%.c
$(CC) $< $(CFLAGS) --target=$(TARGET) --sysroot=$(SYSROOT) -s -o $@
.PHONY clean:
rm -f $(OBJ)