[cig-commits] r12959 - cs/cigma/trunk
luis at geodynamics.org
luis at geodynamics.org
Wed Sep 24 04:10:51 PDT 2008
Author: luis
Date: 2008-09-24 04:10:51 -0700 (Wed, 24 Sep 2008)
New Revision: 12959
Modified:
cs/cigma/trunk/Makefile.am
cs/cigma/trunk/configure.ac
Log:
Consolidate Makefile.am files
Modified: cs/cigma/trunk/Makefile.am
===================================================================
--- cs/cigma/trunk/Makefile.am 2008-09-24 11:10:50 UTC (rev 12958)
+++ cs/cigma/trunk/Makefile.am 2008-09-24 11:10:51 UTC (rev 12959)
@@ -1,23 +1,221 @@
-# -*- Makefile -*-
-#
+###############################################################################
+# -*- Makefile -*- #
+###############################################################################
AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS = -I ./m4
# Directories to build
-SUBDIRS = src
-if BUILD_CPPUNIT_TESTS
- SUBDIRS += tests
-endif
+#SUBDIRS = src
+#if BUILD_CPPUNIT_TESTS
+# SUBDIRS += tests
+#endif
# Distribute these directories
-DIST_SUBDIRS = $(SUBDIRS)
+#DIST_SUBDIRS = $(SUBDIRS)
-###############################
-## Additional makefile rules ##
-###############################
+###############################################################################
+# Main source
+bin_PROGRAMS = ./bin/cigma
+lib_LTLIBRARIES =
+
+# Shared libraries (internal)
+noinst_LIBRARIES =
+#noinst_LIBRARIES += libann.a
+noinst_LIBRARIES += libcigma.a
+
+
+# Flags for cxxtl {{{
+# Select logging method for cxxtl
+#LOGGER_FLAGS = -DTLOG
+LOGGER_FLAGS = -DETLOG
+#LOGGER_FLAGS = -DFTLOG=cigma
+# }}}
+
+# libann.a library {{{
+
+# Include directory for ANN
+ANN_FLAGS = -I$(top_srcdir)/src/contrib/ann/include
+
+#libann_a_CPPFLAGS = $(ANN_FLAGS)
+
+#libann_a_SOURCES = \
+# src/contrib/ann/include/ANN/ANN.h \
+# src/contrib/ann/include/ANN/ANNperf.h \
+# src/contrib/ann/include/ANN/ANNx.h \
+# src/contrib/ann/src/ANN.cpp \
+# src/contrib/ann/src/bd_fix_rad_search.cpp \
+# src/contrib/ann/src/bd_pr_search.cpp \
+# src/contrib/ann/src/bd_search.cpp \
+# src/contrib/ann/src/bd_tree.cpp \
+# src/contrib/ann/src/bd_tree.h \
+# src/contrib/ann/src/brute.cpp \
+# src/contrib/ann/src/kd_dump.cpp \
+# src/contrib/ann/src/kd_fix_rad_search.cpp \
+# src/contrib/ann/src/kd_fix_rad_search.h \
+# src/contrib/ann/src/kd_pr_search.cpp \
+# src/contrib/ann/src/kd_pr_search.h \
+# src/contrib/ann/src/kd_search.cpp \
+# src/contrib/ann/src/kd_search.h \
+# src/contrib/ann/src/kd_split.cpp \
+# src/contrib/ann/src/kd_split.h \
+# src/contrib/ann/src/kd_tree.cpp \
+# src/contrib/ann/src/kd_tree.h \
+# src/contrib/ann/src/kd_util.cpp \
+# src/contrib/ann/src/kd_util.h \
+# src/contrib/ann/src/perf.cpp \
+# src/contrib/ann/src/pr_queue.h \
+# src/contrib/ann/src/pr_queue_k.h
+
+# }}}
+
+# libcigma.a library {{{
+
+libcigma_a_CPPFLAGS =
+libcigma_a_CPPFLAGS += -Wno-deprecated
+libcigma_a_CPPFLAGS += $(LOGGER_FLAGS)
+libcigma_a_CPPFLAGS += $(ANN_FLAGS)
+#libcigma_a_CPPFLAGS += $(HDF5_CXXFLAGS)
+#libcigma_a_CPPFLAGS += $(VTK_CXXFLAGS)
+
+libcigma_a_SOURCES = \
+ src/nullstream.hpp \
+ src/tri_logger.hpp \
+ src/tri_logger.cpp \
+ src/Exception.h \
+ src/Exception.cpp \
+ src/Filesystem.h \
+ src/Filesystem.cpp \
+ src/Definitions.h \
+ src/Common.h \
+ src/Numeric.h \
+ src/Numeric.cpp \
+ src/DataPath.h \
+ src/DataPath.cpp \
+ src/core_base_op.h \
+ src/core_base_op.cpp \
+ src/core_list_op.h \
+ src/core_list_op.cpp \
+ src/ProgressTimer.h \
+ src/ProgressTimer.cpp
+
+# }}}
+
+# cigma executable {{{
+
+cigma_CPPFLAGS =
+cigma_CPPFLAGS += -Wno-deprecated
+cigma_CPPFLAGS += $(LOGGER_FLAGS)
+cigma_CPPFLAGS += $(BOOST_CPPFLAGS)
+cigma_CPPFLAGS += $(ANN_FLAGS)
+
+cigma_LDFLAGS =
+cigma_LDFLAGS += $(BOOST_LDFLAGS)
+#cigma_LDFLAGS += $(BOOST_FILESYSTEM_LDFLAGS)
+#cigma_LDFLAGS += $(BOOST_PROGRAM_OPTIONS_LDFLAGS)
+#cigma_LDFLAGS += $(HDF5_LDFLAGS)
+#cigma_LDFLAGS += $(VTK_LDFLAGS)
+
+cigma_LDADD =
+cigma_LDADD += libcigma.a
+#cigma_LDADD += libann.a
+#cigma_LDADD += $(HDF5_LIBS) -lhdf5_cpp # XXX: fix this flag
+#cigma_LDADD += $(VTK_LIBS)
+#cigma_LDADD += $(BOOST_FILESYSTEM_LIBS)
+#cigma_LDADD += $(BOOST_PROGRAM_OPTIONS_LIBS)
+cigma_LDFLAGS += $(BOOST_FILESYSTEM_LIB)
+cigma_LDFLAGS += $(BOOST_PROGRAM_OPTIONS_LIB)
+
+cigma_SOURCES = \
+ src/cli_application.h \
+ src/cli_application.cpp \
+ src/cli_command.h \
+ src/cli_command.cpp \
+ src/cli_skel_cmd.h \
+ src/cli_skel_cmd.cpp \
+ src/cli_base_cmd.h \
+ src/cli_base_cmd.cpp \
+ src/cli_list_cmd.h \
+ src/cli_list_cmd.cpp \
+ src/cigma.cpp
+
+# }}}
+
+# Additional files to include in tarball
+
+EXTRA_DIST =
+
+
+
+###############################################################################
+# Python module
+
+
+#lib_LTLIBRARIES += libcigma.la
+#libpycigma_la_SOURCES = foo.cpp
+#libpycigma_la_CPPFLAGS = $(libcigma_a_CPPFLAGS) $(PYTHON_INCLUDE_DIR)
+
+pyexec_PROGRAMS = _cigma.so
+
+clean-local:
+ rm -rf pybuild
+
+_cigma.so: $(_cigma_so_SOURCES) $(_cigma_so_DEPENDENCIES)
+ BUILD_DIR=`cd $(top_builddir); pwd`; \
+ (cd $(srcdir); \
+ CFLAGS="$(CPPFLAGS) -I$(top_srcdir)/src $(libcigma_a_CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)" \
+ LDFLAGS="$(LDFLAGS) -L$$BUILD_DIR/.libs" \
+ ARCHFLAGS="$(ARCHFLAGS)" PYLIBS="$(PYLIBS)" \
+ $(PYTHON_BIN) pysrc/setup.py build --build-lib=$$BUILD_DIR/ --build-temp=$$BUILD_DIR/pybuild -f)
+
+_cigma_so_CXXFLAGS =
+_cigma_so_CXXFLAGS += -I$(top_srcdir)/src
+
+_cigma_so_LDADD =
+_cigma_so_LDADD += libcigma.a
+
+_cigma_so_SOURCES = \
+ pysrc/pycigma.cpp
+
+
+
+###############################################################################
+# Unit tests
+
+
+# Compile this as part of make check
+check_PROGRAMS = cigma-test
+
+# Also run the tests as part of make check
+TESTS = $(check_PROGRAMS)
+
+## Compiler/Linker Options
+
+cigma_test_SOURCES = $(test_sources)
+
+cigma_test_CXXFLAGS =
+cigma_test_CXXFLAGS += @CPPUNIT_CFLAGS@
+cigma_test_CXXFLAGS += -I$(top_srcdir)/src
+
+cigma_test_LDADD =
+cigma_test_LDADD += @CPPUNIT_LIBS@
+cigma_test_LDADD += libcigma.a
+cigma_test_LDADD += $(BOOST_FILESYSTEM_LIB)
+
+test_sources = \
+ tests/simple/SimpleTest.h \
+ tests/simple/SimpleTest.cpp \
+ tests/libcigma/DataPathTest.h \
+ tests/libcigma/DataPathTest.cpp \
+ tests/test_registry.cpp \
+ tests/main.cpp
+
+
+###############################################################################
+# Additional makefile rules
+
# Makefile rule for running rebuild.sh
.PHONY: rebuild rebuild-clean
rebuild: all
@@ -38,5 +236,6 @@
grep -r -n XXX: ./src > ./pending-tasks.txt || true
grep -r -n TODO: ./src >> ./pending-tasks.txt || true
@echo "Created 'pending-tasks.txt'"
+# }}}
-# EOF
+# vim: foldmethod=marker foldlevel=1 sw=4 ts=4
Modified: cs/cigma/trunk/configure.ac
===================================================================
--- cs/cigma/trunk/configure.ac 2008-09-24 11:10:50 UTC (rev 12958)
+++ cs/cigma/trunk/configure.ac 2008-09-24 11:10:51 UTC (rev 12959)
@@ -19,22 +19,23 @@
AC_LANG(C++)
dnl Configure Boost (XXX: move this step to cigma.m4)
-#BOOST_REQUIRE([1.33])
-#BOOST_SMART_PTR()
-#BOOST_FILESYSTEM()
-#BOOST_PROGRAM_OPTIONS()
AX_BOOST_BASE([1.33])
AX_BOOST_FILESYSTEM
AX_BOOST_PROGRAM_OPTIONS
-#AX_BOOST_PYTHON
-#MPX_AX_BOOST_PYTHON
DEB_AX_BOOST_PYTHON
-# see http://github.com/jwiegley/ledger/tree/master/configure.ac
echo "BOOST_PYTHON_LIBS is '$BOOST_PYTHON_LIBS'"
if test -z "$BOOST_PYTHON_LIBS"; then
AC_MSG_ERROR([[boost::python could not be found. Please ensure that LDFLAGS is configured properly, or specify --with-boost]])
fi
+dnl Check for Python
+AM_PATH_PYTHON(2.4, :)
+if [test "$PYTHON" != :]; then
+ AM_CONDITIONAL(HAVE_PYTHON, true)
+else
+ AM_CONDITIONAL(HAVE_PYTHON, false)
+fi
+
dnl Configure CppUnit (XXX: move this step to cigma.m4)
AM_PATH_CPPUNIT([1.12.0],
[withcppunit=yes],
@@ -54,9 +55,6 @@
AC_CONFIG_FILES([
Makefile
- src/Makefile
- tests/Makefile
- build/rebuild.sh
])
AC_OUTPUT
More information about the cig-commits
mailing list