orca/ext/wasm3/platforms/cpp/wasm/Makefile

19 lines
284 B
Makefile
Raw Permalink Normal View History

2023-04-12 14:21:03 +00:00
NAME=test_prog
SRC=$(NAME).c
WASM=$(NAME).wasm
HEADER=$(NAME).wasm.h
EMCC_FLAGS=-s STANDALONE_WASM -s ERROR_ON_UNDEFINED_SYMBOLS=0 -O3
all: $(HEADER)
clean:
rm -f $(HEADER) $(WASM)
.PHONY: all clean
$(WASM): $(SRC)
emcc $< -o $@ $(EMCC_FLAGS)
$(HEADER): $(WASM)
xxd -i $< >$@