diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2025-04-10 15:14:43 -0400 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2025-08-20 15:57:15 +0200 |
| commit | e370cb9437ba50370e6c30a344c370af4d07f9ab (patch) | |
| tree | 544107053cf6e2440af250054220baf8c92b928c /html/Makefile | |
| parent | 2009f751350cdd01d4e960dc065a97bd497e2c04 (diff) | |
| download | muhqs-game-e370cb9437ba50370e6c30a344c370af4d07f9ab.tar.gz muhqs-game-e370cb9437ba50370e6c30a344c370af4d07f9ab.zip | |
improve wasm support during build time
Copy wasm_exec.js bundled with the used go version.
Generalise the wasm build rule.
Diffstat (limited to 'html/Makefile')
| -rw-r--r-- | html/Makefile | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/html/Makefile b/html/Makefile index 25997e88..e28c9dee 100644 --- a/html/Makefile +++ b/html/Makefile @@ -66,10 +66,13 @@ all: $(HTML) $(RULES_HTML) maps misc $(BLOG_POSTS_HTML) misc: $(BUILDDIR)/latex-build $(BUILDDIR)/cards-data $(FILES_TO_COPY_TARGETS) \ $(BUILDDIR)/webtools.wasm -$(BUILDDIR)/webtools.wasm: +wasm_exec.js: $(shell go env GOROOT)/lib/wasm/wasm_exec.js + cp $< $@ + +$(BUILDDIR)/%.wasm: @echo "creating symlink $@" @if test \( ! \( -d $(@D) \) \) ;then mkdir -p $(@D);fi - ln -s $(GO_ROOT)/webtools/webtools.wasm $@ + ln -s $(GO_ROOT)/$(*F)/$(*F).wasm $@ $(FILES_TO_COPY_TARGETS): $(BUILDDIR)/%: % @echo "copying $@" |
