src/SConscript
author Radek Brich <radek.brich@devl.cz>
Wed, 09 Apr 2008 00:29:11 +0200
branchpyrit
changeset 61 7006036eb0db
parent 60 a23b5089b9c3
child 63 440e1ae80459
permissions -rw-r--r--
minor SConscript tweaking

env = Environment(CPPPATH = '#include')

import os
PY_CCFLAGS = os.popen('python-config --includes').read()
PY_LDFLAGS = os.popen('python-config --libs').read()
pyenv = env.Clone()
pyenv.Append(LINKFLAGS=PY_LDFLAGS, CCFLAGS=PY_CCFLAGS)
env.Append()

sources = [
	'raytracer.cc', 'scene.cc', 'sampler.cc',
	'container.cc', 'kdtree.cc', 'octree.cc', 'noise.cc']

objs = []
shared_objs = []
for src in sources:
	objs.append( env.Object(src) )
	shared_objs.append( env.SharedObject(src) )

pymodule = pyenv.SharedLibrary(
	['raytracermodule.cc']+shared_objs,
	SHLIBPREFIX = '',
	CCFLAGS = '$CCFLAGS -Wno-write-strings')

lib = env.StaticLibrary('pyrit', objs)

Return('lib pymodule')