Index: molecuilder/src/Makefile.am
===================================================================
--- molecuilder/src/Makefile.am	(revision 17b3a5cf347654215e2d0e6dec7e25d301ae0fa4)
+++ molecuilder/src/Makefile.am	(revision e71890a7042d7f45ebc81053098f0b660e5c1762)
@@ -1,40 +1,20 @@
-SOURCE = atom.cpp bond.cpp boundary.cpp config.cpp element.cpp ellipsoid.cpp graph.cpp helpers.cpp leastsquaremin.cpp linkedcell.cpp moleculelist.cpp molecule.cpp molecule_dynamics.cpp molecule_fragmentation.cpp molecule_geometry.cpp molecule_graph.cpp molecule_pointcloud.cpp parser.cpp periodentafel.cpp tesselation.cpp tesselationhelpers.cpp vector.cpp verbose.cpp
-HEADER = atom.hpp bond.hpp boundary.hpp config.hpp defs.hpp element.hpp ellipsoid.hpp graph.hpp helpers.hpp leastsquaremin.hpp linkedcell.hpp lists.hpp memoryallocator.hpp memoryusageobserver.cpp memoryusageobserver.hpp molecule.hpp molecule_template.hpp parser.hpp periodentafel.hpp stackclass.hpp tesselation.hpp tesselationhelpers.hpp vector.hpp verbose.hpp
-
-noinst_PROGRAMS =  ActOnAllTest VectorUnitTest MemoryAllocatorUnitTest MemoryUsageObserverUnitTest TesselationUnitTest
+SOURCE = atom.cpp bond.cpp boundary.cpp config.cpp element.cpp ellipsoid.cpp graph.cpp helpers.cpp leastsquaremin.cpp linkedcell.cpp memoryusageobserver.cpp moleculelist.cpp molecule.cpp molecule_dynamics.cpp molecule_fragmentation.cpp molecule_geometry.cpp molecule_graph.cpp molecule_pointcloud.cpp parser.cpp periodentafel.cpp tesselation.cpp tesselationhelpers.cpp vector.cpp verbose.cpp
+HEADER = atom.hpp bond.hpp boundary.hpp config.hpp defs.hpp element.hpp ellipsoid.hpp graph.hpp helpers.hpp leastsquaremin.hpp linkedcell.hpp lists.hpp memoryallocator.hpp memoryusageobserver.hpp molecule.hpp molecule_template.hpp parser.hpp periodentafel.hpp stackclass.hpp tesselation.hpp tesselationhelpers.hpp vector.hpp verbose.hpp
 
 BOOST_LIB = $(BOOST_LDFLAGS) $(BOOST_MPL_LIB)
+INCLUDES = -I$(top_srcdir)/src/unittests
 
+noinst_LIBRARIES = libmolecuilder.a
 bin_PROGRAMS = molecuilder joiner analyzer
 molecuilderdir = ${bindir}
+libmolecuilder_a_SOURCES = ${SOURCE} ${HEADER}
 molecuilder_DATA = elements.db valence.db orbitals.db Hbonddistance.db Hbondangle.db
 molecuilder_LDFLAGS = $(BOOST_LIB)
-molecuilder_SOURCES =  ${SOURCE} builder.cpp  ${HEADER}
-joiner_SOURCES = joiner.cpp datacreator.cpp element.cpp helpers.cpp memoryallocator.hpp memoryusageobserver.cpp memoryusageobserver.hpp periodentafel.cpp parser.cpp verbose.cpp datacreator.hpp helpers.hpp parser.hpp periodentafel.hpp 
-analyzer_SOURCES = analyzer.cpp datacreator.cpp element.cpp helpers.cpp memoryallocator.hpp memoryusageobserver.cpp memoryusageobserver.hpp periodentafel.cpp parser.cpp verbose.cpp helpers.hpp periodentafel.hpp parser.hpp datacreator.hpp 
+molecuilder_SOURCES = builder.cpp
+molecuilder_LDADD = libmolecuilder.a
+joiner_SOURCES = joiner.cpp datacreator.cpp parser.cpp datacreator.hpp helpers.hpp parser.hpp periodentafel.hpp
+joiner_LDADD = libmolecuilder.a 
+analyzer_SOURCES = analyzer.cpp datacreator.cpp parser.cpp helpers.hpp periodentafel.hpp parser.hpp datacreator.hpp 
+analyzer_LDADD = libmolecuilder.a 
 
-TESTS = VectorUnitTest MemoryAllocatorUnitTest MemoryUsageObserverUnitTest TesselationUnitTest
-check_PROGRAMS = $(TESTS)
-
-VectorUnitTest_SOURCES = defs.hpp helpers.cpp helpers.hpp leastsquaremin.cpp leastsquaremin.hpp memoryallocator.hpp memoryusageobserver.cpp memoryusageobserver.hpp vectorunittest.cpp vectorunittest.hpp vector.cpp vector.hpp verbose.cpp verbose.hpp 
-VectorUnitTest_CXXFLAGS = $(CPPUNIT_CFLAGS)
-VectorUnitTest_LDFLAGS = $(CPPUNIT_LIBS) -ldl
-
-TesselationUnitTest_SOURCES = defs.hpp helpers.cpp helpers.hpp leastsquaremin.cpp leastsquaremin.hpp linkedcell.cpp linkedcell.hpp memoryallocator.hpp memoryusageobserver.cpp memoryusageobserver.hpp tesselation.cpp tesselation.hpp tesselationhelpers.cpp tesselationhelpers.hpp tesselationunittest.cpp tesselationunittest.hpp vector.cpp vector.hpp verbose.cpp verbose.hpp
-TesselationUnitTest_CXXFLAGS = $(CPPUNIT_CFLAGS)
-TesselationUnitTest_LDFLAGS = $(CPPUNIT_LIBS) -ldl
-
-ActOnAllTest_SOURCES = ActOnAllTest.hp ActOnAllUnitTest.cpp ActOnAllUnitTest.hpp defs.hpp helpers.cpp helpers.hpp memoryallocator.hpp memoryusageobserver.cpp memoryusageobserver.hpp vector.cpp vector.hpp verbose.cpp verbose.hpp leastsquaremin.cpp leastsquaremin.hpp 
-ActOnAllTest_CXXFLAGS = $(CPPUNIT_CFLAGS)
-ActOnAllTest_LDFLAGS = $(CPPUNIT_LIBS) -ldl
-
-
-MemoryAllocatorUnitTest_SOURCES = defs.hpp helpers.cpp helpers.hpp memoryallocatorunittest.cpp memoryallocatorunittest.hpp memoryallocator.hpp memoryusageobserver.cpp memoryusageobserver.hpp verbose.cpp verbose.hpp 
-MemoryAllocatorUnitTest_CXXFLAGS = $(CPPUNIT_CFLAGS)
-MemoryAllocatorUnitTest_LDFLAGS = $(CPPUNIT_LIBS) -ldl
-
-MemoryUsageObserverUnitTest_SOURCES = defs.hpp helpers.cpp helpers.hpp memoryusageobserverunittest.cpp memoryusageobserverunittest.hpp memoryusageobserver.hpp memoryusageobserver.cpp verbose.cpp verbose.hpp 
-MemoryUsageObserverUnitTest_CXXFLAGS = $(CPPUNIT_CFLAGS)
-MemoryUsageObserverUnitTest_LDFLAGS = $(CPPUNIT_LIBS) -ldl
-
-EXTRA_DIST = ${molecuilder_DATA}
+#EXTRA_DIST = ${molecuilder_DATA}
