Adding libtoml.pc for pkg-config (#63)

This commit is contained in:
ownesis 2021-12-11 02:01:52 +01:00 committed by GitHub
parent 310f02dd67
commit 8434e75006
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 0 deletions

View file

@ -2,6 +2,7 @@ HFILES = toml.h
CFILES = toml.c CFILES = toml.c
OBJ = $(CFILES:.c=.o) OBJ = $(CFILES:.c=.o)
EXEC = toml_json toml_cat toml_sample EXEC = toml_json toml_cat toml_sample
PCFILE = libtoml.pc
CFLAGS = -std=c99 -Wall -Wextra -fpic CFLAGS = -std=c99 -Wall -Wextra -fpic
LIB_VERSION = 1.0 LIB_VERSION = 1.0
@ -41,6 +42,7 @@ install: all
install toml.h ${prefix}/include install toml.h ${prefix}/include
install $(LIB) ${prefix}/lib install $(LIB) ${prefix}/lib
install $(LIB_SHARED) ${prefix}/lib install $(LIB_SHARED) ${prefix}/lib
install $(PCFILE) /usr/lib/pkgconfig
clean: clean:
rm -f *.o $(EXEC) $(LIB) $(LIB_SHARED) rm -f *.o $(EXEC) $(LIB) $(LIB_SHARED)

11
libtoml.pc Normal file
View file

@ -0,0 +1,11 @@
prefix=/usr/local/
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: libtoml
URL: https://github.com/cktan/tomlc99/
Description: TOML C library in c99.
Version: v1.0
Libs: -L${libdir} -ltoml
Cflags: -I${includedir}