From 4383f26c4ede32e1d32b851a2da6efa2cffcdaf2 Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Mon, 2 May 2022 04:07:47 -0700 Subject: web: add Makefile --- web/Makefile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 web/Makefile (limited to 'web/Makefile') diff --git a/web/Makefile b/web/Makefile new file mode 100644 index 0000000..bdddb14 --- /dev/null +++ b/web/Makefile @@ -0,0 +1,21 @@ +CC := emcc + +CFLAGS += -O3 -Wall -Wextra -Wno-unknown-warning-option -I../ \ + -sNO_EXIT_RUNTIME=1 \ + -sENVIRONMENT=web \ + -sEXPORTED_FUNCTIONS=_main,_malloc,_free \ + -sEXPORTED_RUNTIME_METHODS=UTF8ToString,stringToUTF8,lengthBytesUTF8 + +TARGET := static/dartboat_wasm.js + +SRC := $(wildcard *.c) ../comp.c ../match.c ../board.c ../checkouts.c + +all: $(TARGET) + +$(TARGET): $(SRC) + $(CC) $(CFLAGS) $^ -o $@ + +clean: + rm -f $(TARGET) $(TARGET:.js=.wasm) + +.PHONY: all clean -- cgit v1.2.3-70-g09d2