Fix makefiles to refer to $(top_srcdir) to enable parallel build

release/4.3a0
Frank Dellaert 2010-07-13 19:13:07 +00:00
parent 559eaf8cc1
commit 30b377e441
12 changed files with 60 additions and 14 deletions

View File

@ -1118,6 +1118,38 @@
<useDefaultCommand>true</useDefaultCommand> <useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders> <runAllBuilders>true</runAllBuilders>
</target> </target>
<target name="check" path="build" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>check</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="clean" path="build" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>clean</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="install" path="build" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>install</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="all" path="build" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>all</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
</buildTargets> </buildTargets>
</storageModule> </storageModule>
</cconfiguration> </cconfiguration>

15
README
View File

@ -68,7 +68,7 @@ Installation:
------------- -------------
To finally install the library go into the directory where you unpacked the To finally install the library go into the directory where you unpacked the
GTSAM library, run the command below for example: 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 where the path after --with-toolbox should point to the directory you want to have the gtsam
matlab scripts installed in. matlab scripts installed in.
@ -90,6 +90,19 @@ Type:
$] make $] make
$] make install $] 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: Built-in Unit Tests:
---------------- ----------------
There is one more optional step in which you can invoke the unit tests included in the gtsam libraries. There is one more optional step in which you can invoke the unit tests included in the gtsam libraries.

View File

@ -40,7 +40,7 @@ pkginclude_HEADERS = $(headers)
noinst_LTLIBRARIES = libbase.la noinst_LTLIBRARIES = libbase.la
libbase_la_SOURCES = $(sources) libbase_la_SOURCES = $(sources)
AM_CPPFLAGS = -I$(boost) AM_CPPFLAGS = -I$(boost) -I$(top_srcdir)
if USE_BLAS if USE_BLAS
AM_CPPFLAGS += -DGT_USE_CBLAS AM_CPPFLAGS += -DGT_USE_CBLAS

View File

@ -32,7 +32,7 @@ headers += $(sources:.cpp=.h)
pkginclude_HEADERS = $(headers) pkginclude_HEADERS = $(headers)
noinst_LTLIBRARIES = libgeometry.la noinst_LTLIBRARIES = libgeometry.la
libgeometry_la_SOURCES = $(sources) 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 # rules to build local programs

View File

@ -52,7 +52,7 @@ headers += $(sources:.cpp=.h)
pkginclude_HEADERS = $(headers) pkginclude_HEADERS = $(headers)
noinst_LTLIBRARIES = libinference.la noinst_LTLIBRARIES = libinference.la
libinference_la_SOURCES = $(sources) 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 = AM_CXXFLAGS =
#---------------------------------------------------------------------------------------------------- #----------------------------------------------------------------------------------------------------

View File

@ -41,7 +41,7 @@ headers += $(sources:.cpp=.h)
pkginclude_HEADERS = $(headers) pkginclude_HEADERS = $(headers)
noinst_LTLIBRARIES = liblinear.la noinst_LTLIBRARIES = liblinear.la
liblinear_la_SOURCES = $(sources) 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 = AM_CXXFLAGS =
#---------------------------------------------------------------------------------------------------- #----------------------------------------------------------------------------------------------------

View File

@ -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

View File

@ -38,7 +38,7 @@ headers += $(sources:.cpp=.h)
pkginclude_HEADERS = $(headers) pkginclude_HEADERS = $(headers)
noinst_LTLIBRARIES = libnonlinear.la noinst_LTLIBRARIES = libnonlinear.la
libnonlinear_la_SOURCES = $(sources) 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 = AM_CXXFLAGS =
#---------------------------------------------------------------------------------------------------- #----------------------------------------------------------------------------------------------------

View File

@ -57,7 +57,8 @@ headers += $(sources:.cpp=.h)
pkginclude_HEADERS = $(headers) pkginclude_HEADERS = $(headers)
noinst_LTLIBRARIES = libslam.la noinst_LTLIBRARIES = libslam.la
libslam_la_SOURCES = $(sources) 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 # rules to build local programs

Binary file not shown.

View File

@ -18,8 +18,8 @@ noinst_PROGRAMS = timeGaussianFactorGraph
# rules to build unit tests # rules to build unit tests
#---------------------------------------------------------------------------------------------------- #----------------------------------------------------------------------------------------------------
TESTS = $(check_PROGRAMS) TESTS = $(check_PROGRAMS)
AM_CPPFLAGS = -I$(boost) -I../colamd AM_CPPFLAGS = -I$(boost) -I$(top_srcdir)/colamd -I$(top_srcdir)/base -I$(top_srcdir)/geometry
AM_CPPFLAGS += -I../base -I../geometry -I../inference -I../linear -I../nonlinear -I../slam 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) AM_LDFLAGS = $(BOOST_LDFLAGS) $(boost_serialization)
LDADD = ../libgtsam.la ../CppUnitLite/libCppUnitLite.a LDADD = ../libgtsam.la ../CppUnitLite/libCppUnitLite.a
AM_DEFAULT_SOURCE_EXT = .cpp AM_DEFAULT_SOURCE_EXT = .cpp

View File

@ -5,7 +5,7 @@ testSpirit_SOURCES = testSpirit.cpp
testWrap_SOURCES = testWrap.cpp ${common} testWrap_SOURCES = testWrap.cpp ${common}
# generate local toolbox dir # generate local toolbox dir
interfacePath = ../ interfacePath = $(top_srcdir)
moduleName = gtsam moduleName = gtsam
toolboxpath = ../toolbox toolboxpath = ../toolbox
nameSpace = "gtsam" nameSpace = "gtsam"
@ -14,11 +14,11 @@ all:
./wrap ${interfacePath} ${moduleName} ${toolboxpath} ${nameSpace} ${mexFlags} ./wrap ${interfacePath} ${moduleName} ${toolboxpath} ${nameSpace} ${mexFlags}
# install the header files # 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 noinst_PROGRAMS = wrap
wrap_SOURCES = ${common} wrap.cpp wrap_SOURCES = ${common} wrap.cpp
AM_CPPFLAGS = -I$(boost) AM_CPPFLAGS = -I$(boost) -I$(top_srcdir)
AM_CXXFLAGS = -MMD AM_CXXFLAGS = -MMD
AM_LDFLAGS = -L../CppUnitLite -lCppUnitLite $(BOOST_LDFLAGS) AM_LDFLAGS = -L../CppUnitLite -lCppUnitLite $(BOOST_LDFLAGS)
@ -29,7 +29,7 @@ install-exec-hook: all
install -d ${toolbox}/gtsam && \ install -d ${toolbox}/gtsam && \
cp -rf ../toolbox/* ${toolbox}/gtsam && \ cp -rf ../toolbox/* ${toolbox}/gtsam && \
install -d ${includedir}/wrap && \ 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 local toolbox dir
clean: clean: