diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2025-04-10 15:14:43 -0400 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2025-04-10 15:17:28 -0400 |
| commit | 93fb965ba2d3bd87177fd08715f8eac755f25bf0 (patch) | |
| tree | d0592f9c61faa38ebf1674c6a70f13b172e96034 /html/Makefile | |
| parent | 8ca183f2ba74e7e21c8c9e934469d3f0d7df2546 (diff) | |
| download | muhqs-game-93fb965ba2d3bd87177fd08715f8eac755f25bf0.tar.gz muhqs-game-93fb965ba2d3bd87177fd08715f8eac755f25bf0.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 $@" |
