summaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2022-05-02 04:07:47 -0700
committerDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2022-05-02 04:07:47 -0700
commit4383f26c4ede32e1d32b851a2da6efa2cffcdaf2 (patch)
tree6f542c4d95adf0d3f5a8fb66e4bc4e4c354461da /web
parente462a15fb8b1f5ff505153f1a3e1097a4fbf0e80 (diff)
downloaddartboat-4383f26c4ede32e1d32b851a2da6efa2cffcdaf2.tar.gz
dartboat-4383f26c4ede32e1d32b851a2da6efa2cffcdaf2.tar.xz
web: add Makefile
Diffstat (limited to 'web')
-rw-r--r--web/Makefile21
1 files changed, 21 insertions, 0 deletions
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