OBJEXT := .o
LIBEXT := .a
+CXX := g++
CXXFLAGS :=
LDFLAGS :=
include module.mk
# process what the module.mks defined
-OBJ := $(patsubst %.cxx,%.o, $(filter %.cxx,$(SRC)))
+OBJ := $(patsubst %.cxx,%.o, $(filter %.cxx,$(SRC)))
DEPS := $(OBJ:.o=.d)
targets: $(TARGETLIBS) $(TARGETBINS)
-#mussa: $(OBJ)
-# g++ -o $@ $(CXXFLAGS) $(LDFLAGS) $^
-
+# $(call make-depend,source-file,object-file,depend-file)
+define make-depend
+ $(CXX) -MM -MF $3 -MP -MT $2 $(CFLAGS) $(CXXFLAGS) $1
+endef
+
%.d: %.cxx
- makedepend -o.d $(dirname $^) $(CFLAGS) $(CXXFILAGS) $^ -f- > $@
+ $(call make-depend,$<,$@,$(subst .o,.d,$@))
+# makedepend -o.d $(dirname $^) $(CFLAGS) $(CXXFILAGS) $^ -f- > $@
%.o: %.cxx
- g++ -c -o $@ $(CXXFLAGS) $^
+ $(CXX) -c -o $@ $(CXXFLAGS) $^
include $(DEPS)
*ana_mode = 't'; // default to transitivie analyses mode
-
// no args means gui only mode
if (argc == 1)
run_mode = 'g';
}
}
}
-
return run_mode;
}
CURDIR := $(BASEDIR)test/
-SOURCES.cxx := test_main.cpp \
- test_flp.cpp \
- test_nway.cpp
+SOURCES.cxx := test_main.cxx \
+ test_flp.cxx \
+ test_mussa.cxx \
+ test_nway.cxx
TESTSRC := $(addprefix $(CURDIR), $(SOURCES.cxx))
+++ /dev/null
-#include <boost/test/auto_unit_test.hpp>
-
-#include "flp.hh"
-
-BOOST_AUTO_TEST_CASE( flp_test )
-{
- FLPs flp;
-}
--- /dev/null
+#include <boost/test/auto_unit_test.hpp>
+
+#include "flp.hh"
+
+BOOST_AUTO_TEST_CASE( flp_test )
+{
+ FLPs flp;
+}
+++ /dev/null
-#define BOOST_AUTO_TEST_MAIN
-#include <boost/test/auto_unit_test.hpp>
-
--- /dev/null
+#define BOOST_AUTO_TEST_MAIN
+#include <boost/test/auto_unit_test.hpp>
+
--- /dev/null
+#include <boost/test/auto_unit_test.hpp>
+
+#include "alg/mussa_class.hh"
+
+//! can we initialize a mussa object?
+BOOST_AUTO_TEST_CASE( mussa_simple )
+{
+ Mussa m;
+ BOOST_CHECK_EQUAL(m.get_name(), "" );
+ BOOST_CHECK_EQUAL(m.get_window(), 0);
+ BOOST_CHECK_EQUAL(m.get_threshold(), 0);
+ BOOST_CHECK_EQUAL(m.get_analysis_mode(), Mussa::TransitiveNway);
+ m.set_name( "hello" );
+ BOOST_CHECK_EQUAL(m.get_name(), "hello" );
+ m.set_window(30);
+ BOOST_CHECK_EQUAL(m.get_window(), 30);
+ m.set_threshold(21);
+ BOOST_CHECK_EQUAL(m.get_threshold(), 21);
+ m.set_analysis_mode(Mussa::RadialNway);
+ BOOST_CHECK_EQUAL(m.get_analysis_mode(), Mussa::RadialNway);
+
+ m.clear();
+ BOOST_CHECK_EQUAL(m.get_name(), "" );
+ BOOST_CHECK_EQUAL(m.get_window(), 0);
+ BOOST_CHECK_EQUAL(m.get_threshold(), 0);
+ BOOST_CHECK_EQUAL(m.get_analysis_mode(), Mussa::TransitiveNway);
+}
+++ /dev/null
-#include <boost/test/auto_unit_test.hpp>
-
-BOOST_AUTO_TEST_CASE( nway_test )
-{
-}
--- /dev/null
+#include <boost/test/auto_unit_test.hpp>
+
+BOOST_AUTO_TEST_CASE( nway_test )
+{
+}