SRCS:= $(wildcard *.c */*.c)
BUILD:= ../build
+DOC:= ../doc
BIN:=repl
TEST_BIN:=test
OBJS:= $(patsubst %.c,$(BUILD)/%.o,$(SRCS))
.PHONY: web
web: $(WEB_OBJS)
emcc $(WEB_OBJS) --shell-file $(WEB_SHELL) -o $(WEB_BUILD)/klrepl.html -s NO_EXIT_RUNTIME=1 -s "EXPORTED_RUNTIME_METHODS=['ccall']" --preload-file ../demos.kl@demos.kl
- mkdir -p $(WEB_BUILD)/../static
- cp $(WEB_BUILD)/../kl.png $(WEB_BUILD)/../static
- cp $(WEB_BUILD)/../manifest.json $(WEB_BUILD)/../static
- cp $(WEB_BUILD)/klrepl.data $(WEB_BUILD)/../static
- cp $(WEB_BUILD)/klrepl.js $(WEB_BUILD)/../static
- cp $(WEB_BUILD)/klrepl.wasm $(WEB_BUILD)/../static
- cp $(WEB_BUILD)/klrepl.html $(WEB_BUILD)/../static/index.html
+ mkdir -p $(WEB_BUILD)/../static/repl
+ cp $(WEB_BUILD)/../kl.png $(WEB_BUILD)/../static/repl
+ cp $(WEB_BUILD)/../manifest.json $(WEB_BUILD)/../static/repl
+ cp $(WEB_BUILD)/klrepl.data $(WEB_BUILD)/../static/repl
+ cp $(WEB_BUILD)/klrepl.js $(WEB_BUILD)/../static/repl
+ cp $(WEB_BUILD)/klrepl.wasm $(WEB_BUILD)/../static/repl
+ cp $(WEB_BUILD)/klrepl.html $(WEB_BUILD)/../static/repl/index.html
+ cp $(DOC)/index.html $(WEB_BUILD)/../static
+ cp $(DOC)/style.css $(WEB_BUILD)/../static
+ cp $(DOC)/builtins.html $(WEB_BUILD)/../static
.PHONY: test
test: $(TEST_OBJS)