https://svn.lrde.epita.fr/svn/oln/trunk/external/trimesh
Index: ChangeLog
from Roland Levillain <roland(a)lrde.epita.fr>
Libtoolize trimesh.
* configure.ac: Check for Libtool.
* utilsrc/Makefile.am (LDADD): Remove `-L$(top_builddir)/gluit'.
(GLFLAGS, GLLIBS): Move gluit-related link variables...
* gluit/gluit.mk: ...here (new file).
* gluit/Makefile.am (lib_LIBRARIES, libgluit_a_SOURCES)
* libsrc/Makefile.am (lib_LIBRARIES, libtrimesh_a_SOURCES):
Turn into...
* gluit/Makefile.am (lib_LTLIBRARIES, libgluit_la_SOURCES)
* libsrc/Makefile.am (lib_LTLIBRARIES, libtrimesh_la_SOURCES):
...these.
configure.ac | 3 +++
gluit/Makefile.am | 7 +++----
gluit/gluit.mk | 16 ++++++++++++++++
libsrc/Makefile.am | 4 ++--
utilsrc/Makefile.am | 15 ++++++---------
5 files changed, 30 insertions(+), 15 deletions(-)
Index: configure.ac
--- configure.ac (revision 2108)
+++ configure.ac (working copy)
@@ -41,6 +41,9 @@
## Libraries set up. ##
## ------------------ ##
+# Use Libtool.
+AC_PROG_LIBTOOL
+
# Check for Darwin.
AC_CANONICAL_HOST
AM_CONDITIONAL([DARWIN], [echo "$host_os" | grep '^darwin'])
Index: utilsrc/Makefile.am
--- utilsrc/Makefile.am (revision 2108)
+++ utilsrc/Makefile.am (working copy)
@@ -1,16 +1,13 @@
## Process this file through Automake to produce Makefile.in -*- Makefile -*-
+# Linking with gluit and GLUT/OpenGL.
+gluit_builddir = $(top_builddir)/gluit
+include $(top_srcdir)/gluit/gluit.mk
+
+
AM_CPPFLAGS = -I$(top_srcdir)/include
-LDADD = -L$(top_builddir)/libsrc -L$(top_builddir)/gluit -ltrimesh -lm
+LDADD = -L$(top_builddir)/libsrc -ltrimesh -lm
-# FIXME: Handle other OSes as well (Win32, SunOS, etc.)
-if DARWIN
- GLFLAGS = -framework GLUT -framework OpenGL
- GLLIBS = -lgluit
-else !DARWIN
- GLFLAGS =
- GLLIBS = -lgluit -lGL -lGLU -lX11 -lXmu -lXi
-endif !DARWIN
bin_PROGRAMS = \
mesh_align \
Index: gluit/gluit.mk
--- gluit/gluit.mk (revision 0)
+++ gluit/gluit.mk (revision 0)
@@ -0,0 +1,16 @@
+## Linking with gluit and GLUT/OpenGL. -*- Automake -*-
+
+## ------------------------------------------------------------------ ##
+## Before loading this file, you must define `gluit_builddir' first. ##
+## ------------------------------------------------------------------ ##
+
+GLFLAGS = -L$(gluit_builddir)
+GLLIBS = -lgluit
+
+# FIXME: Handle other OSes as well (Win32, SunOS, etc.)
+if DARWIN
+ GLFLAGS += -L$(gluit_builddir) -framework GLUT -framework OpenGL
+else !DARWIN
+ GLFLAGS += -L$(gluit_builddir)
+ GLLIBS += -lGL -lGLU -lX11 -lXmu -lXi
+endif !DARWIN
Index: gluit/Makefile.am
--- gluit/Makefile.am (revision 2108)
+++ gluit/Makefile.am (working copy)
@@ -4,10 +4,9 @@
AM_CPPFLAGS = -I$(top_builddir)
AM_CPPFLAGS += -I$(top_srcdir)/include -I$(top_srcdir)/include/GL
-# FIXME: We should use Libtool instead.
-lib_LIBRARIES = libgluit.a
+lib_LTLIBRARIES = libgluit.la
-libgluit_a_SOURCES = \
+libgluit_la_SOURCES = \
glui_algebra3.h \
glui_arcball.h \
glui_quaternion.h \
@@ -64,7 +63,7 @@
# These files are not needed on Darwin (Mac OS X).
if ! DARWIN
- libgluit_a_SOURCES += \
+ libgluit_la_SOURCES += \
freeglut_internal.h \
freeglut_teapot_data.h \
\
Index: libsrc/Makefile.am
--- libsrc/Makefile.am (revision 2108)
+++ libsrc/Makefile.am (working copy)
@@ -3,9 +3,9 @@
AM_CPPFLAGS = -I$(top_srcdir)/include
# FIXME: We should use Libtool instead.
-lib_LIBRARIES = libtrimesh.a
+lib_LTLIBRARIES = libtrimesh.la
-libtrimesh_a_SOURCES = \
+libtrimesh_la_SOURCES = \
TriMesh_bounding.cc \
TriMesh_connectivity.cc \
TriMesh_curvature.cc \