author | Radek Brich <radek.brich@devl.cz> |
Wed, 09 Apr 2008 17:55:29 +0200 | |
branch | pyrit |
changeset 64 | 5785cca4cdb9 |
parent 63 | 440e1ae80459 |
child 65 | 242839c6d27d |
permissions | -rw-r--r-- |
63
440e1ae80459
add many SCons targets (see DEVNOTES)
Radek Brich <radek.brich@devl.cz>
parents:
61
diff
changeset
|
1 |
Import('env') |
440e1ae80459
add many SCons targets (see DEVNOTES)
Radek Brich <radek.brich@devl.cz>
parents:
61
diff
changeset
|
2 |
env.Append(CPPPATH = '#include') |
60 | 3 |
|
4 |
import os |
|
5 |
PY_CCFLAGS = os.popen('python-config --includes').read() |
|
6 |
PY_LDFLAGS = os.popen('python-config --libs').read() |
|
7 |
pyenv = env.Clone() |
|
8 |
pyenv.Append(LINKFLAGS=PY_LDFLAGS, CCFLAGS=PY_CCFLAGS) |
|
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 |
||
61 | 25 |
lib = env.StaticLibrary('pyrit', objs) |
26 |
||
63
440e1ae80459
add many SCons targets (see DEVNOTES)
Radek Brich <radek.brich@devl.cz>
parents:
61
diff
changeset
|
27 |
env.Alias('objs', objs) |
440e1ae80459
add many SCons targets (see DEVNOTES)
Radek Brich <radek.brich@devl.cz>
parents:
61
diff
changeset
|
28 |
env.Alias('static-lib', lib) |
440e1ae80459
add many SCons targets (see DEVNOTES)
Radek Brich <radek.brich@devl.cz>
parents:
61
diff
changeset
|
29 |
env.Alias('shared-objs', shared_objs) |
440e1ae80459
add many SCons targets (see DEVNOTES)
Radek Brich <radek.brich@devl.cz>
parents:
61
diff
changeset
|
30 |
env.Alias('python-module', pymodule) |
440e1ae80459
add many SCons targets (see DEVNOTES)
Radek Brich <radek.brich@devl.cz>
parents:
61
diff
changeset
|
31 |
env.Alias('libs', ['static-lib', 'python-module']) |
440e1ae80459
add many SCons targets (see DEVNOTES)
Radek Brich <radek.brich@devl.cz>
parents:
61
diff
changeset
|
32 |
|
61 | 33 |
Return('lib pymodule') |