Remove build-lib script, recommend make
This commit is contained in:
parent
862b56dfe1
commit
61814b468d
3 changed files with 3 additions and 29 deletions
|
|
@ -15,13 +15,9 @@ All of the API functions shown here are declared and documented in the [`tree_si
|
|||
|
||||
### Building the Library
|
||||
|
||||
To build the library on a POSIX system, run this script, which will create a static library called `libtree-sitter.a` in the Tree-sitter folder:
|
||||
To build the library on a POSIX system, just run `make` in the Tree-sitter directory. This will create a static library called `libtree-sitter.a` as well as dynamic libraries.
|
||||
|
||||
```sh
|
||||
script/build-lib
|
||||
```
|
||||
|
||||
Alternatively, you can use the library in a larger project by adding one source file to the project. This source file needs two directories to be in the include path when compiled:
|
||||
Alternatively, you can incorporate the library in a larger project's build system by adding one source file to the build. This source file needs two directories to be in the include path when compiled:
|
||||
|
||||
**source file:**
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ CFLAGS=${CFLAGS:-"$default_fuzz_flags"}
|
|||
CXXFLAGS=${CXXFLAGS:-"$default_fuzz_flags"}
|
||||
|
||||
export CFLAGS
|
||||
script/build-lib
|
||||
make
|
||||
|
||||
if [ -z "$@" ]; then
|
||||
languages=$(ls test/fixtures/grammars)
|
||||
|
|
|
|||
|
|
@ -1,22 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# If `CC` isn't set, pick a default compiler
|
||||
if hash clang 2>/dev/null; then
|
||||
: ${CC:=clang}
|
||||
else
|
||||
: ${CC:=gcc}
|
||||
fi
|
||||
|
||||
${CC} \
|
||||
-c \
|
||||
-O3 \
|
||||
-std=gnu99 \
|
||||
$CFLAGS \
|
||||
-I lib/src \
|
||||
-I lib/include \
|
||||
lib/src/lib.c \
|
||||
-o tree-sitter.o
|
||||
|
||||
rm -f libtree-sitter.a
|
||||
ar rcs libtree-sitter.a tree-sitter.o
|
||||
rm tree-sitter.o
|
||||
Loading…
Add table
Add a link
Reference in a new issue