2010-02-23 22:59:30 +08:00
|
|
|
common = utilities.cpp Argument.cpp Constructor.cpp Method.cpp Class.cpp Module.cpp
|
|
|
|
|
|
|
|
|
|
check_PROGRAMS = testSpirit testWrap
|
|
|
|
|
testSpirit_SOURCES = testSpirit.cpp
|
|
|
|
|
testWrap_SOURCES = testWrap.cpp ${common}
|
2009-08-22 06:23:24 +08:00
|
|
|
|
|
|
|
|
# generate local toolbox dir
|
2010-07-14 03:13:07 +08:00
|
|
|
interfacePath = $(top_srcdir)
|
2009-08-22 06:23:24 +08:00
|
|
|
moduleName = gtsam
|
|
|
|
|
toolboxpath = ../toolbox
|
|
|
|
|
nameSpace = "gtsam"
|
2010-10-21 03:08:15 +08:00
|
|
|
mexFlags = "${BOOST_CPPFLAGS} -I${prefix}/include -I${prefix}/include/gtsam/linear -I${prefix}/include/gtsam/nonlinear -I${prefix}/include/gtsam/base -I${prefix}/include/gtsam/geometry -I${prefix}/include/gtsam/slam -L${exec_prefix}/lib -lgtsam"
|
2009-08-22 06:23:24 +08:00
|
|
|
all:
|
|
|
|
|
./wrap ${interfacePath} ${moduleName} ${toolboxpath} ${nameSpace} ${mexFlags}
|
|
|
|
|
|
|
|
|
|
# install the header files
|
2010-07-14 03:13:07 +08:00
|
|
|
noinst_HEADERS = geometry.h utilities.h Argument.h Constructor.h Method.h Class.h Module.h wrap-matlab.h
|
2009-08-22 06:23:24 +08:00
|
|
|
|
2010-07-13 00:36:58 +08:00
|
|
|
noinst_PROGRAMS = wrap
|
|
|
|
|
wrap_SOURCES = ${common} wrap.cpp
|
2010-10-19 05:44:38 +08:00
|
|
|
AM_CPPFLAGS = $(BOOST_CPPFLAGS) -I$(top_srcdir)/.. -DTOPSRCDIR="\"$(top_srcdir)\""
|
2010-07-13 00:36:58 +08:00
|
|
|
AM_CXXFLAGS = -MMD
|
2010-10-19 05:44:38 +08:00
|
|
|
AM_LDFLAGS = $(BOOST_LDFLAGS) -L../CppUnitLite -lCppUnitLite
|
2010-02-23 22:59:30 +08:00
|
|
|
|
2010-08-20 05:24:22 +08:00
|
|
|
TESTS = $(check_PROGRAMS)
|
2010-02-23 22:59:30 +08:00
|
|
|
|
2010-07-13 06:49:21 +08:00
|
|
|
# install the headers and matlab toolbox
|
|
|
|
|
install-exec-hook: all
|
|
|
|
|
install -d ${toolbox}/gtsam && \
|
|
|
|
|
cp -rf ../toolbox/* ${toolbox}/gtsam && \
|
|
|
|
|
install -d ${includedir}/wrap && \
|
2010-07-14 03:13:07 +08:00
|
|
|
cp -f ${srcdir}/wrap-matlab.h ${includedir}/wrap/matlab.h
|
2010-07-13 06:49:21 +08:00
|
|
|
|
2009-08-22 06:23:24 +08:00
|
|
|
# clean local toolbox dir
|
|
|
|
|
clean:
|
|
|
|
|
@test -z "wrap" || rm -f wrap
|
|
|
|
|
@test -z "../toolbox" || rm -rf ../toolbox
|
2009-10-17 12:29:14 +08:00
|
|
|
|
|
|
|
|
# rule to run an executable
|
|
|
|
|
%.run: % libgtsam.la
|
|
|
|
|
./$^
|