Skip to content

add local make wasm target again#388

Open
irmen wants to merge 3 commits into
X16Community:masterfrom
irmen:wasm-target-again
Open

add local make wasm target again#388
irmen wants to merge 3 commits into
X16Community:masterfrom
irmen:wasm-target-again

Conversation

@irmen

@irmen irmen commented May 19, 2026

Copy link
Copy Markdown
Contributor

Adds a make wasm target again so you can build the wasm web emulator locally again.
Requires emscripten to be installed as usual.

Fixes #375

disclaimer: most of the change was created by an AI agent because I don't know cmake very well.

note the ci builds fail not because of this particular PR but because there is a problem in the github action related to the pdf docs, this is fixed in #389

@irmen irmen changed the title Wasm target again add local make wasm target again May 19, 2026
Comment thread Makefile
Comment on lines +29 to +33
EMSCRIPTEN_TOOLCHAIN ?= $(shell \
emcc=$$(command -v emcc 2>/dev/null) && \
dir=$$(dirname $$(readlink -f "$$emcc")) && \
echo "$$dir/cmake/Modules/Platform/Emscripten.cmake")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If Emscripten isn't installed or can't be found, this will be empty, causing it to build normally for the host platform and failing later when the wasm artifacts can't be found. This should error early so that an accidental make wasm without emscripten doesn't seem to build correctly at first.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

also add a better way to find the rom.bin required for wasm build
also add build-wasm directory to cleanup targets for make clean and distclean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing 'make wasm' after switch to Cmake

2 participants