src/SConscript
author Radek Brich <radek.brich@devl.cz>
Wed, 09 Apr 2008 17:55:29 +0200
branchpyrit
changeset 64 5785cca4cdb9
parent 63 440e1ae80459
child 65 242839c6d27d
permissions -rw-r--r--
add Help with list of targets to SConstruct

Import('env')
env.Append(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)

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)

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')