Index: ThirdParty/mpqc_open/src/lib/math/isosurf/Makefile.am
===================================================================
--- ThirdParty/mpqc_open/src/lib/math/isosurf/Makefile.am	(revision 00f9833f8d74abc94e5b207e00780988a1a0525b)
+++ ThirdParty/mpqc_open/src/lib/math/isosurf/Makefile.am	(revision 23612c4cde38aab3441a98c997aecb0159a80970)
@@ -1,7 +1,30 @@
 LIBSCISOSURFSOURCES = \
-		edge.cc implicit.c isosurf.cc shape.cc surf.cc surfor.cc surfse.cc surfst.cc triangle.cc tricoef.cc vertex.cc volume.cc volume_i.cc
+	math/isosurf/edge.cc \
+	math/isosurf/implicit.c \
+	math/isosurf/isosurf.cc \
+	math/isosurf/shape.cc \
+	math/isosurf/surf.cc \
+	math/isosurf/surfor.cc \
+	math/isosurf/surfse.cc \
+	math/isosurf/surfst.cc \
+	math/isosurf/triangle.cc \
+	math/isosurf/tricoef.cc \
+	math/isosurf/vertex.cc \
+	math/isosurf/volume.cc \
+	math/isosurf/volume_i.cc
+
 
 LIBSCISOSURFHEADERS = \
-		edge.h implicit.h isosurf.h shape.h surf.h triangle.h tricoef.h vertex.h volume.h volume_i.h
+	math/isosurf/edge.h \
+	math/isosurf/implicit.h \
+	math/isosurf/isosurf.h \
+	math/isosurf/shape.h \
+	math/isosurf/surf.h \
+	math/isosurf/triangle.h \
+	math/isosurf/tricoef.h \
+	math/isosurf/vertex.h \
+	math/isosurf/volume.h \
+	math/isosurf/volume_i.h
+
 
 lib_LTLIBRARIES +=
@@ -43,4 +66,5 @@
 #nodist_libSCisosurf_libinclude_HEADERS = $(top_builddir)/src/lib/scconfig.h
 
+
 ISOSURFTESTS = \
 	tmplinst \
@@ -55,9 +79,11 @@
         libSCcontainer.la libSCref.la libSCmisc.la
 
-tmplinst_SOURCES = tmplinst.cc
+tmplinst_SOURCES = \
+	math/isosurf/tmplinst.cc
 tmplinst_LDADD = \
         $(ISOSURFLIBS)
 
-isotest_SOURCES = isotest.cc
+isotest_SOURCES = \
+	math/isosurf/isotest.cc
 isotest_LDADD = \
         $(ISOSURFLIBS)
Index: ThirdParty/mpqc_open/src/lib/math/optimize/Makefile.am
===================================================================
--- ThirdParty/mpqc_open/src/lib/math/optimize/Makefile.am	(revision 00f9833f8d74abc94e5b207e00780988a1a0525b)
+++ ThirdParty/mpqc_open/src/lib/math/optimize/Makefile.am	(revision 23612c4cde38aab3441a98c997aecb0159a80970)
@@ -1,7 +1,38 @@
 LIBSCOPTIMIZESOURCES = \
-		conv.cc dfp.cc diis.cc efc.cc function.cc gdiis.cc mcsearch.cc newton.cc opt.cc powell.cc qnewton.cc scextrap.cc scextrapmat.cc steep.cc transform.cc update.cc
+	math/optimize/conv.cc \
+	math/optimize/dfp.cc \
+	math/optimize/diis.cc \
+	math/optimize/efc.cc \
+	math/optimize/function.cc \
+	math/optimize/gdiis.cc \
+	math/optimize/mcsearch.cc \
+	math/optimize/newton.cc \
+	math/optimize/opt.cc \
+	math/optimize/powell.cc \
+	math/optimize/qnewton.cc \
+	math/optimize/scextrap.cc \
+	math/optimize/scextrapmat.cc \
+	math/optimize/steep.cc \
+	math/optimize/transform.cc \
+	math/optimize/update.cc
+
 
 LIBSCOPTIMIZEHEADERS = \
-		conv.h diis.h efc.h function.h gdiis.h linkage.h mcsearch.h newton.h opt.h qnewton.h scextrap.h scextrapmat.h steep.h transform.h update.h
+	math/optimize/conv.h \
+	math/optimize/diis.h \
+	math/optimize/efc.h \
+	math/optimize/function.h \
+	math/optimize/gdiis.h \
+	math/optimize/linkage.h \
+	math/optimize/mcsearch.h \
+	math/optimize/newton.h \
+	math/optimize/opt.h \
+	math/optimize/qnewton.h \
+	math/optimize/scextrap.h \
+	math/optimize/scextrapmat.h \
+	math/optimize/steep.h \
+	math/optimize/transform.h \
+	math/optimize/update.h
+
 
 lib_LTLIBRARIES +=
@@ -43,4 +74,5 @@
 #nodist_libSCoptimize_libinclude_HEADERS = $(top_builddir)/src/lib/scconfig.h
 
+
 OPTIMIZETESTS = \
 	opttest \
@@ -56,13 +88,16 @@
         libSCcontainer.la libSCref.la libSCmisc.la
 
-opttest_SOURCES = opttest.cc
+opttest_SOURCES = \
+	math/optimize/opttest.cc
 opttest_LDADD = \
         $(OPTIMIZELIBS)
 
-scextest_optimize_SOURCES = scextest.cc
+scextest_optimize_SOURCES = \
+	math/optimize/scextest.cc
 scextest_optimize_LDADD = \
         $(OPTIMIZELIBS)
 
-kvopt_SOURCES = kvopt.cc
+kvopt_SOURCES = \
+	math/optimize/kvopt.cc
 kvopt_LDADD = \
         $(OPTIMIZELIBS)
Index: ThirdParty/mpqc_open/src/lib/math/scmat/Makefile.am
===================================================================
--- ThirdParty/mpqc_open/src/lib/math/scmat/Makefile.am	(revision 00f9833f8d74abc94e5b207e00780988a1a0525b)
+++ ThirdParty/mpqc_open/src/lib/math/scmat/Makefile.am	(revision 23612c4cde38aab3441a98c997aecb0159a80970)
@@ -1,7 +1,63 @@
 LIBSCSCMATSOURCES = \
-		abstract.cc blkiter.cc block.cc blocked.cc blockeddiag.cc blockedrect.cc blockedsymm.cc blockedvect.cc cmatrix.c dim.cc dist.cc distdiag.cc disthql.cc distrect.cc distsymm.cc distvect.cc elemop.cc local.cc localdiag.cc localrect.cc localsymm.cc localvect.cc matrix3.cc matrix.cc matrix_i.cc repl.cc repldiag.cc replrect.cc replsymm.cc replvect.cc result.cc svd.c util.cc vector3.cc vector3_i.cc
+	math/scmat/abstract.cc \
+	math/scmat/blkiter.cc \
+	math/scmat/block.cc \
+	math/scmat/blocked.cc \
+	math/scmat/blockeddiag.cc \
+	math/scmat/blockedrect.cc \
+	math/scmat/blockedsymm.cc \
+	math/scmat/blockedvect.cc \
+	math/scmat/cmatrix.c \
+	math/scmat/dim.cc \
+	math/scmat/dist.cc \
+	math/scmat/distdiag.cc \
+	math/scmat/disthql.cc \
+	math/scmat/distrect.cc \
+	math/scmat/distsymm.cc \
+	math/scmat/distvect.cc \
+	math/scmat/elemop.cc \
+	math/scmat/local.cc \
+	math/scmat/localdiag.cc \
+	math/scmat/localrect.cc \
+	math/scmat/localsymm.cc \
+	math/scmat/localvect.cc \
+	math/scmat/matrix3.cc \
+	math/scmat/matrix.cc \
+	math/scmat/matrix_i.cc \
+	math/scmat/repl.cc \
+	math/scmat/repldiag.cc \
+	math/scmat/replrect.cc \
+	math/scmat/replsymm.cc \
+	math/scmat/replvect.cc \
+	math/scmat/result.cc \
+	math/scmat/svd.c \
+	math/scmat/util.cc \
+	math/scmat/vector3.cc \
+	math/scmat/vector3_i.cc
+
 
 LIBSCSCMATHEADERS = \
-		abstract.h blkiter.h blocked.h block.h cmatrix.h dim.h dist.h disthql.h elemop.h linkage.h local.h matrix3.h matrix.h matrix_i.h mops.h offset.h repl.h result.h util.h vector3.h vector3_i.h
+	math/scmat/abstract.h \
+	math/scmat/blkiter.h \
+	math/scmat/blocked.h \
+	math/scmat/block.h \
+	math/scmat/cmatrix.h \
+	math/scmat/dim.h \
+	math/scmat/dist.h \
+	math/scmat/disthql.h \
+	math/scmat/elemop.h \
+	math/scmat/linkage.h \
+	math/scmat/local.h \
+	math/scmat/matrix3.h \
+	math/scmat/matrix.h \
+	math/scmat/matrix_i.h \
+	math/scmat/mops.h \
+	math/scmat/offset.h \
+	math/scmat/repl.h \
+	math/scmat/result.h \
+	math/scmat/util.h \
+	math/scmat/vector3.h \
+	math/scmat/vector3_i.h
+
 
 lib_LTLIBRARIES +=
@@ -43,4 +99,5 @@
 #nodist_libSCscmat_libinclude_HEADERS = $(top_builddir)/src/lib/scconfig.h
 
+
 SCMATTESTS = \
 	localtest \
@@ -57,17 +114,21 @@
         libSCcontainer.la libSCref.la libSCmisc.la
 
-localtest_SOURCES = localtest.cc
+localtest_SOURCES = \
+	math/scmat/localtest.cc
 localtest_LDADD = \
         $(SCMATLIBS)
 
-repltest_SOURCES = repltest.cc
+repltest_SOURCES = \
+	math/scmat/repltest.cc
 repltest_LDADD = \
         $(SCMATLIBS)
 
-disttest_SOURCES = disttest.cc
+disttest_SOURCES = \
+	math/scmat/disttest.cc
 disttest_LDADD = \
         $(SCMATLIBS)
 
-blockedtest_SOURCES = blockedtest.cc
+blockedtest_SOURCES = \
+	math/scmat/blockedtest.cc
 blockedtest_LDADD = \
         $(SCMATLIBS)
Index: ThirdParty/mpqc_open/src/lib/math/symmetry/Makefile.am
===================================================================
--- ThirdParty/mpqc_open/src/lib/math/symmetry/Makefile.am	(revision 00f9833f8d74abc94e5b207e00780988a1a0525b)
+++ ThirdParty/mpqc_open/src/lib/math/symmetry/Makefile.am	(revision 23612c4cde38aab3441a98c997aecb0159a80970)
@@ -1,7 +1,18 @@
 LIBSCSYMMETRYSOURCES = \
-		chartab.cc corrtab.cc ico.cc irrep.cc maketab.cc pointgrp.cc rep.cc symop.cc tetra.cc
+	math/symmetry/chartab.cc \
+	math/symmetry/corrtab.cc \
+	math/symmetry/ico.cc \
+	math/symmetry/irrep.cc \
+	math/symmetry/maketab.cc \
+	math/symmetry/pointgrp.cc \
+	math/symmetry/rep.cc \
+	math/symmetry/symop.cc \
+	math/symmetry/tetra.cc
+
 
 LIBSCSYMMETRYHEADERS = \
-		corrtab.h pointgrp.h
+	math/symmetry/corrtab.h \
+	math/symmetry/pointgrp.h
+
 
 lib_LTLIBRARIES +=
@@ -43,4 +54,5 @@
 #nodist_libSCsymmetry_libinclude_HEADERS = $(top_builddir)/src/lib/scconfig.h
 
+
 SYMMETRYTESTS = \
 	testpg
@@ -54,5 +66,6 @@
         libSCcontainer.la libSCref.la libSCmisc.la
 
-testpg_SOURCES = testpg.cc
+testpg_SOURCES = \
+	math/symmetry/testpg.cc
 testpg_LDADD = \
 	$(SYMMETRYLIBS)
