]> granicus.if.org Git - poly2tri-c/commitdiff
Add version numbering, pkg-config support and combine all output libs
authorBarak Itkin <lightningismyname@gmail.com>
Fri, 1 Jun 2012 15:03:39 +0000 (18:03 +0300)
committerBarak Itkin <lightningismyname@gmail.com>
Fri, 1 Jun 2012 15:07:40 +0000 (18:07 +0300)
.gitignore
Makefile.am
configure.ac
p2t/Makefile.am
poly2tri-c.pc.in [new file with mode: 0644]
refine/Makefile.am
render/Makefile.am

index 035ad0d098d30fcd9705a1686ddc373d5b7d6a40..5f7c2c24575e5d150b60985287327502277eda34 100644 (file)
@@ -3,6 +3,7 @@ doxygen-doc
 *.lo
 *.a
 *.o
+*.pc
 /*.config
 *Makefile
 *Makefile.in
index 2077ca066dee326a9bb2c719dc580f2862ba75a3..0ddc800e3511165c0dd159a0307b3df7ae816b60 100644 (file)
@@ -1,3 +1,14 @@
 SUBDIRS = p2t refine render bin
 
 ACLOCAL_AMFLAGS = -I m4
+
+AM_LDFLAGS = -version-info $(P2TC_LIBRARY_VERSION)
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = poly2tri-c.pc
+
+lib_LTLIBRARIES = libpoly2tri-c-@P2TC_API_VERSION@.la
+
+libpoly2tri_c_@P2TC_API_VERSION@_la_LIBADD = p2t/libp2tc.la refine/libp2tc-refine.la render/libp2tc-render.la
+libpoly2tri_c_@P2TC_API_VERSION@_la_SOURCES =
+
index 014de59380ddb2541a285e65fd7e9f18142b5795..bb949c1f0b6984f5e6598ca351b0d8ea88c44bca 100644 (file)
@@ -1,5 +1,56 @@
+# Bump on major changes to the library which should not even be
+# compatiable with earlier versions
+m4_define([p2tc_major_version], [0])
+
+# Bump on new features and interface changes (feature releases)
+m4_define([p2tc_minor_version], [0])
+
+# Bump on revisions that do not break the interface (bug-fix releases)
+m4_define([p2tc_micro_version], [0])
+
+# A version string containing all three version numbers
+m4_define([p2tc_real_version],
+          [p2tc_major_version.p2tc_minor_version.p2tc_micro_version])
+m4_define([p2tc_version], [p2tc_real_version])
+
+# The version number used when linking with -llibpoly2tri-c-X.Y
+m4_define([p2tc_api_version], [p2tc_major_version.p2tc_minor_version])
+
+# The version number of the currently implemented interface (bump on
+# every interface change)
+m4_define([lt_current], [0])
+
+# The revision number of the current interface (reset to 0 on every
+# interface change)
+m4_define([lt_revision], [0])
+
+# Number of interfaces implemented minus one. The library should
+# support all interfaces between current minus age and current.
+# Increment by 1 on every new feature addition
+# Reset to 0 if backwards compatiability is broken
+m4_define([lt_age], [0])
+
 # Declare the package details
-AC_INIT([poly2tri-c], [0.9], [lightningismyname@gmail.com])
+AC_INIT([poly2tri-c], p2tc_real_version, [lightningismyname@gmail.com])
+
+P2TC_MAJOR_VERSION=p2tc_major_version
+P2TC_MINOR_VERSION=p2tc_minor_version
+P2TC_MICRO_VERSION=p2tc_micro_version
+P2TC_VERSION=p2tc_version
+P2TC_REAL_VERSION=p2tc_real_version
+P2TC_API_VERSION=p2tc_api_version
+AC_SUBST(P2TC_MAJOR_VERSION)
+AC_SUBST(P2TC_MINOR_VERSION)
+AC_SUBST(P2TC_MICRO_VERSION)
+AC_SUBST(P2TC_VERSION)
+AC_SUBST(P2TC_REAL_VERSION)
+AC_SUBST(P2TC_API_VERSION)
+
+P2TC_RELEASE=p2tc_api_version
+AC_SUBST(P2TC_RELEASE)
+
+P2TC_LIBRARY_VERSION="lt_current:lt_revision:lt_age"
+AC_SUBST(P2TC_LIBRARY_VERSION)
 
 # Output the auxilary build scripts to a subdirectory
 AC_CONFIG_AUX_DIR([build-aux])
@@ -53,6 +104,7 @@ AC_CONFIG_HEADERS([config.h])
 
 # Output these files
 AC_CONFIG_FILES([
+       poly2tri-c.pc           \
        bin/Makefile            \
        p2t/sweep/Makefile      \
        p2t/common/Makefile     \
index 3d41d828aaee61a3280dd8394292377e60723e6b..c635a68281b188c9c7dbf4b057bab1945db3feb5 100644 (file)
@@ -1,6 +1,6 @@
 SUBDIRS = sweep common
 
-lib_LTLIBRARIES = libp2tc.la
+noinst_LTLIBRARIES = libp2tc.la
 
 libp2tc_la_LIBADD = common/libp2tc-common.la sweep/libp2tc-sweep.la
 libp2tc_la_SOURCES =
diff --git a/poly2tri-c.pc.in b/poly2tri-c.pc.in
new file mode 100644 (file)
index 0000000..9642470
--- /dev/null
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: Poly2tri-C
+Description: A 2D constrained Delaunay triangulation and Delaunay refinement library
+Version: @P2TC_REAL_VERSION@
+Requires: glib-2.0
+Libs: -L${libdir} -l@PACKAGE_NAME@-@P2TC_API_VERSION@
+Cflags: -I${includedir}/@PACKAGE_NAME@-@P2TC_API_VERSION@
index 1fc044e2d9c9f50a65c4c4c2100a631a12b7a261..4f9647864045cf14533832ce4b1346aee32be120 100644 (file)
@@ -1,3 +1,3 @@
-lib_LTLIBRARIES = libp2tc-refine.la
+noinst_LTLIBRARIES = libp2tc-refine.la
 
 libp2tc_refine_la_SOURCES = bounded-line.c bounded-line.h cdt.c cdt.h circle.c circle.h cluster.c cluster.h delaunay-terminator.c delaunay-terminator.h edge.c edge.h line.c line.h rmath.c rmath.h mesh.c mesh.h point.c point.h pslg.c pslg.h refine.h triangle.c triangle.h triangulation.h utils.c utils.h vector2.c vector2.h visibility.c visibility.h
index 2c259a08b53e3aa65e67c1399f26e2ae8df1bf19..6aa8fa2095129a406fbfbc59a0e90ff967d734b4 100644 (file)
@@ -1,3 +1,3 @@
-lib_LTLIBRARIES = libp2tc-render.la
+noinst_LTLIBRARIES = libp2tc-render.la
 
 libp2tc_render_la_SOURCES = mesh-render.c mesh-render.h svg-plot.c svg-plot.h