equal
deleted
inserted
replaced
|
1 env = Environment(CPPPATH = '#include') |
|
2 |
|
3 import os |
|
4 PY_CCFLAGS = os.popen('python-config --includes').read() |
|
5 PY_LDFLAGS = os.popen('python-config --libs').read() |
|
6 pyenv = env.Clone() |
|
7 pyenv.Append(LINKFLAGS=PY_LDFLAGS, CCFLAGS=PY_CCFLAGS) |
|
8 env.Append() |
|
9 |
|
10 sources = [ |
|
11 'raytracer.cc', 'scene.cc', 'sampler.cc', |
|
12 'container.cc', 'kdtree.cc', 'octree.cc', 'noise.cc'] |
|
13 |
|
14 objs = [] |
|
15 shared_objs = [] |
|
16 for src in sources: |
|
17 objs.append( env.Object(src) ) |
|
18 shared_objs.append( env.SharedObject(src) ) |
|
19 |
|
20 pymodule = pyenv.SharedLibrary( |
|
21 ['raytracermodule.cc']+shared_objs, |
|
22 SHLIBPREFIX = '', |
|
23 CCFLAGS = '$CCFLAGS -Wno-write-strings') |
|
24 |
|
25 Return('objs pymodule') |