--- a/src/SConscript Tue Apr 29 23:31:08 2008 +0200
+++ b/src/SConscript Fri May 02 13:27:47 2008 +0200
@@ -1,6 +1,6 @@
-Import('env')
-env.Append(CPPPATH = '#include')
+Import('env buildmodule')
+env = env.Clone(CPPPATH = '#include')
pyenv = env.Clone()
if env['PLATFORM'] == 'win32':
import sys
@@ -26,17 +26,16 @@
objs.append( env.Object(src) )
shared_objs.append( env.SharedObject(src) )
-pymodule = pyenv.SharedLibrary('pyrit',
- ['raytracermodule.cc']+shared_objs,
- SHLIBPREFIX = '',
- CCFLAGS = '$CCFLAGS -Wno-write-strings')
-
-lib = env.StaticLibrary('pyrit', objs)
-
-env.Alias('objs', objs)
-env.Alias('static-lib', lib)
-env.Alias('shared-objs', shared_objs)
-env.Alias('python-module', pymodule)
-env.Alias('libs', ['static-lib', 'python-module'])
-
-Return('lib pymodule')
+if buildmodule:
+ pymodule = pyenv.SharedLibrary('pyrit',
+ ['raytracermodule.cc']+shared_objs,
+ SHLIBPREFIX = '',
+ CCFLAGS = '$CCFLAGS -Wno-write-strings')
+ env.Alias('shared-objs', shared_objs)
+ env.Alias('python-module', pymodule)
+ Return('pymodule')
+else:
+ lib = env.StaticLibrary('pyrit', objs)
+ env.Alias('objs', objs)
+ env.Alias('static-lib', lib)
+ Return('lib')