diff options
| -rw-r--r-- | README.md | 17 | ||||
| -rw-r--r-- | tests/meson.build | 1 |
2 files changed, 9 insertions, 9 deletions
@@ -2,8 +2,7 @@ wsap_vtcore is a headless terminal core: the parser, screen ring, logical-line history store, write core, and viewport snapshots. It is a C11 -library with no dependency but libm and, on POSIX, the thread library -(`-pthread`). +library with no dependency but libm and threads. | Path | Contents | | --- | --- | @@ -20,15 +19,17 @@ library with no dependency but libm and, on POSIX, the thread library Pick one of these: - **Meson subproject**: `dependency('wsap_vtcore')`, or - `subproject('wsap_vtcore').get_variable('wsap_vtcore_dep')`. The `arch_flag` - option sets the lowest instruction set, such as `-march=x86-64-v3`. + `subproject('wsap_vtcore').get_variable('wsap_vtcore_dep')`. It brings + libm and `dependency('threads')` with it. The `arch_flag` option sets the + lowest instruction set, such as `-march=x86-64-v3`. - **Amalgamation**: run `tools/amalgamate.py . OUT`. It writes - `OUT/wsap_vtcore.c` and `OUT/wsap_vtcore.h`. Compile `wsap_vtcore.c` with any - C11 compiler and link libm and the thread library: - `cc -std=c11 -pthread -c wsap_vtcore.c` on POSIX. A Rust `build.rs` needs one + `OUT/wsap_vtcore.c` and `OUT/wsap_vtcore.h`. Compile `wsap_vtcore.c` with + any C11 compiler and link libm and threads: `dependency('threads')` in + Meson, `-pthread` elsewhere on POSIX. A Rust `build.rs` needs one `cc::Build::new().file("wsap_vtcore.c").compile("wsap_vtcore")`. - **Sources**: compile `src/*.c` and `src/osc/*.c` once, with `src` and - `include/wsap_vtcore` on the include path. Link the thread library too. + `include/wsap_vtcore` on the include path. Link libm and threads, as for + the amalgamation. The library needs nothing else. On Windows the writer lock is an SRWLOCK from the system library, so it needs no extra link. The `*-amalgamation` diff --git a/tests/meson.build b/tests/meson.build index c0a0cd0..f176a6e 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -1,4 +1,3 @@ -thread_dep = dependency('threads') dl_dep = cc.find_library('dl', required: false) python = find_program('python3', native: true, version: '>=3.10') bash = find_program('bash', native: true) |
