src/SConscript
author Radek Brich <radek.brich@devl.cz>
Wed, 09 Apr 2008 11:35:59 +0200
branchpyrit
changeset 62 07c2f8084719
parent 61 7006036eb0db
child 63 440e1ae80459
permissions -rw-r--r--
more SConscript tweaking, make model preparation work again
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
60
a23b5089b9c3 moving to SCons build system
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     1
env = Environment(CPPPATH = '#include')
a23b5089b9c3 moving to SCons build system
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     2
a23b5089b9c3 moving to SCons build system
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     3
import os
a23b5089b9c3 moving to SCons build system
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     4
PY_CCFLAGS = os.popen('python-config --includes').read()
a23b5089b9c3 moving to SCons build system
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     5
PY_LDFLAGS = os.popen('python-config --libs').read()
a23b5089b9c3 moving to SCons build system
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     6
pyenv = env.Clone()
a23b5089b9c3 moving to SCons build system
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     7
pyenv.Append(LINKFLAGS=PY_LDFLAGS, CCFLAGS=PY_CCFLAGS)
a23b5089b9c3 moving to SCons build system
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     8
env.Append()
a23b5089b9c3 moving to SCons build system
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     9
a23b5089b9c3 moving to SCons build system
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    10
sources = [
a23b5089b9c3 moving to SCons build system
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    11
	'raytracer.cc', 'scene.cc', 'sampler.cc',
a23b5089b9c3 moving to SCons build system
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    12
	'container.cc', 'kdtree.cc', 'octree.cc', 'noise.cc']
a23b5089b9c3 moving to SCons build system
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    13
a23b5089b9c3 moving to SCons build system
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    14
objs = []
a23b5089b9c3 moving to SCons build system
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    15
shared_objs = []
a23b5089b9c3 moving to SCons build system
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    16
for src in sources:
a23b5089b9c3 moving to SCons build system
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    17
	objs.append( env.Object(src) )
a23b5089b9c3 moving to SCons build system
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    18
	shared_objs.append( env.SharedObject(src) )
a23b5089b9c3 moving to SCons build system
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    19
a23b5089b9c3 moving to SCons build system
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    20
pymodule = pyenv.SharedLibrary(
a23b5089b9c3 moving to SCons build system
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    21
	['raytracermodule.cc']+shared_objs,
a23b5089b9c3 moving to SCons build system
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    22
	SHLIBPREFIX = '',
a23b5089b9c3 moving to SCons build system
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    23
	CCFLAGS = '$CCFLAGS -Wno-write-strings')
a23b5089b9c3 moving to SCons build system
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    24
61
7006036eb0db minor SConscript tweaking
Radek Brich <radek.brich@devl.cz>
parents: 60
diff changeset
    25
lib = env.StaticLibrary('pyrit', objs)
7006036eb0db minor SConscript tweaking
Radek Brich <radek.brich@devl.cz>
parents: 60
diff changeset
    26
7006036eb0db minor SConscript tweaking
Radek Brich <radek.brich@devl.cz>
parents: 60
diff changeset
    27
Return('lib pymodule')