https://svn.lrde.epita.fr/svn/oln/trunk/milena
Index: ChangeLog
from Roland Levillain <roland(a)lrde.epita.fr>
Add support for Autotools in apps/statues/.
* Makefile.am (SUBDIRS): Add apps.
* apps/Makefile.am: New.
* apps/statues/test: Rename as...
* apps/statues/test.in: ...this.
(mesh_dir): Depend on @top_srcdir@.
* apps/statues/Makefile: Rename as...
* apps/statues/Makefile.am: ...this.
Convert this Makefile to Automake.
Makefile.am | 2 +-
apps/Makefile.am | 3 +++
apps/statues/Makefile.am | 38 +++++++++-----------------------------
apps/statues/test.in | 2 +-
4 files changed, 14 insertions(+), 31 deletions(-)
Index: Makefile.am
--- Makefile.am (revision 2046)
+++ Makefile.am (working copy)
@@ -1,6 +1,6 @@
## Process this file through Automake to create Makefile.in -*- Makefile -*-
-SUBDIRS = doc tests tools
+SUBDIRS = doc tests tools apps
.PHONY: doc
doc:
Index: apps/statues/test.in
--- apps/statues/test.in (revision 2046)
+++ apps/statues/test.in (working copy)
@@ -2,7 +2,7 @@
set -ex
-mesh_dir=../../../mesh
+mesh_dir=@top_srcdir@/milena/mesh
time ./mesh-segm $mesh_dir/socket.off 25 socket-segm.off
time ./mesh-segm $mesh_dir/teapot.off 50 teapot-segm.off
Index: apps/statues/Makefile.am
--- apps/statues/Makefile.am (revision 2046)
+++ apps/statues/Makefile.am (working copy)
@@ -1,33 +1,13 @@
-# To be redefined if TriMesh is located elsewhere.
-# FIXME: Trimesh could be part of the Olena distribution, as a
-# dependency. Or we could just rewrite the required features (I/O &
-# curvature computation).
-TRIMESH = $(HOME)/opt/trimesh2
-
-# Warning: we should use the same compiler as the one that was used to
-# compile TriMesh to avoid any ABI-related problems.
+## Process this file through Automake to produce Makefile.in -*- Makefile -*-
+# Find Milena and trimesh headers.
+AM_CPPFLAGS = -I$(top_srcdir)/milena -I$(top_srcdir)/external/trimesh/include
# Produce fast code.
-CXXFLAGS = -O3 -DNDEBUG -ggdb
-# Produce debuggable code.
-#CXXFLAGS = -O0 -ggdb -fno-inline -fno-default-inline
-
-# Milena and Trimesh paths.
-CPPFLAGS = -I../../../ -I$(TRIMESH)/include
-# Link with Trimesh.
-LDFLAGS = -L$(TRIMESH)/lib.Darwin -ltrimesh
-
-all: mesh-segm
-
-mesh-segm.o: mesh-segm.cc io.hh
-mesh-segm: mesh-segm.o
- $(CXX) -o $@ $(LDFLAGS) $<
-
-check: mesh-segm test
- ./test
+AM_CXXFLAGS = -O3 -DNDEBUG -ggdb
+# Find trimesh archive.
+AM_LDFLAGS = -L$(top_builddir)/external/trimesh/libsrc -ltrimesh
-CLEANFILES = mesh-segm.o mesh-segm
-clean:
- rm -f $(CLEANFILES)
+bin_PROGRAMS = mesh-segm
+mesh_segm_SOURCES = mesh-segm.cc io.hh
-.PHONY: all clean check
+TESTS = test
Index: apps/Makefile.am
--- apps/Makefile.am (revision 0)
+++ apps/Makefile.am (revision 0)
@@ -0,0 +1,3 @@
+## Process this file through Automake to produce Makefile.in -*- Makefile -*-
+
+SUBDIRS = statues