diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-04-06 13:14:34 +0900 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-04-06 13:14:34 +0900 |
| commit | e19346fd8bad5b745e8923baf16c1c3173aee2aa (patch) | |
| tree | 89e9dc49dfb7008bca8676e39ad47e3fa92f091c /doc | |
| parent | 339216b5ecec3fc4417c7eca2b43cc02dbc571e1 (diff) | |
| parent | 6844ef713158280973d70f5d698c6fdb33d4810a (diff) | |
| download | mruby-e19346fd8bad5b745e8923baf16c1c3173aee2aa.tar.gz mruby-e19346fd8bad5b745e8923baf16c1c3173aee2aa.zip | |
Merge pull request #5405 from shuujii/fix-heading-level-in-doc-guides-link.md
Fix heading level in `doc/guides/link.md` [ci skip]
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/guides/link.md | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/doc/guides/link.md b/doc/guides/link.md index 42133d581..1826dde59 100644 --- a/doc/guides/link.md +++ b/doc/guides/link.md @@ -1,18 +1,17 @@ -Linking `libmruby` to your application -=== +# Linking `libmruby` to your application You have two ways to link `libmruby` to your application. * using executable gem. * using normal compilation process -# Executable Gems +## Executable Gems If your application is relatively small, `mrbgem` is easier way to create the executable. By tradition, the gem name start with `mruby-bin-`, e.g. `mruby-bin-debugger`. -## `mrbgem.rake` file +### `mrbgem.rake` file The executable name is specified in `mrbgem.rake` file at the top of your `mrbgem` directory. @@ -26,7 +25,7 @@ MRuby::Gem::Specification.new('mruby-bin-example') do |spec| end ``` -## Source tree structure +### Source tree structure The source file for the gem executable should be in `<gem-name>/tools/<bin-name>`. Currently, we support C or C++ source code @@ -34,14 +33,14 @@ The source file for the gem executable should be in supported. Put the functionality in the different gem and specify dependency to it in `mrbgem.rake`. -# Normal compilation process +## Normal compilation process The `libmruby` is a normal library so that you can just link it to your application. Specify proper compiler options (`-I` etc.) and linker options (`-Lmruby` etc.) to compile and link your application. Specify those options in your build script (e.g. `Makefile`). -## Compiler options +### Compiler options You need to specify compiler options that are compatible to mruby configuration, for example: @@ -57,7 +56,7 @@ $ mruby-config --cflags -std=gnu99 -g -O3 -Wall -DMRB_GC_FIXED_ARENA -I/home/matz/work/mruby/include -I/home/matz/work/mruby/build/host/include ``` -## Linker options +### Linker options Just like compiler options, you need to specify linker options that are compatible to mruby configuration. |
