diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/c-interoperability.md | 8 | ||||
| -rw-r--r-- | docs/compilation.md | 2 | ||||
| -rw-r--r-- | docs/libraries.md | 8 | ||||
| -rw-r--r-- | docs/tomo.1.md | 2 |
4 files changed, 10 insertions, 10 deletions
diff --git a/docs/c-interoperability.md b/docs/c-interoperability.md index 3328b39d..3c5bbff1 100644 --- a/docs/c-interoperability.md +++ b/docs/c-interoperability.md @@ -6,10 +6,10 @@ make this possible, there are a few tools available. ## Using C Libraries -In order to link against a compiled shared library, you can use `use libfoo.so` -to cause Tomo to add `-l:libfoo.so` to the linker flags when compiling your -final executable. You can also use `use <foo.h>` or `use ./foo.h` to cause Tomo -to insert a corresponding `#include` when compiling your code. +In order to link against a compiled shared library, you can use `use -lfoo` to +cause Tomo to add `-lfoo` to the linker flags when compiling your final +executable. You can also use `use <foo.h>` or `use ./foo.h` to cause Tomo to +insert a corresponding `#include` when compiling your code. You can also `use ./foo.c` or `use ./foo.S` to use C or assembly source files from inside a Tomo source file. diff --git a/docs/compilation.md b/docs/compilation.md index 27161115..8591f677 100644 --- a/docs/compilation.md +++ b/docs/compilation.md @@ -24,7 +24,7 @@ graph that looks like this: ``` For a more complicated example, imagine `foo.tm` imports `baz.tm` and both are -being compiled into a shared library, `libfoo.so`: +being compiled into a shared library, `libfoo.so` (or `libfoo.dylib` on Mac): ``` +---------------------------------------+ diff --git a/docs/libraries.md b/docs/libraries.md index 983497fa..551b011a 100644 --- a/docs/libraries.md +++ b/docs/libraries.md @@ -119,16 +119,16 @@ Finally, the resulting binary can be executed to actually run the program! In Tomo, a shared library is built out of a *directory* that contains multiple `.tm` files. Each `.tm` file in the directory (excluding those that start with an underscore) will be compiled and linked together to produce a single -`libwhatever.so` file and `whatever.h` file that can be used by other Tomo -projects. You can build a library by running `tomo -L dirname/` or `tomo -L` in -the current directory. +`libwhatever.so` file (or `libwhatever.dylib` on Mac) and `whatever.h` file +that can be used by other Tomo projects. You can build a library by running +`tomo -L dirname/` or `tomo -L` in the current directory. ### Installing If you additionally add the `-I` flag, Tomo will copy the entire directory (excluding files and directories that begin with `.` such as `.git`) into `~/.local/share/tomo/installed/` and create a symbolic link for the library's -`.so` file in `~/.local/share/tomo/lib/`. +`.so` file (or `.dylib` file on Mac) in `~/.local/share/tomo/lib/`. ### Using Shared Libraries diff --git a/docs/tomo.1.md b/docs/tomo.1.md index c641d0d3..b95a25e4 100644 --- a/docs/tomo.1.md +++ b/docs/tomo.1.md @@ -48,7 +48,7 @@ C code, which is then compiled using a C compiler of your choice. : Compile the input file to an executable. `-L`, `--library` -: Compile the input files to a library `.so` file and header. +: Compile the input files to a shared library file and header. `-I`, `--install` : Install the compiled executable or library. |
