]> granicus.if.org Git - poly2tri-c/commitdiff
Use libtool to build and configure libraries
authorBarak Itkin <lightningismyname@gmail.com>
Sat, 5 May 2012 14:32:17 +0000 (17:32 +0300)
committerBarak Itkin <lightningismyname@gmail.com>
Sat, 5 May 2012 14:32:17 +0000 (17:32 +0300)
.gitignore
Makefile.am
bin/Makefile.am
configure.ac
m4macros/.gitignore [new file with mode: 0644]
p2t/Makefile.am
p2t/common/Makefile.am
p2t/sweep/Makefile.am
refine/Makefile.am
render/Makefile.am

index a0ec01b96349b689dd9554399beec7480c7a9e3c..afa137ae67564a9bb9904715babdc090af53de6d 100644 (file)
@@ -7,6 +7,7 @@ doxygen-doc
 *Makefile
 *Makefile.in
 *.deps/
+*.libs/
 /aclocal.m4
 /autom4te.cache
 /build-aux
@@ -16,4 +17,5 @@ doxygen-doc
 /config.log
 /config.status
 /configure
+/libtool
 /stamp-h1
index 4ba40699e198a945e85dd6ee738a2e649cdd9a09..2077ca066dee326a9bb2c719dc580f2862ba75a3 100644 (file)
@@ -1 +1,3 @@
 SUBDIRS = p2t refine render bin
+
+ACLOCAL_AMFLAGS = -I m4
index e7c2a2ad05356f2d0aa1ddc006c7995561f4c44c..e580fc64c354ce346b522977b2f6ea829ce6d218 100644 (file)
@@ -1,2 +1,3 @@
-bin_PROGRAMS = poly2tri-c-test
-poly2tri_c_test_SOURCES = main.c
+bin_PROGRAMS = p2tc-test
+p2tc_test_SOURCES = main.c
+p2tc_test_LDADD = ../p2t/libp2tc.la ../refine/libp2tc-refine.la ../render/libp2tc-render.la
index ae35415ac6ec08e80a8cc81328c9eb45f93bbc7d..045c94f4f96ded85a0a62dab3f1459c019514fd5 100644 (file)
@@ -4,16 +4,25 @@ AC_INIT([poly2tri-c], [0.9], [lightningismyname@gmail.com])
 # Output the auxilary build scripts to a subdirectory
 AC_CONFIG_AUX_DIR([build-aux])
 
-# Relax some of the GNU requirements
+# Tell autoconf where to look for macros
+AC_CONFIG_MACRO_DIR([m4macros])
+
 # Initialize Automake with the following settings:
+# Relax some of the GNU requirements
 # Report all potential warnings and report all warnings as errors
 AM_INIT_AUTOMAKE([foreign -Wall -Werror])
 
+# Initialize libtool
+LT_INIT
+
 # Find a C compiler
 AC_PROG_CC
 
-# Find a library make
-AC_PROG_RANLIB
+# Find the standard math functions
+# Taken from http://www.flameeyes.eu/autotools-mythbuster/autoconf/finding.html
+AC_SEARCH_LIBS([log10], [m], [], [
+  AC_MSG_ERROR([unable to find the log10() function])
+])
 
 # Find GLib support via pkg-config
 PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.28])
diff --git a/m4macros/.gitignore b/m4macros/.gitignore
new file mode 100644 (file)
index 0000000..464ba5c
--- /dev/null
@@ -0,0 +1,5 @@
+libtool.m4
+lt~obsolete.m4
+ltoptions.m4
+ltsugar.m4
+ltversion.m4
index fa1726eb7c6fc6bbcc65e9000d54cce9de5510e0..3d41d828aaee61a3280dd8394292377e60723e6b 100644 (file)
@@ -1,5 +1,6 @@
 SUBDIRS = sweep common
-lib_LIBRARIES = libp2t-c.a
 
-libp2t_c_a_LIBADD = common/libp2tcommon.a sweep/libp2tsweep.a
-libp2t_c_a_SOURCES =
+lib_LTLIBRARIES = libp2tc.la
+
+libp2tc_la_LIBADD = common/libp2tc-common.la sweep/libp2tc-sweep.la
+libp2tc_la_SOURCES =
index 8ad238ab3287d859e7ebffafb965055cfab8288d..1b629ea68a6f7778577a2269c14f589038c30fe9 100644 (file)
@@ -1,2 +1,2 @@
-noinst_LIBRARIES = libp2tcommon.a
-libp2tcommon_a_SOURCES = cutils.h poly2tri-private.h shapes.c shapes.h utils.c utils.h
+noinst_LTLIBRARIES = libp2tc-common.la
+libp2tc_common_la_SOURCES = cutils.h poly2tri-private.h shapes.c shapes.h utils.c utils.h
index a5c37019bfcc562cdd069f172e271b31973a356c..7fb581e40538a661af904d7ea743b237745050d3 100644 (file)
@@ -1,2 +1,2 @@
-noinst_LIBRARIES = libp2tsweep.a
-libp2tsweep_a_SOURCES = advancing_front.c advancing_front.h cdt.c cdt.h sweep.c sweep_context.c sweep_context.h sweep.h
+noinst_LTLIBRARIES = libp2tc-sweep.la
+libp2tc_sweep_la_SOURCES = advancing_front.c advancing_front.h cdt.c cdt.h sweep.c sweep_context.c sweep_context.h sweep.h
index 99341bb5e15291c88a8ceb62a2447069fc2cac1b..a087eb891e71a907761b608b283b9898f071f994 100644 (file)
@@ -1,3 +1,3 @@
-lib_LIBRARIES = libp2t-c-refine.a
+lib_LTLIBRARIES = libp2tc-refine.la
 
-libp2t_c_refine_a_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 math.c math.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
+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 math.c math.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 a035875d3c99829297dab91da0a17a79b048732d..2c259a08b53e3aa65e67c1399f26e2ae8df1bf19 100644 (file)
@@ -1,3 +1,3 @@
-lib_LIBRARIES = libp2t-c-render.a
+lib_LTLIBRARIES = libp2tc-render.la
 
-libp2t_c_render_a_SOURCES = mesh-render.c mesh-render.h svg-plot.c svg-plot.h
+libp2tc_render_la_SOURCES = mesh-render.c mesh-render.h svg-plot.c svg-plot.h