From aae8ed38094522df1e968b48ec658311424393b3 Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Thu, 11 May 2017 09:09:41 +0200 Subject: [PATCH] add pkg-config file for shared library --- .gitignore | 1 + makefile.shared | 5 +++++ tomsfastmath.pc.in | 4 ++++ 3 files changed, 10 insertions(+) create mode 100644 tomsfastmath.pc.in diff --git a/.gitignore b/.gitignore index 8737c25..86cc8af 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,7 @@ .cproject /.libs test_*.txt +*.pc *.gcda *.gcno diff --git a/makefile.shared b/makefile.shared index c2f72df..78f056d 100644 --- a/makefile.shared +++ b/makefile.shared @@ -15,6 +15,7 @@ UNINSTALL_CMD = $(LT) --mode=uninstall rm include makefile_include.mk +VERSION := $(shell [ -e .git ] && { git describe --tags --abbrev=0 | sed -e 's/^v//' ; } || echo $(VERSION)) #START_INS OBJECTS=src/addsub/fp_add.o src/addsub/fp_add_d.o src/addsub/fp_addmod.o src/addsub/fp_cmp.o \ @@ -59,8 +60,12 @@ $(LIBNAME): $(OBJECTS) $(LT) --mode=link --tag=CC $(CC) $(CFLAGS) $(LDFLAGS) $(LOBJECTS) -o $(LIBNAME) -rpath $(LIBPATH) -version-info $(VERSION_LIB) -export-symbols libtfm.symbols install: .common_install + sed -e 's,^Version:.*,Version: $(VERSION),' tomsfastmath.pc.in > tomsfastmath.pc + install -d $(LIBPATH)/pkgconfig + install -m 644 tomsfastmath.pc $(LIBPATH)/pkgconfig/ uninstall: .common_uninstall + rm $(LIBPATH)/pkgconfig/tomsfastmath.pc mtest/mtest: mtest/mtest.c cd mtest ; make mtest diff --git a/tomsfastmath.pc.in b/tomsfastmath.pc.in new file mode 100644 index 0000000..2570a48 --- /dev/null +++ b/tomsfastmath.pc.in @@ -0,0 +1,4 @@ +Name: TomFastMath +Description: Fast multiple-precision integer library +Version: @VERSION@ +Libs: -ltfm