diff options
author | Li Jin <dragon-fly@qq.com> | 2020-08-13 11:21:22 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2020-08-13 11:21:22 +0800 |
commit | 1afca4888b2ee8e49c2e4d0bef478d0728d5ed41 (patch) | |
tree | 5eeba783f9b56b2e74297cd1ce3e8bd8a1fa4d5d /README.md | |
parent | b842635fe941ab8f22d52d453bac91b6edd38f91 (diff) | |
download | yuescript-1afca4888b2ee8e49c2e4d0bef478d0728d5ed41.tar.gz yuescript-1afca4888b2ee8e49c2e4d0bef478d0728d5ed41.tar.bz2 yuescript-1afca4888b2ee8e49c2e4d0bef478d0728d5ed41.zip |
add make target to build .so file.
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -26,13 +26,21 @@ So MoonPlus is a new code base for pushing the language to go forward and being | |||
26 | 26 | ||
27 | * **Lua Module** | 27 | * **Lua Module** |
28 | 28 | ||
29 | Install [luarocks](https://luarocks.org), a package manager for Lua modules. Then install it as a Lua module. | 29 |   Build `moonp.so` file with |
30 | |||
31 | ```sh | ||
32 | > make shared LUAI=/usr/local/include/lua LUAL=/usr/local/lib/lua | ||
33 | ``` | ||
34 | |||
35 |   Then get the binary file from path `bin/shared/moonp.so`. | ||
36 | |||
37 |   Or you can install [luarocks](https://luarocks.org), a package manager for Lua modules. Then install it as a Lua module with | ||
30 | 38 | ||
31 | ```sh | 39 | ```sh |
32 | > luarocks install moonplus | 40 | > luarocks install moonplus |
33 | ``` | 41 | ``` |
34 | 42 | ||
35 |   Require the module in Lua: | 43 |   Then require the module in Lua: |
36 | 44 | ||
37 | ```Lua | 45 | ```Lua |
38 | require("moonp")("main") -- require `main.moon` | 46 | require("moonp")("main") -- require `main.moon` |
@@ -54,7 +62,7 @@ f! | |||
54 | 62 | ||
55 | * **Binary Tool** | 63 | * **Binary Tool** |
56 | 64 | ||
57 | Clone this repo, then build and install executable with: | 65 |   Clone this repo, then build and install executable with: |
58 | 66 | ||
59 | ```sh | 67 | ```sh |
60 | > make install | 68 | > make install |