https://svn.lrde.epita.fr/svn/oln/trunk/external/trimesh
Index: ChangeLog
from Roland Levillain <roland(a)lrde.epita.fr>
Fix the linkage of trimesh utilities on GNU/Linux.
* utilsrc/Makefile.am (AM_LDFLAGS): Rename as..
(LDADD): ...this.
Put `-lm' after `-ltrimesh'.
(GLFLAGS): New.
(GLLIBS) [DARWIN]: Move `-framework GLUT -framework OpenGL'...
(GLFLAGS) [DARWIN]: ...here.
(mesh_view_LDFLAGS): s/GLLIBS/GLFLAGS/.
(mesh_view_LDADD): New.
Set to $(LDADD) $(GLLIBS).
Makefile.am | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
Index: utilsrc/Makefile.am
--- utilsrc/Makefile.am (revision 2064)
+++ utilsrc/Makefile.am (working copy)
@@ -1,13 +1,14 @@
## Process this file through Automake to produce Makefile.in -*- Makefile -*-
AM_CPPFLAGS = -I$(top_srcdir)/include
-AM_LDFLAGS = -L$(top_builddir)/libsrc -L$(top_builddir)/gluit -lm -ltrimesh
+LDADD = -L$(top_builddir)/libsrc -L$(top_builddir)/gluit -ltrimesh -lm
# FIXME: Handle other OSes as well (Win32, SunOS, etc.)
if DARWIN
-# LIBS += -lobjc
- GLLIBS = -framework GLUT -framework OpenGL -lgluit
+ GLFLAGS = -framework GLUT -framework OpenGL
+ GLLIBS = -lgluit
else !DARWIN
+ GLFLAGS =
GLLIBS = -lgluit -lGL -lGLU -lX11 -lXmu -lXi
endif !DARWIN
@@ -28,4 +29,5 @@
mesh_shade_SOURCES = mesh_shade.cc
mesh_view_SOURCES = mesh_view.cc
-mesh_view_LDFLAGS = $(AM_LDFLAGS) $(GLLIBS)
+mesh_view_LDFLAGS = $(AM_LDFLAGS) $(GLFLAGS)
+mesh_view_LDADD = $(LDADD) $(GLLIBS)