src/SConscript
branchpyrit
changeset 63 440e1ae80459
parent 61 7006036eb0db
child 65 242839c6d27d
equal deleted inserted replaced
62:07c2f8084719 63:440e1ae80459
     1 env = Environment(CPPPATH = '#include')
     1 Import('env')
       
     2 env.Append(CPPPATH = '#include')
     2 
     3 
     3 import os
     4 import os
     4 PY_CCFLAGS = os.popen('python-config --includes').read()
     5 PY_CCFLAGS = os.popen('python-config --includes').read()
     5 PY_LDFLAGS = os.popen('python-config --libs').read()
     6 PY_LDFLAGS = os.popen('python-config --libs').read()
     6 pyenv = env.Clone()
     7 pyenv = env.Clone()
     7 pyenv.Append(LINKFLAGS=PY_LDFLAGS, CCFLAGS=PY_CCFLAGS)
     8 pyenv.Append(LINKFLAGS=PY_LDFLAGS, CCFLAGS=PY_CCFLAGS)
     8 env.Append()
       
     9 
     9 
    10 sources = [
    10 sources = [
    11 	'raytracer.cc', 'scene.cc', 'sampler.cc',
    11 	'raytracer.cc', 'scene.cc', 'sampler.cc',
    12 	'container.cc', 'kdtree.cc', 'octree.cc', 'noise.cc']
    12 	'container.cc', 'kdtree.cc', 'octree.cc', 'noise.cc']
    13 
    13 
    22 	SHLIBPREFIX = '',
    22 	SHLIBPREFIX = '',
    23 	CCFLAGS = '$CCFLAGS -Wno-write-strings')
    23 	CCFLAGS = '$CCFLAGS -Wno-write-strings')
    24 
    24 
    25 lib = env.StaticLibrary('pyrit', objs)
    25 lib = env.StaticLibrary('pyrit', objs)
    26 
    26 
       
    27 env.Alias('objs', objs)
       
    28 env.Alias('static-lib', lib)
       
    29 env.Alias('shared-objs', shared_objs)
       
    30 env.Alias('python-module', pymodule)
       
    31 env.Alias('libs', ['static-lib', 'python-module'])
       
    32 
    27 Return('lib pymodule')
    33 Return('lib pymodule')