summaryrefslogtreecommitdiff
path: root/web/Makefile
diff options
context:
space:
mode:
authorDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2022-05-02 05:58:26 -0700
committerDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2022-05-02 05:58:26 -0700
commit6a4dd8790c5c98466087a5374611f72131eff958 (patch)
treea40a8fe0ef8833e2c758d6b67fda640fa6d28b01 /web/Makefile
parent446a32d0e301285e54fa1030fb2138b0169d3fae (diff)
downloaddartboat-6a4dd8790c5c98466087a5374611f72131eff958.tar.gz
dartboat-6a4dd8790c5c98466087a5374611f72131eff958.tar.xz
web: generate all required files in new dir
Diffstat (limited to 'web/Makefile')
-rw-r--r--web/Makefile8
1 files changed, 5 insertions, 3 deletions
diff --git a/web/Makefile b/web/Makefile
index bdddb14..66d88f7 100644
--- a/web/Makefile
+++ b/web/Makefile
@@ -6,16 +6,18 @@ CFLAGS += -O3 -Wall -Wextra -Wno-unknown-warning-option -I../ \
-sEXPORTED_FUNCTIONS=_main,_malloc,_free \
-sEXPORTED_RUNTIME_METHODS=UTF8ToString,stringToUTF8,lengthBytesUTF8
-TARGET := static/dartboat_wasm.js
+TARGET := dartboat_web
SRC := $(wildcard *.c) ../comp.c ../match.c ../board.c ../checkouts.c
all: $(TARGET)
$(TARGET): $(SRC)
- $(CC) $(CFLAGS) $^ -o $@
+ mkdir $(TARGET)
+ $(CC) $(CFLAGS) $^ -o $(TARGET)/dartboat_wasm.js
+ cp static/* $(TARGET)/
clean:
- rm -f $(TARGET) $(TARGET:.js=.wasm)
+ rm -rf $(TARGET)
.PHONY: all clean