Adding libtoml.pc for pkg-config (#63)
This commit is contained in:
parent
310f02dd67
commit
8434e75006
2 changed files with 13 additions and 0 deletions
2
Makefile
2
Makefile
|
@ -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
11
libtoml.pc
Normal 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}
|
Loading…
Reference in a new issue