Some generic modules from blender 2.4x building with py3k and mostly working.
[blender.git] / source / gameengine / Ketsji / SConscript
1 #!/usr/bin/python
2 import sys
3
4 Import ('env')
5
6 sources = env.Glob('*.cpp')
7 defs = ''
8
9 # Mathutils C files.
10
11 if env['BF_PYTHON_VERSION'].startswith('3'):
12         # TODO - py3 support
13         sources.extend([\
14                 '#source/blender/python/generic/Mathutils.c',\
15                 '#source/blender/python/generic/Geometry.c',\
16                 '#source/blender/python/generic/euler.c',\
17                 '#source/blender/python/generic/matrix.c',\
18                 '#source/blender/python/generic/quat.c',\
19                 '#source/blender/python/generic/vector.c',\
20         ])
21         
22         sources.extend([\
23                 '#source/blender/python/generic/BGL.c'
24         ])
25         
26         sources.extend([\
27                 '#source/blender/python/generic/bpy_internal_import.c'
28         ])
29
30
31 incs = '. #source/blender/python/generic' # Only for Mathutils! and bpy_internal_import.h, be very careful
32
33 incs += ' #source/kernel/gen_system #intern/string #intern/guardedalloc'
34 incs += ' #source/gameengine/Rasterizer/RAS_OpenGLRasterizer'
35 incs += ' #intern/SoundSystem #intern/SoundSystem/include #intern/SoundSystem/openal'
36 incs += ' #intern/SoundSystem/dummy #intern/SoundSystem/intern #source/gameengine/Converter'
37 incs += ' #source/gameengine/BlenderRoutines #source/blender/imbuf #intern/moto/include'
38 incs += ' #source/gameengine/Ketsji #source/gameengine/Ketsji/KXNetwork #source/blender/blenlib'
39 incs += ' #source/blender/blenkernel #source/blender #source/blender/editors/include'
40 incs += ' #source/blender/makesdna #source/blender/python #source/gameengine/Rasterizer'
41 incs += ' #source/gameengine/GameLogic #source/gameengine/Expressions #source/gameengine/Network'
42 incs += ' #source/gameengine/SceneGraph #source/gameengine/Physics/common #source/gameengine/Physics/Bullet'
43 incs += ' #source/gameengine/Physics/BlOde #source/gameengine/Physics/Dummy'
44 incs += ' #source/blender/misc #source/blender/blenloader #extern/glew/include #source/blender/gpu'
45
46 if env['WITH_BF_SOLID']:
47         incs += ' #source/gameengine/Physics/Sumo #source/gameengine/Physics/Sumo/include'
48         incs += ' #source/gameengine/Physics/Sumo/Fuzzics/include #source/gameengine/Network/LoopBackNetwork'
49         incs += ' ' + env['BF_SOLID_INC']
50         defs += ' USE_SUMO_SOLID'
51
52
53 incs += ' ' + env['BF_PYTHON_INC']
54 incs += ' ' + env['BF_BULLET_INC']
55 incs += ' ' + env['BF_OPENGL_INC']
56
57 if  env['WITH_BF_SDL']:
58     incs += ' ' + env['BF_SDL_INC']
59 else:
60         defs += ' DISABLE_SDL'
61         
62 cxxflags = []
63 if env['OURPLATFORM']=='win32-vc':
64         cxxflags.append ('/GR')
65         cxxflags.append ('/O2')
66
67 env.BlenderLib ( 'bf_ketsji', sources, Split(incs), Split(defs), libtype=['core','player'], priority=[320, 60], cxx_compileflags = cxxflags )