diff --git a/.cproject b/.cproject index e538a27cf..ef2dd0bc9 100644 --- a/.cproject +++ b/.cproject @@ -1118,6 +1118,38 @@ true true + + make + + check + true + true + true + + + make + + clean + true + true + true + + + make + + install + true + true + true + + + make + + all + true + true + true + diff --git a/README b/README index 0f794acde..4fae6798a 100644 --- a/README +++ b/README @@ -68,7 +68,7 @@ Installation: ------------- To finally install the library go into the directory where you unpacked the GTSAM library, run the command below for example: -$]./configure --with-toolbox=$HOME/toolbox/ --with-boost=/opt/local/include/ +$] ./configure --with-toolbox=$HOME/toolbox/ --with-boost=/opt/local/include/ where the path after --with-toolbox should point to the directory you want to have the gtsam matlab scripts installed in. @@ -90,6 +90,19 @@ Type: $] make $] make install +Parallel Build +---------------- + +The above will put object files and executables in the source directories. If you like, it is +very easy to configure the libraries to put all these in a parallel build tree so they do not +clutter the source tree. To do this, instead of running configure in the gtsam directory itself, +run it in sub-directory of choice, e.g.: + +$] mkdir build +$] cd build +$] ../configure --with-toolbox=$HOME/toolbox/ --with-boost=/opt/local/include/ +$] make install + Built-in Unit Tests: ---------------- There is one more optional step in which you can invoke the unit tests included in the gtsam libraries. diff --git a/base/Makefile.am b/base/Makefile.am index 1c6619163..b9ccaca34 100644 --- a/base/Makefile.am +++ b/base/Makefile.am @@ -40,7 +40,7 @@ pkginclude_HEADERS = $(headers) noinst_LTLIBRARIES = libbase.la libbase_la_SOURCES = $(sources) -AM_CPPFLAGS = -I$(boost) +AM_CPPFLAGS = -I$(boost) -I$(top_srcdir) if USE_BLAS AM_CPPFLAGS += -DGT_USE_CBLAS diff --git a/geometry/Makefile.am b/geometry/Makefile.am index e137d1ab8..27220a154 100644 --- a/geometry/Makefile.am +++ b/geometry/Makefile.am @@ -32,7 +32,7 @@ headers += $(sources:.cpp=.h) pkginclude_HEADERS = $(headers) noinst_LTLIBRARIES = libgeometry.la libgeometry_la_SOURCES = $(sources) -AM_CPPFLAGS = -I$(boost) -I../base +AM_CPPFLAGS = -I$(boost) -I$(top_srcdir) -I$(top_srcdir)/base #---------------------------------------------------------------------------------------------------- # rules to build local programs diff --git a/inference/Makefile.am b/inference/Makefile.am index b3eb3178c..6e928f206 100644 --- a/inference/Makefile.am +++ b/inference/Makefile.am @@ -52,7 +52,7 @@ headers += $(sources:.cpp=.h) pkginclude_HEADERS = $(headers) noinst_LTLIBRARIES = libinference.la libinference_la_SOURCES = $(sources) -AM_CPPFLAGS = -I$(boost) -I../colamd -I../base +AM_CPPFLAGS = -I$(boost) -I$(top_srcdir) -I$(top_srcdir)/colamd -I$(top_srcdir)/base AM_CXXFLAGS = #---------------------------------------------------------------------------------------------------- diff --git a/linear/Makefile.am b/linear/Makefile.am index e9034d996..56ef4ea2c 100644 --- a/linear/Makefile.am +++ b/linear/Makefile.am @@ -41,7 +41,7 @@ headers += $(sources:.cpp=.h) pkginclude_HEADERS = $(headers) noinst_LTLIBRARIES = liblinear.la liblinear_la_SOURCES = $(sources) -AM_CPPFLAGS = -I$(boost) -I../colamd -I../base -I../inference +AM_CPPFLAGS = -I$(boost) -I$(top_srcdir) -I$(top_srcdir)/colamd -I$(top_srcdir)/base -I$(top_srcdir)/inference AM_CXXFLAGS = #---------------------------------------------------------------------------------------------------- diff --git a/myconfigure b/myconfigure index 2e75d2eeb..521ffc4d5 100755 --- a/myconfigure +++ b/myconfigure @@ -1 +1 @@ -./configure --prefix=$HOME --with-toolbox=$HOME/toolbox/ --with-boost=/opt/local/include/ CXXFLAGS=" -O2 -march=core2 -DNDEBUG" --disable-static --enable-blas --enable-lapack +cd build && ../configure --prefix=$HOME --with-toolbox=$HOME/toolbox/ --with-boost=/opt/local/include/ CXXFLAGS=" -O2 -march=core2 -DNDEBUG" --disable-static --enable-blas --enable-lapack diff --git a/nonlinear/Makefile.am b/nonlinear/Makefile.am index 0f953e18f..97cd3903d 100644 --- a/nonlinear/Makefile.am +++ b/nonlinear/Makefile.am @@ -38,7 +38,7 @@ headers += $(sources:.cpp=.h) pkginclude_HEADERS = $(headers) noinst_LTLIBRARIES = libnonlinear.la libnonlinear_la_SOURCES = $(sources) -AM_CPPFLAGS = -I$(boost) -I../colamd -I../base -I../inference -I../linear +AM_CPPFLAGS = -I$(boost) -I$(top_srcdir) -I$(top_srcdir)/colamd -I$(top_srcdir)/base -I$(top_srcdir)/inference -I$(top_srcdir)/linear AM_CXXFLAGS = #---------------------------------------------------------------------------------------------------- diff --git a/slam/Makefile.am b/slam/Makefile.am index a67ce5895..0f8b2df43 100644 --- a/slam/Makefile.am +++ b/slam/Makefile.am @@ -57,7 +57,8 @@ headers += $(sources:.cpp=.h) pkginclude_HEADERS = $(headers) noinst_LTLIBRARIES = libslam.la libslam_la_SOURCES = $(sources) -AM_CPPFLAGS = -I$(boost) -I../colamd -I../base -I../inference -I../linear -I../nonlinear -I../geometry +AM_CPPFLAGS = -I$(boost) -I$(top_srcdir) -I$(top_srcdir)/colamd -I$(top_srcdir)/base -I$(top_srcdir)/inference +AM_CPPFLAGS += -I$(top_srcdir)/linear -I$(top_srcdir)/nonlinear -I$(top_srcdir)/geometry #---------------------------------------------------------------------------------------------------- # rules to build local programs diff --git a/slam/testGaussianISAM2 b/slam/testGaussianISAM2 deleted file mode 100755 index 254ee845f..000000000 Binary files a/slam/testGaussianISAM2 and /dev/null differ diff --git a/tests/Makefile.am b/tests/Makefile.am index caa4353d0..973a80b73 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -18,8 +18,8 @@ noinst_PROGRAMS = timeGaussianFactorGraph # rules to build unit tests #---------------------------------------------------------------------------------------------------- TESTS = $(check_PROGRAMS) -AM_CPPFLAGS = -I$(boost) -I../colamd -AM_CPPFLAGS += -I../base -I../geometry -I../inference -I../linear -I../nonlinear -I../slam +AM_CPPFLAGS = -I$(boost) -I$(top_srcdir)/colamd -I$(top_srcdir)/base -I$(top_srcdir)/geometry +AM_CPPFLAGS += -I$(top_srcdir) -I$(top_srcdir)/inference -I$(top_srcdir)/linear -I$(top_srcdir)/nonlinear -I$(top_srcdir)/slam AM_LDFLAGS = $(BOOST_LDFLAGS) $(boost_serialization) LDADD = ../libgtsam.la ../CppUnitLite/libCppUnitLite.a AM_DEFAULT_SOURCE_EXT = .cpp diff --git a/wrap/Makefile.am b/wrap/Makefile.am index 4ea34ad47..46702b312 100644 --- a/wrap/Makefile.am +++ b/wrap/Makefile.am @@ -5,7 +5,7 @@ testSpirit_SOURCES = testSpirit.cpp testWrap_SOURCES = testWrap.cpp ${common} # generate local toolbox dir -interfacePath = ../ +interfacePath = $(top_srcdir) moduleName = gtsam toolboxpath = ../toolbox nameSpace = "gtsam" @@ -14,11 +14,11 @@ all: ./wrap ${interfacePath} ${moduleName} ${toolboxpath} ${nameSpace} ${mexFlags} # install the header files -include_HEADERS = geometry.h utilities.h Argument.h Constructor.h Method.h Class.h Module.h wrap-matlab.h +noinst_HEADERS = geometry.h utilities.h Argument.h Constructor.h Method.h Class.h Module.h wrap-matlab.h noinst_PROGRAMS = wrap wrap_SOURCES = ${common} wrap.cpp -AM_CPPFLAGS = -I$(boost) +AM_CPPFLAGS = -I$(boost) -I$(top_srcdir) AM_CXXFLAGS = -MMD AM_LDFLAGS = -L../CppUnitLite -lCppUnitLite $(BOOST_LDFLAGS) @@ -29,7 +29,7 @@ install-exec-hook: all install -d ${toolbox}/gtsam && \ cp -rf ../toolbox/* ${toolbox}/gtsam && \ install -d ${includedir}/wrap && \ - cp -f wrap-matlab.h ${includedir}/wrap/matlab.h + cp -f ${srcdir}/wrap-matlab.h ${includedir}/wrap/matlab.h # clean local toolbox dir clean: