diff -r 9d66d323c354 -r 9af5c039b678 src/SConscript --- a/src/SConscript Fri May 02 13:27:47 2008 +0200 +++ b/src/SConscript Mon May 05 15:31:14 2008 +0200 @@ -1,7 +1,7 @@ -Import('env buildmodule') +Import('env buildmodule cc') -env = env.Clone(CPPPATH = '#include') -pyenv = env.Clone() +myenv = env.Clone(CPPPATH = '#include') +pyenv = myenv.Clone() if env['PLATFORM'] == 'win32': import sys pythonver = '%c%c' % (sys.version[0], sys.version[2]) @@ -23,19 +23,22 @@ objs = [] shared_objs = [] for src in sources: - objs.append( env.Object(src) ) - shared_objs.append( env.SharedObject(src) ) + objs.append( myenv.Object(src) ) + shared_objs.append( myenv.SharedObject(src) ) if buildmodule: + if cc == 'gcc': + ccflags = '$CCFLAGS -Wno-write-strings' + else: + ccflags = '$CCFLAGS' pymodule = pyenv.SharedLibrary('pyrit', ['raytracermodule.cc']+shared_objs, - SHLIBPREFIX = '', - CCFLAGS = '$CCFLAGS -Wno-write-strings') + SHLIBPREFIX = '', CCFLAGS = ccflags) env.Alias('shared-objs', shared_objs) env.Alias('python-module', pymodule) Return('pymodule') else: - lib = env.StaticLibrary('pyrit', objs) + lib = myenv.StaticLibrary('pyrit', objs) env.Alias('objs', objs) env.Alias('static-lib', lib) Return('lib')