From: nhmall Date: Sun, 4 Oct 2020 19:19:58 +0000 (-0400) Subject: update original documentation for pr385 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=de0195191bae3663e5aeda19f0f3d9a22ffdb6d9;p=nethack update original documentation for pr385 Changes to be committed: modified: sys/lib/README.md --- diff --git a/sys/lib/README.md b/sys/lib/README.md index 3bc7c283a..8258323b7 100644 --- a/sys/lib/README.md +++ b/sys/lib/README.md @@ -9,11 +9,26 @@ This library has only been built on MacOS, but should work on Linux and other un Building the WASM module requires that you have the [emscripten toolchain / sdk installed](https://emscripten.org/docs/getting_started/downloads.html). Generally the build is the same as the unix build: + +[Edit Oct 4, 2020: Use the existing Makefile and hints, hints/include system for cross-compiles] +1. `cd sys/unix` +2. `./setup.sh hints/macOS.2020` +3. `cd ../..` +4. For `libnethack.a`: `make WANT_LIBNH=1 all` +5. For `nethack.js`: `make CROSS_TO_WASM=1 all` + +[Original text was:] 1. `cd sys/lib` 2. For `libnethack.a`: `./setup.sh hints/macOS.2020`; for `nethack.js`: `./setup.sh hints/wasm` 3. `cd ../..` 4. `make` + +[Edit Oct 4, 2020:] +Resulting libaries will be in the `targets/wasm` directory for `CROSS_TO_WASM=1`. +Resulting libaries will be in the `src` directory for `WANT_LIBNH=1`. + +[Original text:] Resulting libaries will be in the `src` directory. WASM also has a npm module that can be published out of `sys/lib/npm-library`. After building the `nethack.js` it can be published by: @@ -92,4 +107,4 @@ function nethackStart(cb, inputModule = {}) { } nethackStart(yourCallbackFunction); -``` \ No newline at end of file +```