add pkg-config file for shared library

This commit is contained in:
Steffen Jaeckel 2017-05-09 14:25:11 +02:00
parent d2e8179c21
commit f40568ba1e
3 changed files with 14 additions and 0 deletions

1
.gitignore vendored
View File

@ -45,6 +45,7 @@ mtest.exe
*.pdf
*.out
tommath.tex
libtommath.pc
# ignore files generated by testme.sh
gcc_errors_*.txt

10
libtommath.pc.in Normal file
View File

@ -0,0 +1,10 @@
prefix=@to-be-replaced@
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: LibTomMath
Description: public domain library for manipulating large integer numbers
Version: @to-be-replaced@
Libs: -L${libdir} -ltommath
Cflags: -I${includedir}

View File

@ -55,6 +55,9 @@ install: $(LIBNAME)
install -d $(INCPATH)
$(LT) --mode=install install -c $(LIBNAME) $(LIBPATH)/$(LIBNAME)
install -m 644 $(HEADERS_PUB) $(INCPATH)
sed -e 's,^prefix=.*,prefix=$(DESTDIR),' -e 's,^Version:.*,Version: $(VERSION),' libtommath.pc.in > libtommath.pc
install -d $(LIBPATH)/pkgconfig
install -m 644 libtommath.pc $(LIBPATH)/pkgconfig/
test: $(LIBNAME) demo/demo.o
$(CC) $(CFLAGS) -c demo/demo.c -o demo/demo.o