Index: /SConstruct
===================================================================
--- /SConstruct	(revision 3545)
+++ /SConstruct	(revision 3546)
@@ -52,5 +52,5 @@
 else:
     opts.Add(PathOption('PREFIX',
-                        'Location to install compiled sources'.
+                        'Location to install compiled sources',
                         os.path.join(sys.exec_prefix, 'lib', 'python' + sys.version[:3], 'site-packages')))
 
@@ -106,6 +106,6 @@
 files = []
 #dirs = filter(os.path.isdir, os.listdir('.'))
-#Only build the anuga_core directory for now
-dirs = ['anuga_core']
+#Only build the anuga_core/source/anuga directory for now
+dirs = [os.path.join('anuga_core', 'source', 'anuga')]
 while(dirs != []):
     dirs += filter(os.path.isdir, map(lambda x : os.path.join(dirs[0], x), os.listdir(dirs[0])))
@@ -115,5 +115,7 @@
     env.Pyc(x + 'c', x)
     env.Pyo(x + 'o', x)
-    instdir = os.path.join(env['PREFIX'], os.path.split(x)[0])
+    # We have to cut the first character off the result of os.path.dirname(x).replace(os.path.join('anuga_core, 'source'), '')
+    # or else we will start taking paths relative to the root directory.
+    instdir = os.path.join(env['PREFIX'], os.path.dirname(x).replace(os.path.join('anuga_core', 'source'), '')[1:])
     env.Install(instdir, x + 'c')
     env.Install(instdir, x + 'o')
Index: /anuga_core/source/anuga/mesh_engine/SConscript
===================================================================
--- /anuga_core/source/anuga/mesh_engine/SConscript	(revision 3545)
+++ /anuga_core/source/anuga/mesh_engine/SConscript	(revision 3546)
@@ -1,6 +1,8 @@
+import os
 Import('env')
 env2 = env.Copy()
 env2.Append(CPPDEFINES=[('TRILIBRARY', 1), ('NO_TIMER', 1)])
 
-env2.SharedLibrary('triang', ['triangle.c', 'triang.c'])
-env2.SharedLibrary('triangle', ['triangle.c'])
+instdir = os.path.join(env['PREFIX'], 'anuga', 'mesh_engine')
+env.Install(instdir, env2.SharedLibrary('triang', ['triangle.c', 'triang.c']))
+env.Install(instdir, env2.SharedLibrary('triangle', ['triangle.c']))
Index: /anuga_core/source/anuga/pyvolution/SConscript
===================================================================
--- /anuga_core/source/anuga/pyvolution/SConscript	(revision 3545)
+++ /anuga_core/source/anuga/pyvolution/SConscript	(revision 3546)
@@ -1,7 +1,9 @@
+import os
 Import('env')
 env2 = env.Copy()
 env2.Append(CPPPATH=['#anuga_core/source/anuga/utilities'])
 
-env2.SharedLibrary('quantity_ext', ['quantity_ext.c'])
-env2.SharedLibrary('shallow_water_ext', ['shallow_water_ext.c'])
-env2.SharedLibrary('shallow_water_kinetic', ['shallow_water_kinetic_ext.c'])
+instdir = os.path.join(env['PREFIX'], 'anuga', 'pyvolution')
+env.Install(instdir, env2.SharedLibrary('quantity_ext', ['quantity_ext.c']))
+env.Install(instdir, env2.SharedLibrary('shallow_water_ext', ['shallow_water_ext.c']))
+env.Install(instdir, env2.SharedLibrary('shallow_water_kinetic', ['shallow_water_kinetic_ext.c']))
Index: /anuga_core/source/anuga/utilities/SConscript
===================================================================
--- /anuga_core/source/anuga/utilities/SConscript	(revision 3545)
+++ /anuga_core/source/anuga/utilities/SConscript	(revision 3546)
@@ -1,4 +1,6 @@
+import os
 Import('env')
-env.SharedLibrary('polygon_ext', ['polygon_ext.c'])
-env.SharedLibrary('util_ext', ['util_ext.c'])
-env.SharedLibrary('sparse_ext', ['sparse_ext.c'])
+instdir = os.path.join(env['PREFIX'], 'anuga', 'utilities')
+env.Install(instdir, env.SharedLibrary('polygon_ext', ['polygon_ext.c']))
+env.Install(instdir, env.SharedLibrary('util_ext', ['util_ext.c']))
+env.Install(instdir, env.SharedLibrary('sparse_ext', ['sparse_ext.c']))
Index: /build_options.py
===================================================================
--- /build_options.py	(revision 3545)
+++ /build_options.py	(revision 3546)
@@ -16,5 +16,5 @@
 # Uncommenting this and leaving it as the empty string will cause the
 # build to fail.
-PREFIX = 'c:\\pyanuga_temp'
+#PREFIX = ''
 
 # Install .py files as well as the binaries? Yes/No option
