diff options
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -123,8 +123,12 @@ $(JS)/lsp.bin: $(BIN)/zclsp$(EXE) src/js/extract_lsp.js src/js/mapvalues.js | $( vsix: bash src/tools/mkvsix.sh -# the browser compiler: the page and its loader beside the wasm build -web: $(WEB)/zc.wasm $(WEB)/index.html $(WEB)/zc.js +# the browser compiler: the page, its loader and the examples it offers beside the wasm build +WEB_EXAMPLES := $(patsubst examples/%,$(WEB)/examples/%,$(wildcard examples/*.zc)) +web: $(WEB)/zc.wasm $(WEB)/index.html $(WEB)/zc.js $(WEB_EXAMPLES) +$(WEB)/examples/%.zc: examples/%.zc + mkdir -p $(WEB)/examples + cp $< $@ $(WEB)/zc.wasm: src/micro/micro.c src/micro/micro_port.h src/web/port_wasm.c src/web/build.sh $(B)/core/genome.bin $(CORE_H) bash src/web/build.sh $@ $(WEB)/index.html $(WEB)/zc.js: $(WEB)/%: src/web/% |
