tree-sitter/tree-sitter.pc.in
Eli Schwartz af498bc0c3
Add a simple Makefile-based build system.
This produces static/shared libraries as well as a pkg-config file, and
installs them to the standard Unix hierarchy. GNU Make is assumed as
features like $(wildcard ...) or $(shell uname) may not work elsewhere,
but it should otherwise build on most/all Unix platforms.

Note that we assume the following POSIX default rules/macros exist, so
we don't bother redefining them:
- pattern rules for compiling .c -> .o
- $(CC)
- $(AR)

Special note on the .pc file generation: we do most variable
replacements in one go, but delay @PREFIX@ so that we can first find
existing substring instances of the prefix value (if libdir/includedir
reside within the prefix), and update them to use a literal pkg-config
variable '${prefix}'. This is fairly compact (one single sed) while
still letting us produce pkg-config files that support runtime
redefinition à la cross-compilation.
2020-04-21 23:49:19 -04:00

10 lines
251 B
PkgConfig

prefix=@PREFIX@
libdir=@LIBDIR@
includedir=@INCLUDEDIR@
Name: tree-sitter
Description: An incremental parsing system for programming tools
URL: https://tree-sitter.github.io/
Version: @VERSION@
Libs: -L${libdir} -ltree-sitter
Cflags: -I${includedir}