gtsam/base/Makefile.am

87 lines
2.3 KiB
Makefile

#----------------------------------------------------------------------------------------------------
# GTSAM base
# provides some base Math and data structures, as well as test-related utilities
#----------------------------------------------------------------------------------------------------
headers =
sources =
check_PROGRAMS =
# base Math
sources += Vector.cpp svdcmp.cpp Matrix.cpp
check_PROGRAMS += testVector testMatrix
if USE_LAPACK
sources += SPQRUtil.cpp
check_PROGRAMS += testSPQRUtil
endif
# Testing
headers += Testable.h numericalDerivative.h
# Lie Groups
headers += Lie.h Lie-inl.h
# Data structures
headers += BTree.h DSF.h
sources += DSFVector.cpp
check_PROGRAMS += testBTree testDSF testDSFVector
# Timing tests
noinst_PROGRAMS = timeMatrix
#----------------------------------------------------------------------------------------------------
# Create a libtool library that is not installed
# It will be packaged in the toplevel libgtsam.la as specfied in ../Makefile.am
# The headers are installed in $(includedir)/gtsam:
#----------------------------------------------------------------------------------------------------
headers += $(sources:.cpp=.h)
pkginclude_HEADERS = $(headers)
noinst_LTLIBRARIES = libbase.la
libbase_la_SOURCES = $(sources)
AM_CPPFLAGS = -I$(boost)
if USE_BLAS
AM_CPPFLAGS += -DGT_USE_CBLAS
endif
if USE_LAPACK
AM_CPPFLAGS += -DGT_USE_LAPACK
endif
# On Mac, we compile using the BLAS/LAPACK headers in the Accelerate framework
if USE_ACCELERATE_MACOS
AM_CPPFLAGS += -F Accelerate
endif
#----------------------------------------------------------------------------------------------------
# rules to build local programs
#----------------------------------------------------------------------------------------------------
TESTS = $(check_PROGRAMS)
AM_DEFAULT_SOURCE_EXT = .cpp
AM_LDFLAGS = $(BOOST_LDFLAGS) $(boost_serialization)
LDADD = libbase.la ../ldl/libldl.la ../CppUnitLite/libCppUnitLite.a
if USE_BLAS_LINUX
AM_LDFLAGS += -lcblas -latlas
endif
if USE_LAPACK
LDADD += ../spqr_mini/libspqr_mini.la
endif
if USE_LAPACK_LINUX
AM_LDFLAGS += -llapack
endif
if USE_ACCELERATE_MACOS
AM_LDFLAGS += -framework Accelerate
endif
# rule to run an executable
%.run: % $(LDADD)
./$^
#----------------------------------------------------------------------------------------------------