Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorNathan Letwory <nathan@letworyinteractive.com>2006-02-04 17:15:10 +0300
committerNathan Letwory <nathan@letworyinteractive.com>2006-02-04 17:15:10 +0300
commit3bb82a27fc61b787ab83145f9a7962c14e7ca769 (patch)
treeb1d432db0f2836f4117a71e341bc4fef34d62a5a /source
parent1db5c237165ac090af925d9cf8440fc953e4ee06 (diff)
== SCons ==
* This commit is all of the rewrite work done on the SCons system. For documentation see doc/blender-scons.txt and doc/blender-scons-dev.txt. Also http://mediawiki.blender.org/index.php/BlenderDev/SconsRefactoring contains valuable information, along with what still needs to be done. - linux, os x and windows compile now. - files are compiled to BF_INSTALLDIR (see config/(platform)-config.py) - NOTE: Jean-Luc P will commit sometime during the weekend proper appit() for OS X. For now, copy the resulting binary to an existing .app bundle. - features: - cleaner structure for better maintenance - cleaner output during compile - better handling of build options - general overall speed increase - see the wiki for more info Cygwin, FreeBSD and Solaris systems still need work. For these systems: 1) copy a config/(platform)-config.py to ie. config/cygwin-config.py 2) set the proper defaults for your platform 3) mail me at jesterking at letwory dot net with you configuration. if you need any modifications to the system, do send a patch, too. I'll be giving first-aid today and tomorrow, after that it'll be all regular development work :) /Nathan
Diffstat (limited to 'source')
-rw-r--r--source/SConscript10
-rw-r--r--source/blender/SConscript12
-rw-r--r--source/blender/avi/SConscript24
-rw-r--r--source/blender/blenkernel/SConscript95
-rw-r--r--source/blender/blenkernel/bad_level_call_stubs/SConscript33
-rw-r--r--source/blender/blenlib/SConscript52
-rw-r--r--source/blender/blenloader/SConscript31
-rw-r--r--source/blender/blenpluginapi/SConscript21
-rw-r--r--source/blender/ftfont/SConscript30
-rw-r--r--source/blender/imbuf/SConscript67
-rw-r--r--source/blender/imbuf/intern/openexr/SConscript29
-rw-r--r--source/blender/img/SConscript17
-rw-r--r--source/blender/makesdna/SConscript9
-rw-r--r--source/blender/makesdna/intern/SConscript32
-rw-r--r--source/blender/python/SConscript89
-rw-r--r--source/blender/quicktime/SConscript36
-rw-r--r--source/blender/radiosity/SConscript28
-rw-r--r--source/blender/readblenfile/SConscript20
-rw-r--r--source/blender/render/SConscript43
-rw-r--r--source/blender/src/SConscript201
-rw-r--r--source/blender/yafray/SConscript23
-rw-r--r--source/creator/SConscript33
-rwxr-xr-xsource/gameengine/BlenderRoutines/SConscript70
-rwxr-xr-xsource/gameengine/Converter/SConscript82
-rwxr-xr-xsource/gameengine/Expressions/SConscript35
-rwxr-xr-xsource/gameengine/GameLogic/SConscript50
-rw-r--r--source/gameengine/GamePlayer/SConscript2
-rw-r--r--source/gameengine/GamePlayer/common/SConscript119
-rw-r--r--source/gameengine/GamePlayer/ghost/SConscript85
-rwxr-xr-xsource/gameengine/Ketsji/KXNetwork/SConscript27
-rw-r--r--source/gameengine/Ketsji/SConscript153
-rwxr-xr-xsource/gameengine/Network/LoopBackNetwork/SConscript15
-rwxr-xr-xsource/gameengine/Network/SConscript17
-rw-r--r--source/gameengine/Physics/Bullet/SConscript24
-rwxr-xr-xsource/gameengine/Physics/Dummy/SConscript13
-rwxr-xr-xsource/gameengine/Physics/Sumo/SConscript31
-rwxr-xr-xsource/gameengine/Physics/common/SConscript16
-rwxr-xr-xsource/gameengine/Rasterizer/RAS_OpenGLRasterizer/SConscript20
-rwxr-xr-xsource/gameengine/Rasterizer/SConscript28
-rw-r--r--source/gameengine/SConscript18
-rwxr-xr-xsource/gameengine/SceneGraph/SConscript18
-rw-r--r--source/kernel/SConscript20
42 files changed, 504 insertions, 1274 deletions
diff --git a/source/SConscript b/source/SConscript
index f5ace6e8be7..fb215ba3796 100644
--- a/source/SConscript
+++ b/source/SConscript
@@ -1,8 +1,8 @@
#!/usr/bin/python
-Import ('user_options_dict')
+Import ('env')
SConscript(['blender/SConscript',
- 'kernel/SConscript',
- 'creator/SConscript'])
-if user_options_dict['BUILD_GAMEENGINE'] == 1:
- SConscript (['gameengine/SConscript'])
+ 'kernel/SConscript',
+ 'creator/SConscript'])
+if env['WITH_BF_GAMEENGINE'] == 1:
+ SConscript (['gameengine/SConscript'])
diff --git a/source/blender/SConscript b/source/blender/SConscript
index 926dc75e7ea..ba821355e23 100644
--- a/source/blender/SConscript
+++ b/source/blender/SConscript
@@ -1,5 +1,5 @@
#!/usr/bin/python
-Import ('user_options_dict')
+Import ('env')
SConscript(['avi/SConscript',
'blenkernel/SConscript',
@@ -16,11 +16,11 @@ SConscript(['avi/SConscript',
'src/SConscript',
'yafray/SConscript'])
-if user_options_dict['USE_OPENEXR'] == 1:
- SConscript (['imbuf/intern/openexr/SConscript'])
-
-if user_options_dict['USE_INTERNATIONAL'] == 1:
+if env['WITH_BF_FREETYPE'] == 1:
SConscript (['ftfont/SConscript'])
-if user_options_dict['USE_QUICKTIME'] == 1:
+if env['WITH_BF_OPENEXR'] == 1:
+ SConscript (['imbuf/intern/openexr/SConscript'])
+
+if env['WITH_BF_QUICKTIME'] == 1:
SConscript (['quicktime/SConscript'])
diff --git a/source/blender/avi/SConscript b/source/blender/avi/SConscript
index 56eaff26f0f..6c2faa5329d 100644
--- a/source/blender/avi/SConscript
+++ b/source/blender/avi/SConscript
@@ -1,22 +1,10 @@
#!/usr/bin/python
-Import ('extra_includes')
-Import ('user_options_dict')
-Import ('library_env')
+#Import ('extra_includes')
+Import ('env')
-avi_env = library_env.Copy ()
+sources = env.Glob('intern/*.c')
-source_files = ['intern/avi.c',
- 'intern/avirgb.c',
- 'intern/codecs.c',
- 'intern/endian.c',
- 'intern/mjpeg.c',
- 'intern/options.c',
- 'intern/rgb32.c']
+incs = '. #/intern/guardedalloc'
+incs += ' ' + env['BF_JPEG_INC']
-avi_env.Append (CPPPATH = ['.',
- '../avi',
- '#/intern/guardedalloc'])
-
-avi_env.Append (CPPPATH=user_options_dict['JPEG_INCLUDE'])
-avi_env.Append (CPPPATH=extra_includes)
-avi_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/blender_avi', source=source_files)
+env.BlenderLib ('blender_avi', sources, Split(incs), [], libtype='core', priority = 90 )
diff --git a/source/blender/blenkernel/SConscript b/source/blender/blenkernel/SConscript
index ea774092647..df709db5a0b 100644
--- a/source/blender/blenkernel/SConscript
+++ b/source/blender/blenkernel/SConscript
@@ -1,81 +1,32 @@
#!/usr/bin/python
-Import ('user_options_dict')
-Import ('library_env')
+Import ('env')
-blenkernel_env = library_env.Copy ()
+sources = env.Glob('intern/*.c')
-source_files = ['intern/constraint.c',
- 'intern/depsgraph.c',
- 'intern/DerivedMesh.c',
- 'intern/group.c',
- 'intern/icons.c',
- 'intern/material.c',
- 'intern/sca.c',
- 'intern/world.c',
- 'intern/curve.c',
- 'intern/mball.c',
- 'intern/scene.c',
- 'intern/writeavi.c',
- 'intern/action.c',
- 'intern/deform.c',
- 'intern/image.c',
- 'intern/mesh.c',
- 'intern/modifier.c',
- 'intern/screen.c',
- 'intern/anim.c',
- 'intern/displist.c',
- 'intern/ipo.c',
- 'intern/nla.c',
- 'intern/sound.c',
- 'intern/armature.c',
- 'intern/effect.c',
- 'intern/key.c',
- 'intern/object.c',
- 'intern/CCGSubSurf.c',
- 'intern/subsurf_ccg.c',
- 'intern/blender.c',
- 'intern/exotic.c',
- 'intern/lattice.c',
- 'intern/packedFile.c',
- 'intern/text.c',
- 'intern/script.c',
- 'intern/bmfont.c',
- 'intern/font.c',
- 'intern/library.c',
- 'intern/property.c',
- 'intern/softbody.c',
- 'intern/node.c',
- 'intern/node_shaders.c',
- 'intern/node_composite.c',
- 'intern/colortools.c',
- 'intern/texture.c']
+incs = '. #/intern/guardedalloc ../include ../blenlib ../makesdna'
+incs += ' ../python ../render/extern/include #/intern/decimation/extern'
+incs += ' ../imbuf ../avi #/intern/elbeem/extern'
+incs += ' #/intern/iksolver/extern ../blenloader ../quicktime'
-blenkernel_env.Append (CPPPATH = ['.',
- '../blenkernel',
- '#/intern/guardedalloc',
- '../include',
- '../blenlib',
- '../makesdna',
- '../python',
- '../render/extern/include',
- '../../../intern/decimation/extern',
- '../imbuf',
- '../avi',
- '../quicktime',
- '#/intern/elbeem/extern',
- '#/intern/iksolver/extern',
- '../blenloader'])
+incs += ' ' + env['BF_OPENGL_INC']
+incs += ' ' + env['BF_ZLIB_INC']
+incs += ' ' + env['BF_SDL_INC']
-if user_options_dict['USE_INTERNATIONAL'] == 1:
- blenkernel_env.Append (CPPDEFINES = 'WITH_FREETYPE2')
+defs = ''
-#fixme: if user_options_dict['USE_CCGSUBSURFLIB'] == 1:
-# blenkernel_env.Append (CPPDEFINES = 'WITH_CCGSUBSURF')
+if env['WITH_BF_FREETYPE'] == 1:
+ defs += 'WITH_FREETYPE2'
-blenkernel_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/blender_blenkernel', source=source_files)
+if env['WITH_BF_OPENEXR'] == 1:
+ defs += ' WITH_OPENEXR'
-SConscript(['bad_level_call_stubs/SConscript'])
+if env['WITH_BF_QUICKTIME'] == 1:
+ defs += ' WITH_QUICKTIME'
+ incs += ' ' + env['BF_QUICKTIME_INC']
-blenkernel_env.Append (CPPPATH = user_options_dict['OPENGL_INCLUDE'])
-blenkernel_env.Append (CPPPATH = user_options_dict['Z_INCLUDE'])
-blenkernel_env.Append (CPPPATH = user_options_dict['SDL_INCLUDE'])
+defs += ' WITH_CCGSUBSURF'
+
+if env['WITH_BF_PLAYER']:
+ SConscript(['bad_level_call_stubs/SConscript'])
+
+env.BlenderLib ( libname = 'blenkernel', sources = sources, includes = Split(incs), defines = Split(defs), libtype='core', priority = 65 )
diff --git a/source/blender/blenkernel/bad_level_call_stubs/SConscript b/source/blender/blenkernel/bad_level_call_stubs/SConscript
index 1cb06ecc43d..278c74a38f6 100644
--- a/source/blender/blenkernel/bad_level_call_stubs/SConscript
+++ b/source/blender/blenkernel/bad_level_call_stubs/SConscript
@@ -1,27 +1,14 @@
#!/usr/bin/python
-Import ('user_options_dict')
-Import ('library_env')
+Import ('env')
-blenkernel_blc_env = library_env.Copy ()
+sources = 'stubs.c'
-source_files = ['stubs.c'
- ]
-blenkernel_blc_env.Append (CPPPATH = ['.',
- '..',
- '../../render/extern/include',
- '#/intern/iksolver/extern',
- '../../blenlib',
- '../../include',
- '../../makesdna'])
-"""
-,
- '#/intern/guardedalloc',
- '../python',
- '../imbuf',
- '../avi',
- '../blenloader']
-"""
-if user_options_dict['USE_INTERNATIONAL'] == 1:
- blenkernel_blc_env.Append (CPPDEFINES = 'WITH_FREETYPE2')
+incs = '. .. ../../render/extern/include'
+incs += ' #/intern/iksolver/extern ../../blenlib'
+incs += ' ../../include ../../makesdna'
-blenkernel_blc_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/blender_blenkernel_blc', source=source_files)
+defs = ''
+if env['WITH_BF_FREETYPE'] == 1:
+ defs += 'WITH_FREETYPE2'
+
+env.BlenderLib ('blenkernel_blc', sources = Split(sources), includes=Split(incs), defines=Split(defs), libtype='player2',priority=0 )
diff --git a/source/blender/blenlib/SConscript b/source/blender/blenlib/SConscript
index e6b50a4e2ff..99c48c74fb2 100644
--- a/source/blender/blenlib/SConscript
+++ b/source/blender/blenlib/SConscript
@@ -1,47 +1,15 @@
#!/usr/bin/python
-Import ('extra_includes')
-Import ('user_options_dict')
-Import ('library_env')
+Import ('env')
-blenlib_env = library_env.Copy ()
+sources = env.Glob('intern/*.c')
-source_files = ['intern/BLI_dynstr.c',
- 'intern/BLI_ghash.c',
- 'intern/edgehash.c',
- 'intern/BLI_linklist.c',
- 'intern/BLI_memarena.c',
- 'intern/arithb.c',
- 'intern/dynlib.c',
- 'intern/fileops.c',
- 'intern/gsqueue.c',
- 'intern/matrixops.c',
- 'intern/noise.c',
- 'intern/psfont.c',
- 'intern/rand.c',
- 'intern/rct.c',
- 'intern/scanfill.c',
- 'intern/storage.c',
- 'intern/time.c',
- 'intern/util.c',
- 'intern/vectorops.c',
- 'intern/freetypefont.c',
- 'intern/jitter.c',
- 'intern/threads.c',
- 'intern/winstuff.c']
+incs = '. ../makesdna ../blenkernel #/intern/guardedalloc ../include'
+incs += ' ' + env['BF_FREETYPE_INC']
+incs += ' ' + env['BF_ZLIB_INC']
+incs += ' ' + env['BF_SDL_INC']
+defs = ''
+if env['WITH_BF_FREETYPE'] == 1:
+ defs = 'WITH_FREETYPE2'
-blenlib_env.Append (CPPPATH = ['.',
- '../blenlib',
- '../makesdna',
- '../blenkernel',
- '#/intern/guardedalloc',
- '../include'])
-
-if user_options_dict['USE_INTERNATIONAL'] == 1:
- blenlib_env.Append (CPPDEFINES = 'WITH_FREETYPE2')
-
-blenlib_env.Append (CPPPATH = extra_includes)
-blenlib_env.Prepend (CPPPATH = user_options_dict['FREETYPE_INCLUDE'])
-blenlib_env.Append (CPPPATH = user_options_dict['Z_INCLUDE'])
-blenlib_env.Append (CPPPATH = user_options_dict['SDL_INCLUDE'])
-blenlib_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/blender_blenlib', source=source_files)
+env.BlenderLib ( 'blender_blenlib', sources, Split(incs), Split(defs), libtype='core', priority = 85 )
diff --git a/source/blender/blenloader/SConscript b/source/blender/blenloader/SConscript
index 62a652e4174..33e30e56793 100644
--- a/source/blender/blenloader/SConscript
+++ b/source/blender/blenloader/SConscript
@@ -1,28 +1,13 @@
#!/usr/bin/python
-Import ('user_options_dict')
-Import ('library_env')
+Import ('env')
-blenloader_env = library_env.Copy ()
+sources = env.Glob('intern/*.c')
-source_files = ['intern/genfile.c',
- 'intern/readblenentry.c',
- 'intern/undofile.c',
- 'intern/readfile.c',
- 'intern/writefile.c']
+incs = '. #/intern/guardedalloc ../blenlib ../blenkernel'
+incs += ' ../makesdna ../readblenfile ../include'
+incs += ' ../python ../../kernel/gen_messaging'
+incs += ' ../render/extern/include'
-blenloader_env.Append (CPPPATH = ['.',
- '../blenloader',
- '#/intern/guardedalloc',
- '../blenlib',
- '../blenkernel',
- '../makesdna',
- '../readblenfile',
- '../include',
- '../python',
- '../../kernel/gen_messaging',
- '../render/extern/include',
- '../writestreamglue',
- '../readstreamglue'])
+incs += ' ' + env['BF_ZLIB_INC']
-blenloader_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/blender_blenloader', source=source_files)
-blenloader_env.Append (CPPPATH = user_options_dict['Z_INCLUDE'])
+env.BlenderLib ( 'blender_blenloader', sources, Split(incs), [], libtype='core', priority = 70 )
diff --git a/source/blender/blenpluginapi/SConscript b/source/blender/blenpluginapi/SConscript
index 21b89b74d24..f1ba8b3af74 100644
--- a/source/blender/blenpluginapi/SConscript
+++ b/source/blender/blenpluginapi/SConscript
@@ -1,17 +1,14 @@
#!/usr/bin/python
-Import ('user_options_dict')
-Import ('library_env')
+Import ('env')
-blenplugin_env = library_env.Copy ()
+sources = env.Glob('intern/*.c')
-source_files = ['intern/pluginapi.c']
+incs = '. .. #/intern/guardedalloc ../blenlib ../imbuf ../makesdna'
-blenplugin_env.Append (CPPPATH = ['.',
- '..',
- '../blenpluginapi',
- '#/intern/guardedalloc',
- '../blenlib',
- '../imbuf',
- '../makesdna'])
+defs = []
-blenplugin_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/blender_blenpluginapi', source=source_files)
+if env['WITH_BF_QUICKTIME'] == 1:
+ defs.append('WITH_QUICKTIME')
+ incs += ' ' + env['BF_QUICKTIME_INC']
+
+env.BlenderLib ( libname = 'blender_blenpluginapi', sources = sources, includes = Split(incs), defines = defs, libtype='core', priority = 75 )
diff --git a/source/blender/ftfont/SConscript b/source/blender/ftfont/SConscript
index 50cd37d6526..9d9da82fac2 100644
--- a/source/blender/ftfont/SConscript
+++ b/source/blender/ftfont/SConscript
@@ -1,23 +1,15 @@
#!/usr/bin/python
-Import ('extra_includes')
-Import ('user_options_dict')
-Import ('library_env')
+import sys
+Import ('env')
-ftf_env = library_env.Copy ()
+sources = env.Glob('intern/*.cpp')
-source_files = ['intern/FTF_Api.cpp',
- 'intern/FTF_TTFont.cpp']
-
-include_paths = ['.',
- 'intern',
- '../blenkernel',
- '../blenlib',
- '../makesdna']
+incs = '. intern ../blenkernel ../blenlib ../makesdna'
+incs += ' ' + env['BF_FTGL_INC']
+incs += ' ' + env['BF_FREETYPE_INC']
+incs += ' ' + env['BF_GETTEXT_INC']
-ftf_env.Append(CPPPATH = extra_includes)
-ftf_env.Append(CPPPATH = include_paths)
-ftf_env.Prepend (CPPPATH = user_options_dict['FTGL_INCLUDE'])
-ftf_env.Prepend (CPPPATH = user_options_dict['FREETYPE_INCLUDE'])
-ftf_env.Prepend (CPPPATH = user_options_dict['GETTEXT_INCLUDE'])
-ftf_env.Append(CPPDEFINES = 'FTGL_STATIC_LIBRARY')
-ftf_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/blender_FTF', source=source_files)
+defs = 'FTGL_STATIC_LIBRARY'
+if sys.platform == 'win32':
+ defs += ' _WIN32 USE_GETTEXT_DLL'
+env.BlenderLib ( 'blender_FTF', sources, Split(incs), Split(defs), libtype='international', priority=0 )
diff --git a/source/blender/imbuf/SConscript b/source/blender/imbuf/SConscript
index c73c0593a86..938e306e7f6 100644
--- a/source/blender/imbuf/SConscript
+++ b/source/blender/imbuf/SConscript
@@ -1,56 +1,23 @@
#!/usr/bin/python
-Import ('extra_includes')
-Import ('user_options_dict')
-Import ('library_env')
+Import ('env')
-imbuf_env = library_env.Copy ()
+sources = env.Glob('intern/*.c')
-#if user_options_dict['USE_OPENEXR'] == 1:
-# SConscript (['intern/openexr/SConscript'])
+incs = '. ../makesdna #/intern/guardedalloc ../blenlib'
+incs += ' ../avi ../quicktime ../blenkernel'
-source_files = ['intern/allocimbuf.c',
- 'intern/amiga.c',
- 'intern/anim.c',
- 'intern/anim5.c',
- 'intern/antialias.c',
- 'intern/bitplanes.c',
- 'intern/bmp.c',
- 'intern/cmap.c',
- 'intern/cspace.c',
- 'intern/data.c',
- 'intern/dither.c',
- 'intern/divers.c',
- 'intern/dynlibtiff.c',
- 'intern/filter.c',
- 'intern/ham.c',
- 'intern/hamx.c',
- 'intern/iff.c',
- 'intern/imageprocess.c',
- 'intern/iris.c',
- 'intern/jpeg.c',
- 'intern/png.c',
- 'intern/radiance_hdr.c',
- 'intern/readimage.c',
- 'intern/rectop.c',
- 'intern/rotate.c',
- 'intern/scaling.c',
- 'intern/targa.c',
- 'intern/tiff.c',
- 'intern/util.c',
- 'intern/writeimage.c']
+incs += ' ' + env['BF_JPEG_INC']
+incs += ' ' + env['BF_PNG_INC']
+incs += ' ' + env['BF_TIFF_INC']
+incs += ' ' + env['BF_ZLIB_INC']
-imbuf_env.Append (CPPPATH = ['.',
- '../imbuf',
- '../makesdna',
- '#/intern/guardedalloc',
- '../blenlib',
- '../avi',
- '../quicktime',
- '../blenkernel'])
+defs = []
-imbuf_env.Append (CPPPATH = user_options_dict['JPEG_INCLUDE'])
-imbuf_env.Append (CPPPATH = user_options_dict['PNG_INCLUDE'])
-imbuf_env.Append (CPPPATH = user_options_dict['TIFF_INCLUDE'])
-imbuf_env.Append (CPPPATH = user_options_dict['Z_INCLUDE'])
-imbuf_env.Append (CPPPATH = extra_includes)
-imbuf_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/blender_imbuf', source=source_files)
+if env['WITH_BF_OPENEXR'] == 1:
+ defs.append('WITH_OPENEXR')
+
+if env['WITH_BF_QUICKTIME']==1:
+ incs += ' ' + env['BF_QUICKTIME_INC']
+ defs.append('WITH_QUICKTIME')
+
+env.BlenderLib ( libname = 'blender_imbuf', sources = sources, includes = Split(incs), defines = defs, libtype='core', priority = 80 )
diff --git a/source/blender/imbuf/intern/openexr/SConscript b/source/blender/imbuf/intern/openexr/SConscript
index 22b61500cc2..ec7b9b3518d 100644
--- a/source/blender/imbuf/intern/openexr/SConscript
+++ b/source/blender/imbuf/intern/openexr/SConscript
@@ -1,22 +1,17 @@
#!/usr/bin/python
-Import ('extra_includes')
-Import ('user_options_dict')
-Import ('library_env')
+Import ('env')
-openexr_env = library_env.Copy ()
+source_files = ['openexr_api.cpp']
-source_files = ['openexr_api.cpp'
- ]
+incs = ['.',
+ '../../../blenkernel',
+ '../../',
+ '..',
+ '../../../blenlib',
+ '../../../makesdna']
+incs += Split(env['BF_OPENEXR_INC'])
-include_paths = ['.',
- '../../../blenkernel',
- '../../',
- '..',
- '../../../blenlib',
- '../../../makesdna']
+defs = []
-openexr_env.Append(CPPPATH = extra_includes)
-openexr_env.Append(CPPPATH = include_paths)
-openexr_env.Prepend (CPPPATH = user_options_dict['OPENEXR_INCLUDE'])
-#ftf_env.Append(CPPDEFINES = 'FTGL_STATIC_LIBRARY')
-openexr_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/blender_openexr', source=source_files)
+#openexr_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/blender_openexr', source=source_files)
+env.BlenderLib ('blender_openexr', source_files, incs, defs, libtype='core', priority = 90)
diff --git a/source/blender/img/SConscript b/source/blender/img/SConscript
index ed4564a3348..a2a60c3428b 100644
--- a/source/blender/img/SConscript
+++ b/source/blender/img/SConscript
@@ -1,15 +1,6 @@
-#!/usr/bin/python
-Import ('user_options_dict')
-Import ('library_env')
+#!/usr/bin/env python
+Import ('env')
-img_env = library_env.Copy ()
+sources = env.Glob('intern/*.cpp')
-source_files = ['intern/IMG_Api.cpp',
- 'intern/IMG_BrushRGBA32.cpp',
- 'intern/IMG_CanvasRGBA32.cpp',
- 'intern/IMG_Line.cpp',
- 'intern/IMG_Pixmap.cpp',
- 'intern/IMG_PixmapRGBA32.cpp',
- 'intern/IMG_Rect.cpp']
-
-img_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/blender_img', source=source_files)
+env.BlenderLib ( 'blender_img', sources, [], [], libtype='core', priority = 35 )
diff --git a/source/blender/makesdna/SConscript b/source/blender/makesdna/SConscript
index c9b352365ff..3978f8bbf48 100644
--- a/source/blender/makesdna/SConscript
+++ b/source/blender/makesdna/SConscript
@@ -1,14 +1,11 @@
#!/usr/bin/python
-Import ('user_options_dict')
-Import ('library_env')
-
-makesdna_env = library_env.Copy ()
+Import ('env')
objs = []
o = SConscript('intern/SConscript')
objs.append (o)
-makesdna_env.Append (CPPPATH = ['#/intern/guardedalloc'])
+incs = '#/intern/guardedalloc'
-makesdna_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/blender_makesdna', source=objs)
+env.BlenderLib ( 'blender_makesdna', objs, Split(incs), [], libtype='common', priority = 10 )
diff --git a/source/blender/makesdna/intern/SConscript b/source/blender/makesdna/intern/SConscript
index e30f14f69ce..2e18528aaa4 100644
--- a/source/blender/makesdna/intern/SConscript
+++ b/source/blender/makesdna/intern/SConscript
@@ -2,33 +2,39 @@
import sys
import os
-Import ('cflags')
-Import ('defines')
-Import ('user_options_dict')
+#Import ('cflags')
+#Import ('defines')
+Import ('env')
+cflags = ''
+defines = []
+root_build_dir=env['BF_BUILDDIR']
# TODO: make sure the makesdna program does not get installed on the system.
source_files = ['makesdna.c']
-makesdna_tool = Environment (ENV = os.environ, CCFLAGS='-DBASE_HEADER="\\"source/blender/makesdna/\\"" ')
+makesdna_tool = env.Copy()
+dna = env.Copy()
+makesdna_tool.Append(CCFLAGS = '-DBASE_HEADER="\\"source/blender/makesdna/\\"" ')
+#makesdna_tool = Environment (ENV = os.environ, CCFLAGS='-DBASE_HEADER="\\"source/blender/makesdna/\\"" ')
makesdna_tool.Append (CPPPATH = ['#/intern/guardedalloc',
'../../makesdna'])
-makesdna_tool.Replace (CC = user_options_dict['HOST_CC'])
-makesdna_tool.Replace (PATH = user_options_dict['PATH'])
+#makesdna_tool.Replace (CC = user_options_dict['HOST_CC'])
+#makesdna_tool.Replace (PATH = user_options_dict['PATH'])
if sys.platform != 'cygwin':
- makesdna_tool.Append (CCFLAGS = cflags)
- makesdna_tool.Append (LINKFLAGS = user_options_dict['PLATFORM_LINKFLAGS'])
+ makesdna_tool.Append (CCFLAGS = cflags)
+ #makesdna_tool.Append (LINKFLAGS = user_options_dict['PLATFORM_LINKFLAGS'])
makesdna_tool.Append (CPPDEFINES = defines)
-makesdna_tool.Append (LIBPATH = '#'+user_options_dict['BUILD_DIR']+'/lib')
+makesdna_tool.Append (LIBPATH = '#'+root_build_dir+'/lib')
makesdna_tool.Append (LIBS = 'blender_guardedalloc')
-makesdna_tool.Program (target = '#'+user_options_dict['BUILD_DIR']+'makesdna', source = source_files)
+makesdna_tool.Program (target = '#'+root_build_dir+'makesdna', source = source_files)
-dna = Environment (ENV = os.environ)
+#dna = Environment (ENV = os.environ)
dna_dict = dna.Dictionary()
-makesdna_name = user_options_dict['BUILD_DIR']+'makesdna' + dna_dict['PROGSUFFIX']
+makesdna_name = root_build_dir+'makesdna' + dna_dict['PROGSUFFIX']
dna.Depends ('dna.c', '#'+makesdna_name)
-dna.Command ('dna.c', '', user_options_dict['BUILD_DIR']+"makesdna $TARGET")
+dna.Command ('dna.c', '', root_build_dir+"makesdna $TARGET")
obj = 'intern/dna.c'
Return ('obj')
diff --git a/source/blender/python/SConscript b/source/blender/python/SConscript
index aedafd84e96..a0622849465 100644
--- a/source/blender/python/SConscript
+++ b/source/blender/python/SConscript
@@ -1,81 +1,18 @@
#!/usr/bin/python
-Import ('extra_includes')
-Import ('user_options_dict')
-Import ('library_env')
+Import ('env')
-python_env = library_env.Copy ()
+sources = Split('BPY_interface.c BPY_menus.c') + env.Glob('api2_2x/*.c')
-source_files = ['BPY_interface.c',
- 'BPY_menus.c',
- 'api2_2x/Armature.c',
- 'api2_2x/BezTriple.c',
- 'api2_2x/BGL.c',
- 'api2_2x/Blender.c',
- 'api2_2x/Bone.c',
- 'api2_2x/Camera.c',
- 'api2_2x/CurNurb.c',
- 'api2_2x/Curve.c',
- 'api2_2x/Draw.c',
- 'api2_2x/Effect.c',
- 'api2_2x/Font.c',
- 'api2_2x/EXPP_interface.c',
- 'api2_2x/Ipocurve.c',
- 'api2_2x/Ipo.c',
- 'api2_2x/Key.c',
- 'api2_2x/Lamp.c',
- 'api2_2x/Lattice.c',
- 'api2_2x/Library.c',
- 'api2_2x/MTex.c',
- 'api2_2x/Material.c',
- 'api2_2x/Mathutils.c',
- 'api2_2x/Mesh.c',
- 'api2_2x/Metaball.c',
- 'api2_2x/NLA.c',
- 'api2_2x/Noise.c',
- 'api2_2x/NMesh.c',
- 'api2_2x/Object.c',
- 'api2_2x/Pose.c',
- 'api2_2x/point.c',
- 'api2_2x/Registry.c',
- 'api2_2x/Scene.c',
- 'api2_2x/Sound.c',
- 'api2_2x/Sys.c',
- 'api2_2x/Types.c',
- 'api2_2x/Window.c',
- 'api2_2x/World.c',
- 'api2_2x/Pose.c',
- 'api2_2x/Image.c',
- 'api2_2x/Text.c',
- 'api2_2x/Text3d.c',
- 'api2_2x/Texture.c',
- 'api2_2x/Noise.c',
- 'api2_2x/charRGBA.c',
- 'api2_2x/constant.c',
- 'api2_2x/euler.c',
- 'api2_2x/gen_utils.c',
- 'api2_2x/logic.c',
- 'api2_2x/matrix.c',
- 'api2_2x/quat.c',
- 'api2_2x/rgbTuple.c',
- 'api2_2x/sceneRender.c',
- 'api2_2x/sceneRadio.c',
- 'api2_2x/sceneTimeLine.c',
- 'api2_2x/vector.c',
- 'api2_2x/windowTheme.c']
+incs = 'api2_2x ../blenkernel ../blenlib ../blenloader'
+incs += ' ../render/extern/include ../radiosity/extern/include'
+incs += ' ../makesdna #intern/guardedalloc #intern/bmfont ../imbuf ../include'
+incs += ' ' + env['BF_PYTHON_INC']
+incs += ' ' + env['BF_OPENGL_INC']
-python_env.Append (CPPPATH = ['api2_2x',
- '../blenkernel',
- '../blenlib',
- '../blenloader',
- '../render/extern/include',
- '../radiosity/extern/include',
- '../makesdna',
- '#/intern/guardedalloc',
- '#/intern/bmfont',
- '../imbuf',
- '../include'])
+defs = []
-python_env.Append (CPPPATH = user_options_dict['PYTHON_INCLUDE'])
-python_env.Append (CPPPATH = user_options_dict['OPENGL_INCLUDE'])
-python_env.Append (CPPPATH = extra_includes)
-python_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/blender_python', source=source_files)
+if env['WITH_BF_QUICKTIME']==1:
+ incs += ' ' + env['BF_QUICKTIME_INC']
+ defs.append('WITH_QUICKTIME')
+
+env.BlenderLib ( libname='blender_python', sources = Split(sources), includes = Split(incs), defines = defs, libtype=['core','game2'], priority = [60,115] )
diff --git a/source/blender/quicktime/SConscript b/source/blender/quicktime/SConscript
index f47611bbb13..dafbb865bf6 100644
--- a/source/blender/quicktime/SConscript
+++ b/source/blender/quicktime/SConscript
@@ -1,26 +1,22 @@
#!/usr/bin/python
-Import ('extra_includes')
-Import ('user_options_dict')
-Import ('library_env')
-
-quicktime_env = library_env.Copy ()
-
-quicktime_env.Append (CPPPATH = extra_includes)
+Import ('env')
source_files = ['apple/quicktime_import.c',
'apple/quicktime_export.c']
-quicktime_env.Append (CPPPATH = ['.',
- '../quicktime',
- '../makesdna',
- '#/intern/guardedalloc',
- '../blenlib',
- '../blenkernel',
- '../avi',
- '../imbuf',
- '../imbuf/intern',
- '../blenloader',
- '../render/extern/include',
- '../include'])
+incs = ['.',
+ '../quicktime',
+ '../makesdna',
+ '#/intern/guardedalloc',
+ '../blenlib',
+ '../blenkernel',
+ '../avi',
+ '../imbuf',
+ '../imbuf/intern',
+ '../blenloader',
+ '../render/extern/include',
+ '../include']
+
+incs.append(env['BF_QUICKTIME_INC'])
-quicktime_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/blender_quicktime', source=source_files)
+env.BlenderLib ('blender_quicktime', sources=source_files, includes=incs, defines=['WITH_QUICKTIME'], libtype='core', priority=95)
diff --git a/source/blender/radiosity/SConscript b/source/blender/radiosity/SConscript
index 0c7205e6a83..102f79683f9 100644
--- a/source/blender/radiosity/SConscript
+++ b/source/blender/radiosity/SConscript
@@ -1,26 +1,12 @@
#!/usr/bin/python
-Import ('user_options_dict')
-Import ('library_env')
+Import ('env')
-rad_env = library_env.Copy ()
+sources = env.Glob('intern/source/*.c')
-source_files = ['intern/source/raddisplay.c',
- 'intern/source/radfactors.c',
- 'intern/source/radrender.c',
- 'intern/source/radio.c',
- 'intern/source/radnode.c',
- 'intern/source/radpostprocess.c',
- 'intern/source/radpreprocess.c']
+incs = 'extern/include ../blenlib ../blenkernel ../makesdna ../include'
+incs += ' #/intern/guardedalloc ../render/extern/include'
+incs += ' ../render/intern/include'
-rad_env.Append (CPPPATH = ['extern/include',
- '../blenlib',
- '../blenkernel',
- '../makesdna',
- '../include',
- '#/intern/guardedalloc',
- '../render/extern/include',
- '../render/intern/include'])
+incs += ' ' + env['BF_OPENGL_INC']
-rad_env.Append (CPPPATH = user_options_dict['OPENGL_INCLUDE'])
-
-rad_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/blender_radiosity', source=source_files)
+env.BlenderLib ( 'blender_radiosity', sources, Split(incs), [], libtype='core', priority=50 )
diff --git a/source/blender/readblenfile/SConscript b/source/blender/readblenfile/SConscript
index 1f0909b1f84..901871ad298 100644
--- a/source/blender/readblenfile/SConscript
+++ b/source/blender/readblenfile/SConscript
@@ -1,20 +1,8 @@
#!/usr/bin/python
-Import ('user_options_dict')
-Import ('library_env')
+Import ('env')
-readblenfile_env = library_env.Copy ()
+sources = env.Glob('intern/*.c')
-source_files = ['intern/BLO_readblenfile.c']
+incs = '. ../blenloader ../blenloader/intern ../blenkernel ../blenlib ../makesdna ../../kernel/gen_messaging'
-readblenfile_env.Append (CPPPATH = ['.',
-
-'../readblenfile',
- '../readstreamglue',
- '../blenloader',
- '../blenloader/intern',
- '../blenkernel',
- '../blenlib',
- '../makesdna',
- '../../kernel/gen_messaging'])
-
-readblenfile_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/blender_readblenfile', source=source_files)
+env.BlenderLib ( 'blender_readblenfile', sources, Split(incs), [], libtype='common', priority = 0 )
diff --git a/source/blender/render/SConscript b/source/blender/render/SConscript
index 256d4b16d86..b6243ecbcfb 100644
--- a/source/blender/render/SConscript
+++ b/source/blender/render/SConscript
@@ -1,39 +1,18 @@
#!/usr/bin/python
-Import ('user_options_dict')
-Import ('library_env')
+Import ('env')
-render_env = library_env.Copy ()
+sources = env.Glob('intern/source/*.c')
-source_files = ['intern/source/convertblender.c',
- 'intern/source/edgeRender.c',
- 'intern/source/envmap.c',
- 'intern/source/gammaCorrectionTables.c',
- 'intern/source/imagetexture.c',
- 'intern/source/initrender.c',
- 'intern/source/pixelblending.c',
- 'intern/source/pixelshading.c',
- 'intern/source/pipeline.c',
- 'intern/source/ray.c',
- 'intern/source/rendercore.c',
- 'intern/source/renderdatabase.c',
- 'intern/source/shadbuf.c',
- 'intern/source/texture.c',
- 'intern/source/zbuf.c']
+incs = 'intern/include #/intern/guardedalloc ../blenlib ../makesdna'
+incs += ' extern/include ../blenkernel ../radiosity/extern/include ../imbuf'
+incs += ' ../quicktime ../include ../../kernel/gen_messaging ../yafray'
+incs += ' ' + env['BF_SDL_INC']
-render_env.Append (CPPPATH = ['intern/include',
- '#/intern/guardedalloc',
- '../blenlib',
- '../makesdna',
- 'extern/include',
- '../blenkernel',
- '../radiosity/extern/include',
- '../imbuf',
- '../quicktime',
- '../include',
- '../../kernel/gen_messaging',
- '../yafray'])
+defs = []
-render_env.Append (CPPPATH = user_options_dict['SDL_INCLUDE'])
+if env['WITH_BF_QUICKTIME'] == 1:
+ defs.append('WITH_QUICKTIME')
+ incs += ' ' + env['BF_QUICKTIME_INC']
-render_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/blender_render', source=source_files)
+env.BlenderLib ( libname = 'blender_render', sources = sources, includes = Split(incs), defines=defs, libtype='core', priority=45 )
diff --git a/source/blender/src/SConscript b/source/blender/src/SConscript
index bc5d9a3baa4..1243e81609f 100644
--- a/source/blender/src/SConscript
+++ b/source/blender/src/SConscript
@@ -1,181 +1,38 @@
#!/usr/bin/python
-Import ('extra_includes')
-Import ('user_options_dict')
-Import ('library_env')
-Import ('defines')
+Import ('env')
-src_env = library_env.Copy ()
-src_env.Append (CCFLAGS = user_options_dict['SDL_CFLAGS'])
-src_env.Append(CPPDEFINES = defines)
+# TODO: src_env.Append (CCFLAGS = user_options_dict['SDL_CFLAGS'])
-source_files = ['B.blend.c',
- 'Bfont.c',
- 'bfont.ttf.c',
- 'blenderbuttons.c',
- 'booleanops.c',
- 'booleanops_mesh.c',
- 'buttons_editing.c',
- 'buttons_logic.c',
- 'buttons_object.c',
- 'buttons_scene.c',
- 'buttons_script.c',
- 'buttons_shading.c',
- 'butspace.c',
- 'cmap.tga.c',
- 'cmovie.tga.c',
- 'cursors.c',
- 'drawaction.c',
- 'drawarmature.c',
- 'drawdeps.c',
- 'drawimage.c',
- 'drawimasel.c',
- 'drawipo.c',
- 'drawmesh.c',
- 'drawnla.c',
- 'drawobject.c',
- 'drawoops.c',
- 'drawscene.c',
- 'drawscript.c',
- 'drawseq.c',
- 'drawsound.c',
- 'drawtext.c',
- 'drawtime.c',
- 'drawview.c',
- 'drawnode.c',
- 'edit.c',
- 'editaction.c',
- 'editarmature.c',
- 'editconstraint.c',
- 'editcurve.c',
- 'editdeform.c',
- 'editface.c',
- 'editfont.c',
- 'editgroup.c',
- 'editimasel.c',
- 'editipo.c',
- 'editipo_lib.c',
- 'editipo_mods.c',
- 'editkey.c',
- 'editlattice.c',
- 'editmball.c',
- 'editmesh.c',
- 'editnode.c',
- 'editmesh_add.c',
- 'editmesh_lib.c',
- 'editmesh_loop.c',
- 'editmesh_mods.c',
- 'editmesh_tools.c',
- 'editmode_undo.c',
- 'editnla.c',
- 'editobject.c',
- 'editoops.c',
- 'editscreen.c',
- 'editseq.c',
- 'editsima.c',
- 'editsound.c',
- 'edittime.c',
- 'editview.c',
- 'eventdebug.c',
- 'filesel.c',
- 'fluidsim.c',
- 'ghostwinlay.c',
- 'glutil.c',
- 'headerbuttons.c',
- 'header_action.c',
- 'header_buttonswin.c',
- 'header_filesel.c',
- 'header_image.c',
- 'header_imasel.c',
- 'header_info.c',
- 'header_ipo.c',
- 'header_nla.c',
- 'header_oops.c',
- 'header_script.c',
- 'header_seq.c',
- 'header_sound.c',
- 'header_text.c',
- 'header_time.c',
- 'header_view3d.c',
- 'header_node.c',
- 'imagepaint.c',
- 'imasel.c',
- 'interface.c',
- 'interface_panel.c',
- 'interface_draw.c',
- 'interface_icons.c',
- 'keyval.c',
- 'lorem.c',
- 'mainqueue.c',
- 'meshtools.c',
- 'mywindow.c',
- 'oops.c',
- 'outliner.c',
- 'splash.jpg.c',
- 'parametrizer.c',
- 'playanim.c',
- 'poseobject.c',
- 'previewrender.c',
- 'preview.blend.c',
- 'renderwin.c',
- 'resources.c',
- 'scrarea.c',
- 'screendump.c',
- 'sequence.c',
- 'seqaudio.c',
- 'space.c',
- 'spacetypes.c',
- 'swapbuffers.c',
- 'toets.c',
- 'toolbox.c',
- 'transform.c',
- 'transform_generics.c',
- 'transform_numinput.c',
- 'transform_constraints.c',
- 'transform_conversions.c',
- 'transform_manipulator.c',
- 'unwrapper.c',
- 'usiblender.c',
- 'view.c',
- 'vpaint.c',
- 'writeavicodec.c',
- 'writeimage.c',
- 'writemovie.c',
- 'language.c']
+sources = env.Glob('*.c')
-src_env.Append (CPPPATH = ['#/intern/guardedalloc',
- '../blenlib',
- '../makesdna',
- '../blenkernel',
- '../include',
- '#/intern/bmfont',
- '../imbuf',
- '../render/extern/include',
- '#/intern/bsp/extern',
- '../radiosity/extern/include',
- '#/intern/decimation/extern',
- '../blenloader',
- '../python',
- '../../kernel/gen_system',
- '#/intern/SoundSystem',
- '../readstreamglue',
- '../img',
- '../quicktime',
- '#/intern/elbeem/extern',
- '#/intern/ghost',
- '#/intern/opennl/extern'])
+incs = ' #/intern/guardedalloc ../blenlib ../makesdna ../blenkernel'
+incs += ' ../include #/intern/bmfont ../imbuf ../render/extern/include'
+incs += ' #/intern/bsp/extern ../renderconverter ../radiosity/extern/include'
+incs += ' #/intern/decimation/extern ../blenloader ../python'
+incs += ' ../../kernel/gen_system #/intern/SoundSystem ../readstreamglue'
+incs += ' ../img ../quicktime #/intern/elbeem/extern'
+incs += ' #/intern/ghost #/intern/opennl/extern'
-src_env.Append (CPPPATH = user_options_dict['PYTHON_INCLUDE'])
-src_env.Append (CPPPATH = user_options_dict['SDL_INCLUDE'])
-src_env.Append (CPPPATH = user_options_dict['OPENGL_INCLUDE'])
+incs += ' ' + env['BF_PYTHON_INC']
+incs += ' ' + env['BF_SDL_INC']
+incs += ' ' + env['BF_OPENGL_INC']
-if user_options_dict['USE_INTERNATIONAL'] == 1:
- src_env.Append (CPPPATH=['../ftfont'])
- src_env.Append (CPPDEFINES = 'INTERNATIONAL')
- src_env.Append (CPPDEFINES = 'FTGL_STATIC_LIBRARY')
+defs = []
-if user_options_dict['USE_BUILDINFO'] == 1:
- src_env.Append (CPPDEFINES = 'NAN_BUILDINFO')
+if env['WITH_BF_FREETYPE'] == 1:
+ incs += ' ../ftfont'
+ defs.append('INTERNATIONAL')
+ defs.append('FTGL_STATIC_LIBRARY')
-src_env.Append (CPPPATH=extra_includes)
+if env['WITH_BF_OPENEXR'] == 1:
+ defs.append('WITH_OPENEXR')
-src_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/blender_blendersrc', source=source_files)
+if env['WITH_BF_QUICKTIME']==1:
+ incs += ' ' + env['BF_QUICKTIME_INC']
+ defs.append('WITH_QUICKTIME')
+
+# TODO buildinfo
+#if env['USE_BUILDINFO'] == 1:
+# defs += ' NAN_BUILDINFO'
+
+env.BlenderLib ( libname = 'src', sources = sources, includes = Split(incs), defines = defs, libtype=['core', 'intern'], priority = [5, 25] )
diff --git a/source/blender/yafray/SConscript b/source/blender/yafray/SConscript
index a50ed2243fe..8da3b16fbfe 100644
--- a/source/blender/yafray/SConscript
+++ b/source/blender/yafray/SConscript
@@ -1,22 +1,9 @@
#!/usr/bin/python
-Import ('user_options_dict')
-Import ('library_env')
+Import ('env')
-yafray_env = library_env.Copy ()
+sources = env.Glob('intern/*.cpp')
-source_files = ['intern/yafray_Render.cpp',
- 'intern/export_File.cpp',
- 'intern/export_Plugin.cpp',
- 'intern/yafexternal.cpp',
- 'intern/api.cpp']
+incs = '#/intern/guardedalloc ../blenlib ../makesdna ../blenkernel'
+incs += ' ../imbuf ../include ../render/extern/include ../render/intern/include'
-yafray_env.Append (CPPPATH = ['#/intern/guardedalloc',
- '../blenlib',
- '../makesdna',
- '../blenkernel',
- '../imbuf',
- '../include',
- '../render/extern/include',
- '../render/intern/include'])
-
-yafray_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/blender_yafray', source=source_files)
+env.BlenderLib ( 'blender_yafray', sources, Split(incs), [], libtype='blender', priority=5 )
diff --git a/source/creator/SConscript b/source/creator/SConscript
index 412bb82e854..9bc49b2fc30 100644
--- a/source/creator/SConscript
+++ b/source/creator/SConscript
@@ -1,25 +1,18 @@
#!/usr/bin/python
-Import ('user_options_dict')
-Import ('library_env')
+Import ('env')
-creator_env = library_env.Copy ()
+sources = 'creator.c'
-source_files = ['creator.c']
+incs = '#/intern/guardedalloc ../blender/blenlib ../blender/blenkernel'
+incs += ' ../blender/include ../blender/blenloader ../blender/imbuf'
+incs += ' ../blender/renderconverter ../blender/render/extern/include'
+incs += ' ../blender/python ../blender/makesdna ../kernel/gen_messaging'
+incs += ' ../kernel/gen_system'
+incs += ' ' + env['BF_OPENGL_INC']
-creator_env.Append (CPPPATH = ['#/intern/guardedalloc',
- '../blender/blenlib',
- '../blender/blenkernel',
- '../blender/include',
- '../blender/blenloader',
- '../blender/imbuf',
- '../blender/render/extern/include',
- '../blender/python',
- '../blender/makesdna',
- '../kernel/gen_messaging',
- '../kernel/gen_system'])
-creator_env.Append (CPPPATH = user_options_dict['OPENGL_INCLUDE'])
+defs = []
+if env['WITH_BF_QUICKTIME']==1:
+ incs += ' ' + env['BF_QUICKTIME_INC']
+ defs.append('WITH_QUICKTIME')
-if user_options_dict['USE_QUICKTIME'] == 1:
- creator_env.Append (CPPDEFINES = ['WITH_QUICKTIME'])
-
-creator_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/blender_creator', source=source_files)
+env.BlenderLib ( libname = 'blender_creator', sources = Split(sources), includes = Split(incs), defines = defs, libtype='core', priority = 1 )
diff --git a/source/gameengine/BlenderRoutines/SConscript b/source/gameengine/BlenderRoutines/SConscript
index f586e72ad44..8db4513f841 100755
--- a/source/gameengine/BlenderRoutines/SConscript
+++ b/source/gameengine/BlenderRoutines/SConscript
@@ -1,55 +1,29 @@
#!/usr/bin/python
import sys
-Import ('user_options_dict')
-Import ('library_env')
+Import ('env')
-kx_blenderhook_env = library_env.Copy ()
+sources = env.Glob('*.cpp')
-source_files = ['KX_BlenderSystem.cpp',
- 'KX_BlenderRenderTools.cpp',
- 'KX_BlenderMouseDevice.cpp',
- 'KX_BlenderKeyboardDevice.cpp',
- 'KX_BlenderInputDevice.cpp',
- 'KX_BlenderGL.cpp',
- 'KX_BlenderCanvas.cpp',
- 'BL_KetsjiEmbedStart.cpp']
+incs = '. #source/kernel/gen_system #intern/string #intern/guardedalloc'
+incs += ' #source/gameengine/Rasterizer/RAS_OpenGLRasterizer #intern/bmfont'
+incs += ' #source/gameengine/Converter #source/blender/imbuf'
+incs += ' #intern/ghost/include'
+incs += ' #intern/moto/include #source/gameengine/Ketsji #source/blender/blenlib'
+incs += ' #source/blender/blenkernel #source/blender #source/blender/include'
+incs += ' #source/blender/makesdna #source/gameengine/Rasterizer #source/gameengine/GameLogic'
+incs += ' #source/gameengine/Expressions #source/gameengine/Network'
+incs += ' #source/gameengine/SceneGraph #source/gameengine/Physics/common'
+incs += ' #source/gameengine/Physics/Bullet #source/gameengine/Physics/Sumo'
+incs += ' #source/gameengine/Physics/Sumo/Fuzzics/include #source/gameengine/Network/LoopBackNetwork'
+incs += ' #intern/SoundSystem #source/blender/misc #source/blender/blenloader'
-kx_blenderhook_env.Append (CPPPATH=['.',
- '#source/kernel/gen_system',
- '#intern/string',
- '#intern/guardedalloc',
- '#source/gameengine/Rasterizer/RAS_OpenGLRasterizer',
- '#intern/bmfont',
- '#source/gameengine/Converter',
- '#source/blender/imbuf',
- '#intern/moto/include',
- '#source/gameengine/Ketsji',
- '#source/blender/blenlib',
- '#source/blender/blenkernel',
- '#source/blender',
- '#source/blender/include',
- '#source/blender/makesdna',
- '#source/gameengine/Rasterizer',
- '#source/gameengine/GameLogic',
- '#source/gameengine/Expressions',
- '#source/gameengine/Network',
- '#source/gameengine/SceneGraph',
- '#source/gameengine/Physics/common',
- '#source/gameengine/Physics/Bullet',
- '#source/gameengine/Physics/Sumo',
- '#source/gameengine/Physics/Sumo/Fuzzics/include',
- '#source/gameengine/Network/LoopBackNetwork',
- '#intern/SoundSystem',
- '#source/blender/misc',
- '#source/blender/blenloader'
- ])
+incs += ' ' + env['BF_PYTHON_INC']
+incs += ' ' + env['BF_SOLID_INC']
+incs += ' ' + env['BF_BULLET_INC']
+incs += ' ' + env['BF_OPENGL_INC']
-kx_blenderhook_env.Append (CPPPATH = user_options_dict['PYTHON_INCLUDE'])
-kx_blenderhook_env.Append (CPPPATH = user_options_dict['SOLID_INCLUDE'])
-kx_blenderhook_env.Append (CPPPATH = user_options_dict['BULLET_INCLUDE'])
-kx_blenderhook_env.Append (CPPPATH = user_options_dict['OPENGL_INCLUDE'])
+# TODO:
+#if sys.platform=='win32':
+# kx_blenderhook_env.Append (CXXFLAGS = ['/GR'])
-if sys.platform=='win32':
- kx_blenderhook_env.Append (CXXFLAGS = ['/GR'])
-
-kx_blenderhook_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/KX_blenderhook', source=source_files)
+env.BlenderLib ( 'KX_blenderhook', sources, Split(incs), [], libtype=['game', 'game2'], priority=[0, 0] )
diff --git a/source/gameengine/Converter/SConscript b/source/gameengine/Converter/SConscript
index 361aeed4120..82a059ea050 100755
--- a/source/gameengine/Converter/SConscript
+++ b/source/gameengine/Converter/SConscript
@@ -1,67 +1,25 @@
#!/usr/bin/python
-Import ('user_options_dict')
-Import ('library_env')
+Import ('env')
-kx_converter_env = library_env.Copy ()
+sources = env.Glob('*.cpp')
-source_files = ['KX_IpoConvert.cpp',
- 'KX_ConvertSensors.cpp',
- 'KX_ConvertProperties.cpp',
- 'KX_ConvertControllers.cpp',
- 'KX_ConvertActuators.cpp',
- 'KX_BlenderSceneConverter.cpp',
- 'KX_BlenderScalarInterpolator.cpp',
- 'BlenderWorldInfo.cpp',
- 'BL_SkinMeshObject.cpp',
- 'BL_SkinDeformer.cpp',
- 'BL_MeshDeformer.cpp',
- 'BL_DeformableGameObject.cpp',
- 'BL_BlenderDataConversion.cpp',
- 'BL_ArmatureObject.cpp',
- 'BL_ActionActuator.cpp'
- ]
+incs = '. #source/kernel/gen_system #intern/string #intern/guardedalloc'
+incs += ' #source/gameengine/Rasterizer/RAS_OpenGLRasterizer #intern/bmfont'
+incs += ' #intern/SoundSystem #intern/SoundSystem/include #intern/SoundSystem/openal'
+incs += ' #intern/SoundSystem/dummy #intern/SoundSystem/intern #source/gameengine/Converter'
+incs += ' #source/gameengine/BlenderRoutines #source/blender/imbuf'
+incs += ' #intern/moto/include #source/gameengine/Ketsji #source/gameengine/Ketsji/KXNetwork'
+incs += ' #source/blender/blenlib #source/blender/blenkernel #source/blender'
+incs += ' #source/blender/include #source/blender/makesdna #source/gameengine/Rasterizer'
+incs += ' #source/gameengine/Rasterizer/RAS_OpenGLRasterizer #source/gameengine/GameLogic'
+incs += ' #source/gameengine/Expressions #source/gameengine/Network #source/gameengine/SceneGraph'
+incs += ' #source/gameengine/Physics/common #source/gameengine/Physics/Bullet #source/gameengine/Physics/BlOde'
+incs += ' #source/gameengine/Physics/Dummy #source/gameengine/Physics/Sumo'
+incs += ' #source/gameengine/Physics/Sumo/Fuzzics/include #source/gameengine/Network/LoopBackNetwork'
+incs += ' #source/blender/misc #source/blender/blenloader'
-kx_converter_env.Append (CPPPATH = ['.',
- '#source/kernel/gen_system',
- '#intern/string',
- '#intern/guardedalloc',
- '#source/gameengine/Rasterizer/RAS_OpenGLRasterizer',
- '#intern/bmfont',
- '#intern/SoundSystem',
- '#intern/SoundSystem/include',
- '#intern/SoundSystem/openal',
- '#intern/SoundSystem/dummy',
- '#intern/SoundSystem/intern',
- '#source/gameengine/Converter',
- '#source/gameengine/BlenderRoutines',
- '#source/blender/imbuf',
- '#intern/moto/include',
- '#source/gameengine/Ketsji',
- '#source/gameengine/Ketsji/KXNetwork',
- '#source/blender/blenlib',
- '#source/blender/blenkernel',
- '#source/blender',
- '#source/blender/include',
- '#source/blender/makesdna',
- '#source/gameengine/Rasterizer',
- '#source/gameengine/Rasterizer/RAS_OpenGLRasterizer',
- '#source/gameengine/GameLogic',
- '#source/gameengine/Expressions',
- '#source/gameengine/Network',
- '#source/gameengine/SceneGraph',
- '#source/gameengine/Physics/common',
- '#source/gameengine/Physics/Bullet',
- '#source/gameengine/Physics/BlOde',
- '#source/gameengine/Physics/Dummy',
- '#source/gameengine/Physics/Sumo',
- '#source/gameengine/Physics/Sumo/Fuzzics/include',
- '#source/gameengine/Network/LoopBackNetwork',
- '#source/blender/misc',
- '#source/blender/blenloader'
- ])
+incs += ' ' + env['BF_PYTHON_INC']
+incs += ' ' + env['BF_SOLID_INC']
+incs += ' ' + env['BF_BULLET_INC']
-kx_converter_env.Append (CPPPATH = user_options_dict['PYTHON_INCLUDE'])
-kx_converter_env.Append (CPPPATH = user_options_dict['SOLID_INCLUDE'])
-kx_converter_env.Append (CPPPATH = user_options_dict['BULLET_INCLUDE'])
-
-kx_converter_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/KX_converter', source=source_files)
+env.BlenderLib ( 'KX_converter', sources, Split(incs), [], libtype='game', priority=5 )
diff --git a/source/gameengine/Expressions/SConscript b/source/gameengine/Expressions/SConscript
index 212381cc034..2fd3bf6fe75 100755
--- a/source/gameengine/Expressions/SConscript
+++ b/source/gameengine/Expressions/SConscript
@@ -1,34 +1,9 @@
#!/usr/bin/python
-Import ('user_options_dict')
-Import ('library_env')
+Import ('env')
-expressions_env = library_env.Copy ()
+sources = env.Glob('*.cpp')
-source_files = ['BoolValue.cpp',
- 'ConstExpr.cpp',
- 'EmptyValue.cpp',
- 'ErrorValue.cpp',
- 'EXP_C-Api.cpp',
- 'Expression.cpp',
- 'FloatValue.cpp',
- 'IdentifierExpr.cpp',
- 'IfExpr.cpp',
- 'InputParser.cpp',
- 'IntValue.cpp',
- 'KX_HashedPtr.cpp',
- 'ListValue.cpp',
- 'Operator1Expr.cpp',
- 'Operator2Expr.cpp',
- 'PyObjectPlus.cpp',
- 'StringValue.cpp',
- 'Value.cpp',
- 'VectorValue.cpp']
+incs ='. #source/kernel/gen_system #intern/string #intern/moto/include'
+incs += ' ' + env['BF_PYTHON_INC']
-expressions_env.Append (CPPPATH = ['.',
- '#source/kernel/gen_system',
- '#intern/string',
- '#intern/moto/include'])
-
-expressions_env.Append (CPPPATH = user_options_dict['PYTHON_INCLUDE'])
-
-expressions_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/blender_expressions', source=source_files)
+env.BlenderLib ( 'blender_expressions', sources, Split(incs), [], libtype='game', priority = 45 )
diff --git a/source/gameengine/GameLogic/SConscript b/source/gameengine/GameLogic/SConscript
index 928667ea4c1..126c84eecb2 100755
--- a/source/gameengine/GameLogic/SConscript
+++ b/source/gameengine/GameLogic/SConscript
@@ -1,48 +1,12 @@
#!/usr/bin/python
-Import ('user_options_dict')
-Import ('library_env')
+Import ('env')
-sca_gamelogic_env = library_env.Copy ()
+sources = env.Glob('*.cpp') + env.Glob('Joystick/*.cpp')
-source_files = ['SCA_ANDController.cpp',
- 'SCA_AlwaysEventManager.cpp',
- 'SCA_AlwaysSensor.cpp',
- 'SCA_EventManager.cpp',
- 'SCA_ExpressionController.cpp',
- 'SCA_IActuator.cpp',
- 'SCA_IController.cpp',
- 'SCA_IInputDevice.cpp',
- 'SCA_ILogicBrick.cpp',
- 'SCA_IObject.cpp',
- 'SCA_IScene.cpp',
- 'SCA_ISensor.cpp',
- 'SCA_JoystickManager.cpp',
- 'SCA_JoystickSensor.cpp',
- 'SCA_KeyboardManager.cpp',
- 'SCA_KeyboardSensor.cpp',
- 'SCA_LogicManager.cpp',
- 'SCA_MouseManager.cpp',
- 'SCA_MouseSensor.cpp',
- 'SCA_ORController.cpp',
- 'SCA_PropertyActuator.cpp',
- 'SCA_PropertyEventManager.cpp',
- 'SCA_PropertySensor.cpp',
- 'SCA_PythonController.cpp',
- 'SCA_RandomActuator.cpp',
- 'SCA_RandomEventManager.cpp',
- 'SCA_RandomNumberGenerator.cpp',
- 'SCA_RandomSensor.cpp',
- 'SCA_TimeEventManager.cpp',
- 'Joystick/SCA_Joystick.cpp',
- 'Joystick/SCA_JoystickEvents.cpp']
+incs = '. #/source/kernel/gen_system #/intern/string'
+incs += ' #/source/gameengine/Expressions #/intern/moto/include'
-sca_gamelogic_env.Append (CPPPATH=['.',
- '#/source/kernel/gen_system',
- '#/intern/string',
- '#/source/gameengine/Expressions',
- '#/intern/moto/include'])
+incs += ' ' + env['BF_PYTHON_INC']
+incs += ' ' + env['BF_SDL_INC']
-sca_gamelogic_env.Append (CPPPATH = user_options_dict['PYTHON_INCLUDE'])
-sca_gamelogic_env.Append (CPPPATH = user_options_dict['SDL_INCLUDE'])
-
-sca_gamelogic_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/SCA_GameLogic', source=source_files)
+env.BlenderLib ( 'SCA_GameLogic', sources, Split(incs), [], libtype='game', priority=30 )
diff --git a/source/gameengine/GamePlayer/SConscript b/source/gameengine/GamePlayer/SConscript
index 08a9a7ace5f..0b140bba8e7 100644
--- a/source/gameengine/GamePlayer/SConscript
+++ b/source/gameengine/GamePlayer/SConscript
@@ -1,3 +1,3 @@
#!/usr/bin/python
SConscript(['common/SConscript',
- 'ghost/SConscript']) \ No newline at end of file
+ 'ghost/SConscript'])
diff --git a/source/gameengine/GamePlayer/common/SConscript b/source/gameengine/GamePlayer/common/SConscript
index 4983160d94b..d229e8488a2 100644
--- a/source/gameengine/GamePlayer/common/SConscript
+++ b/source/gameengine/GamePlayer/common/SConscript
@@ -1,73 +1,72 @@
#!/usr/bin/python
import sys
-Import ('user_options_dict')
-Import ('library_env')
+Import ('env')
-gp_common_env = library_env.Copy()
source_files = ['bmfont.cpp',
- 'GPC_Canvas.cpp',
- 'GPC_Engine.cpp',
- 'GPC_KeyboardDevice.cpp',
- 'GPC_MouseDevice.cpp',
- 'GPC_PolygonMaterial.cpp',
- 'GPC_RawImage.cpp',
- 'GPC_RawLoadDotBlendArray.cpp',
- 'GPC_RawLogoArrays.cpp',
- 'GPC_RenderTools.cpp',
- 'GPC_System.cpp']
+ 'GPC_Canvas.cpp',
+ 'GPC_Engine.cpp',
+ 'GPC_KeyboardDevice.cpp',
+ 'GPC_MouseDevice.cpp',
+ 'GPC_PolygonMaterial.cpp',
+ 'GPC_RawImage.cpp',
+ 'GPC_RawLoadDotBlendArray.cpp',
+ 'GPC_RawLogoArrays.cpp',
+ 'GPC_RenderTools.cpp',
+ 'GPC_System.cpp']
-gp_common_env.Append( CPPPATH = ['.',
- '#intern/string',
- '#intern/ghost',
- '#intern/guardedalloc',
- '#intern/bmfont',
- '#intern/moto/include',
- '#intern/SoundSystem',
- '#source/gameengine/Rasterizer/RAS_OpenGLRasterizer',
- '#source/kernel/gen_system',
- '#source/kernel/gen_messaging',
- '#source/gameengine/Converter',
- '#source/blender/imbuf',
- '#source/gameengine/Ketsji',
- '#source/blender/blenlib',
- '#source/blender/blenkernel',
- '#source/blender',
- '#source/blender/include',
- '#source/blender/makesdna',
- '#source/gameengine/Rasterizer',
- '#source/gameengine/GameLogic',
- '#source/gameengine/Expressions',
- '#source/gameengine/Network',
- '#source/gameengine/SceneGraph',
- '#source/gameengine/Physics/common',
- '#source/gameengine/Physics/Sumo',
- '#source/gameengine/Physics/Sumo/Fuzzics/include',
- '#source/gameengine/Network/LoopBackNetwork',
- '#source/gameengine/GamePlayer/ghost',
- '#source/blender/misc',
- '#source/blender/blenloader'])
-
+incs = ['.',
+ '#intern/string',
+ '#intern/ghost',
+ '#intern/guardedalloc',
+ '#intern/bmfont',
+ '#intern/moto/include',
+ '#intern/SoundSystem',
+ '#source/gameengine/Rasterizer/RAS_OpenGLRasterizer',
+ '#source/kernel/gen_system',
+ '#source/kernel/gen_messaging',
+ '#source/gameengine/Converter',
+ '#source/blender/imbuf',
+ '#source/gameengine/Ketsji',
+ '#source/blender/blenlib',
+ '#source/blender/blenkernel',
+ '#source/blender',
+ '#source/blender/include',
+ '#source/blender/makesdna',
+ '#source/gameengine/Rasterizer',
+ '#source/gameengine/GameLogic',
+ '#source/gameengine/Expressions',
+ '#source/gameengine/Network',
+ '#source/gameengine/SceneGraph',
+ '#source/gameengine/Physics/common',
+ '#source/gameengine/Physics/Sumo',
+ '#source/gameengine/Physics/Sumo/Fuzzics/include',
+ '#source/gameengine/Network/LoopBackNetwork',
+ '#source/gameengine/GamePlayer/ghost',
+ '#source/blender/misc',
+ '#source/blender/blenloader']
+
#This is all plugin stuff!
#if sys.platform=='win32':
-# source_files += ['windows/GPW_Canvas.cpp',
-# 'windows/GPW_Engine.cpp',
-# 'windows/GPW_KeyboardDevice.cpp',
-# 'windows/GPW_System.cpp']
-# gp_common_env.Append ( CPPPATH = ['windows'])
+# source_files += ['windows/GPW_Canvas.cpp',
+# 'windows/GPW_Engine.cpp',
+# 'windows/GPW_KeyboardDevice.cpp',
+# 'windows/GPW_System.cpp']
+# gp_common_env.Append ( CPPPATH = ['windows'])
#elif sys.platform=='linux2' or sys.platform=='linux-i386':
-# source_files += ['unix/GPU_Canvas.cpp',
-# 'unix/GPU_Engine.cpp',
-# 'unix/GPU_KeyboardDevice.cpp',
-# 'unix/GPU_System.cpp']
-# gp_common_env.Append ( CPPPATH = ['unix'])
+# source_files += ['unix/GPU_Canvas.cpp',
+# 'unix/GPU_Engine.cpp',
+# 'unix/GPU_KeyboardDevice.cpp',
+# 'unix/GPU_System.cpp']
+# gp_common_env.Append ( CPPPATH = ['unix'])
-gp_common_env.Append (CPPPATH = user_options_dict['PYTHON_INCLUDE'])
-gp_common_env.Append (CPPPATH = user_options_dict['SOLID_INCLUDE'])
-gp_common_env.Append (CPPPATH = user_options_dict['PNG_INCLUDE'])
-gp_common_env.Append (CPPPATH = user_options_dict['Z_INCLUDE'])
+incs += Split(env['BF_PYTHON_INC'])
+incs += Split(env['BF_SOLID_INC'])
+incs += Split(env['BF_PNG_INC'])
+incs += Split(env['BF_ZLIB_INC'])
+cflags=[]
if sys.platform=='win32':
- gp_common_env.Append (CXXFLAGS = ['/GR'])
+ cflags = ['/GR']
-gp_common_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/GPC_common', source=source_files)
+env.BlenderLib (libname='GPC_common', sources=source_files, includes=incs, defines = [], libtype=['player'], priority=[5], compileflags=cflags)
diff --git a/source/gameengine/GamePlayer/ghost/SConscript b/source/gameengine/GamePlayer/ghost/SConscript
index f3dbf2aeed5..0d56a02a4a3 100644
--- a/source/gameengine/GamePlayer/ghost/SConscript
+++ b/source/gameengine/GamePlayer/ghost/SConscript
@@ -1,52 +1,49 @@
#!/usr/bin/python
import sys
-Import ('user_options_dict')
-Import ('library_env')
-
-gp_ghost_env = library_env.Copy()
+Import ('env')
source_files = ['GPG_Application.cpp',
- 'GPG_Canvas.cpp',
- 'GPG_ghost.cpp',
- 'GPG_KeyboardDevice.cpp',
- 'GPG_System.cpp']
-
-gp_ghost_env.Append( CPPPATH = ['.',
- '#intern/string',
- '#intern/ghost',
- '#intern/guardedalloc',
- '#intern/bmfont',
- '#intern/moto/include',
- '#intern/SoundSystem',
- '#source/gameengine/Rasterizer/RAS_OpenGLRasterizer',
- '#source/kernel/gen_system',
- '#source/kernel/gen_messaging',
- '#source/gameengine/Converter',
- '#source/blender/imbuf',
- '#source/gameengine/Ketsji',
- '#source/blender/blenlib',
- '#source/blender/blenkernel',
- '#source/blender/readblenfile',
- '#source/blender',
- '#source/blender/include',
- '#source/blender/makesdna',
- '#source/gameengine/Rasterizer',
- '#source/gameengine/GameLogic',
- '#source/gameengine/Expressions',
- '#source/gameengine/Network',
- '#source/gameengine/SceneGraph',
- '#source/gameengine/Physics/common',
- '#source/gameengine/Physics/Sumo',
- '#source/gameengine/Physics/Sumo/Fuzzics/include',
- '#source/gameengine/Network/LoopBackNetwork',
- '#source/gameengine/GamePlayer/common',
- '#source/blender/misc',
- '#source/blender/blenloader'])
+ 'GPG_Canvas.cpp',
+ 'GPG_ghost.cpp',
+ 'GPG_KeyboardDevice.cpp',
+ 'GPG_System.cpp']
-gp_ghost_env.Append (CPPPATH = user_options_dict['PYTHON_INCLUDE'])
-gp_ghost_env.Append (CPPPATH = user_options_dict['SOLID_INCLUDE'])
+incs = ['.',
+ '#intern/string',
+ '#intern/ghost',
+ '#intern/guardedalloc',
+ '#intern/bmfont',
+ '#intern/moto/include',
+ '#intern/SoundSystem',
+ '#source/gameengine/Rasterizer/RAS_OpenGLRasterizer',
+ '#source/kernel/gen_system',
+ '#source/kernel/gen_messaging',
+ '#source/gameengine/Converter',
+ '#source/blender/imbuf',
+ '#source/gameengine/Ketsji',
+ '#source/blender/blenlib',
+ '#source/blender/blenkernel',
+ '#source/blender/readblenfile',
+ '#source/blender',
+ '#source/blender/include',
+ '#source/blender/makesdna',
+ '#source/gameengine/Rasterizer',
+ '#source/gameengine/GameLogic',
+ '#source/gameengine/Expressions',
+ '#source/gameengine/Network',
+ '#source/gameengine/SceneGraph',
+ '#source/gameengine/Physics/common',
+ '#source/gameengine/Physics/Sumo',
+ '#source/gameengine/Physics/Sumo/Fuzzics/include',
+ '#source/gameengine/Network/LoopBackNetwork',
+ '#source/gameengine/GamePlayer/common',
+ '#source/blender/misc',
+ '#source/blender/blenloader']
+incs += Split(env['BF_PYTHON_INC'])
+incs += Split(env['BF_SOLID_INC'])
+cflags = []
if sys.platform=='win32':
- gp_ghost_env.Append (CXXFLAGS = ['/GR'])
+ cflags = ['/GR']
-gp_ghost_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/GPG_ghost', source=source_files) \ No newline at end of file
+env.BlenderLib (libname='GPG_ghost', sources=source_files, includes = incs, defines = [], libtype='player',priority=0, compileflags=cflags)
diff --git a/source/gameengine/Ketsji/KXNetwork/SConscript b/source/gameengine/Ketsji/KXNetwork/SConscript
index 820255a5ff4..7c0f3f1ab28 100755
--- a/source/gameengine/Ketsji/KXNetwork/SConscript
+++ b/source/gameengine/Ketsji/KXNetwork/SConscript
@@ -1,25 +1,12 @@
#!/usr/bin/python
-Import ('user_options_dict')
-Import ('library_env')
+Import ('env')
-kx_network_env = library_env.Copy ()
+sources = env.Glob('*.cpp')
-source_files = ['KX_NetworkEventManager.cpp',
- 'KX_NetworkMessageActuator.cpp',
- 'KX_NetworkMessageSensor.cpp',
- 'KX_NetworkObjectActuator.cpp',
- 'KX_NetworkObjectSensor.cpp'
- ]
+incs = '. #source/kernel/gen_system #intern/string #source/gameengine/Ketsji'
+incs += ' #source/gameengine/GameLogic #source/gameengine/Expressions'
+incs += ' #source/gameengine/Network'
-kx_network_env.Append (CPPPATH = ['.',
- '#source/kernel/gen_system',
- '#intern/string',
- '#source/gameengine/Ketsji',
- '#source/gameengine/GameLogic',
- '#source/gameengine/Expressions',
- '#source/gameengine/Network',
- ])
+incs += ' ' + env['BF_PYTHON_INC']
-kx_network_env.Append (CPPPATH = user_options_dict['PYTHON_INCLUDE'])
-
-kx_network_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/KX_network', source=source_files)
+env.BlenderLib ( 'KX_network', Split(sources), Split(incs), defines=[],libtype='game2', priority=5 )
diff --git a/source/gameengine/Ketsji/SConscript b/source/gameengine/Ketsji/SConscript
index 26c982dc4f9..375f2679e21 100644
--- a/source/gameengine/Ketsji/SConscript
+++ b/source/gameengine/Ketsji/SConscript
@@ -1,126 +1,33 @@
#!/usr/bin/python
import sys
-Import ('user_options_dict')
-Import ('library_env')
-
-ketsji_env = library_env.Copy ()
-
-source_files = ['BL_Shader.cpp',
- 'BL_Material.cpp',
- 'BL_Texture.cpp',
- 'KX_WorldIpoController.cpp',
- 'KX_WorldInfo.cpp',
- 'KX_VisibilityActuator.cpp',
- 'KX_VertexProxy.cpp',
- 'KX_TrackToActuator.cpp',
- 'KX_TouchSensor.cpp',
- 'KX_TouchEventManager.cpp',
- 'KX_TimeLogger.cpp',
- 'KX_TimeCategoryLogger.cpp',
- 'KX_SoundActuator.cpp',
- 'KX_SG_NodeRelationships.cpp',
- 'KX_SG_BoneParentNodeRelationship.cpp',
- 'KX_SceneActuator.cpp',
- 'KX_Scene.cpp',
- 'KX_ScalingInterpolator.cpp',
- 'KX_ScalarInterpolator.cpp',
- 'KX_SCA_ReplaceMeshActuator.cpp',
- 'KX_SCA_EndObjectActuator.cpp',
- 'KX_SCA_AddObjectActuator.cpp',
- 'KX_RaySensor.cpp',
- 'KX_RayEventManager.cpp',
- 'KX_RayCast.cpp',
- 'KX_RadarSensor.cpp',
- 'KX_PyMath.cpp',
- 'KX_PythonInit.cpp',
- 'KX_PyConstraintBinding.cpp',
- 'KX_PositionInterpolator.cpp',
- 'KX_PolygonMaterial.cpp',
- 'KX_PhysicsObjectWrapper.cpp',
- 'KX_OrientationInterpolator.cpp',
- 'KX_ObjectActuator.cpp',
- 'KX_ObColorIpoSGController.cpp',
- 'KX_NearSensor.cpp',
- 'KX_MouseFocusSensor.cpp',
- 'KX_MotionState.cpp',
- 'KX_MeshProxy.cpp',
- 'KX_LightIpoSGController.cpp',
- 'KX_Light.cpp',
- 'KX_KetsjiEngine.cpp',
- 'KX_IpoActuator.cpp',
- 'KX_IPO_SGController.cpp',
- 'KX_IPhysicsController.cpp',
- 'KX_GameObject.cpp',
- 'KX_GameActuator.cpp',
- 'KX_EmptyObject.cpp',
- 'KX_ConvertPhysicsObjects.cpp',
- 'KX_ConstraintWrapper.cpp',
- 'KX_ConstraintActuator.cpp',
- 'KX_CDActuator.cpp',
- 'KX_CameraIpoSGController.cpp',
- 'KX_CameraActuator.cpp',
- 'KX_Camera.cpp',
- 'KX_BulletPhysicsController.cpp',
- 'KX_BlenderMaterial.cpp',
- 'KX_MaterialIpoController.cpp',
- 'KX_VehicleWrapper.cpp',
- ]
-
-if user_options_dict['USE_PHYSICS'] == 'solid':
- source_files += ['KX_SumoPhysicsController.cpp']
- ketsji_env.Append (CPPPATH = user_options_dict['SOLID_INCLUDE'])
-
-if user_options_dict['USE_PHYSICS'] == 'ode':
- source_files += ['KX_OdePhysicsController.cpp']
- ketsji_env.Append (CPPPATH = user_options_dict['SOLID_INCLUDE'])
-
-
-ketsji_env.Append (CPPPATH = ['.',
- '#source/kernel/gen_system',
- '#intern/string',
- '#intern/guardedalloc',
- '#source/gameengine/Rasterizer/RAS_OpenGLRasterizer',
- '#intern/bmfont',
- '#intern/SoundSystem',
- '#intern/SoundSystem/include',
- '#intern/SoundSystem/openal',
- '#intern/SoundSystem/dummy',
- '#intern/SoundSystem/intern',
- '#source/gameengine/Converter',
- '#source/gameengine/BlenderRoutines',
- '#source/blender/imbuf',
- '#intern/moto/include',
- '#source/gameengine/Ketsji',
- '#source/gameengine/Ketsji/KXNetwork',
- '#source/blender/blenlib',
- '#source/blender/blenkernel',
- '#source/blender',
- '#source/blender/include',
- '#source/blender/makesdna',
- '#source/blender/python',
- '#source/gameengine/Rasterizer',
- '#source/gameengine/GameLogic',
- '#source/gameengine/Expressions',
- '#source/gameengine/Network',
- '#source/gameengine/SceneGraph',
- '#source/gameengine/Physics/common',
- '#source/gameengine/Physics/Bullet',
- '#source/gameengine/Physics/BlOde',
- '#source/gameengine/Physics/Dummy',
- '#source/gameengine/Physics/Sumo',
- '#source/gameengine/Physics/Sumo/include',
- '#source/gameengine/Physics/Sumo/Fuzzics/include',
- '#source/gameengine/Network/LoopBackNetwork',
- '#source/blender/misc',
- '#source/blender/blenloader'
- ])
-
-if sys.platform == 'win32':
- ketsji_env.Append (CXXFLAGS = ['/GR'])
- ketsji_env.Append ( CCFLAGS =['/Ox'])
-ketsji_env.Append (CPPPATH = user_options_dict['PYTHON_INCLUDE'])
-ketsji_env.Append (CPPPATH = user_options_dict['SDL_INCLUDE'])
-ketsji_env.Append (CPPPATH = user_options_dict['BULLET_INCLUDE'])
-
-ketsji_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/KX_ketsji', source=source_files)
+Import ('env')
+
+sources = env.Glob('*.cpp')
+
+incs = '. #source/kernel/gen_system #intern/string #intern/guardedalloc'
+incs += ' #source/gameengine/Rasterizer/RAS_OpenGLRasterizer #intern/bmfont'
+incs += ' #intern/SoundSystem #intern/SoundSystem/include #intern/SoundSystem/openal'
+incs += ' #intern/SoundSystem/dummy #intern/SoundSystem/intern #source/gameengine/Converter'
+incs += ' #source/gameengine/BlenderRoutines #source/blender/imbuf #intern/moto/include'
+incs += ' #source/gameengine/Ketsji #source/gameengine/Ketsji/KXNetwork #source/blender/blenlib'
+incs += ' #source/blender/blenkernel #source/blender #source/blender/include'
+incs += ' #source/blender/makesdna #source/blender/python #source/gameengine/Rasterizer'
+incs += ' #source/gameengine/GameLogic #source/gameengine/Expressions #source/gameengine/Network'
+incs += ' #source/gameengine/SceneGraph #source/gameengine/Physics/common #source/gameengine/Physics/Bullet'
+incs += ' #source/gameengine/Physics/BlOde #source/gameengine/Physics/Dummy'
+incs += ' #source/gameengine/Physics/Sumo #source/gameengine/Physics/Sumo/include'
+incs += ' #source/gameengine/Physics/Sumo/Fuzzics/include #source/gameengine/Network/LoopBackNetwork'
+incs += ' #source/blender/misc #source/blender/blenloader'
+
+#TODO:
+#if sys.platform == 'win32':
+# ketsji_env.Append (CXXFLAGS = ['/GR'])
+# ketsji_env.Append ( CCFLAGS =['/Ox'])
+
+incs += ' ' + env['BF_SOLID_INC']
+incs += ' ' + env['BF_PYTHON_INC']
+incs += ' ' + env['BF_SDL_INC']
+incs += ' ' + env['BF_BULLET_INC']
+
+env.BlenderLib ( 'KX_ketsji', sources, Split(incs), [], libtype='game', priority=25 )
diff --git a/source/gameengine/Network/LoopBackNetwork/SConscript b/source/gameengine/Network/LoopBackNetwork/SConscript
index 333dff4d987..292abc8e7a9 100755
--- a/source/gameengine/Network/LoopBackNetwork/SConscript
+++ b/source/gameengine/Network/LoopBackNetwork/SConscript
@@ -1,15 +1,8 @@
#!/usr/bin/python
-Import ('user_options_dict')
-Import ('library_env')
+Import ('env')
-ng_loopbacknetwork_env = library_env.Copy ()
+sources = 'NG_LoopBackNetworkDeviceInterface.cpp'
-source_files = ['NG_LoopBackNetworkDeviceInterface.cpp']
+incs = '. #source/kernel/gen_system #intern/string #source/gameengine/Network'
-ng_loopbacknetwork_env.Append (CPPPATH=['.',
- '#source/kernel/gen_system',
- '#intern/string',
- '#source/gameengine/Network',
- ])
-
-ng_loopbacknetwork_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/NG_loopbacknetwork', source=source_files)
+env.BlenderLib ( 'NG_loopbacknetwork', Split(sources), Split(incs), defines=[],libtype='game2', priority=25 )
diff --git a/source/gameengine/Network/SConscript b/source/gameengine/Network/SConscript
index 489bea7a970..998e6f36af3 100755
--- a/source/gameengine/Network/SConscript
+++ b/source/gameengine/Network/SConscript
@@ -1,17 +1,8 @@
#!/usr/bin/python
-Import ('user_options_dict')
-Import ('library_env')
+Import ('env')
-ng_network_env = library_env.Copy ()
+sources = env.Glob('*.cpp') #'NG_NetworkMessage.cpp NG_NetworkObject.cpp NG_NetworkScene.cpp'
-source_files = ['NG_NetworkMessage.cpp',
- 'NG_NetworkObject.cpp',
- 'NG_NetworkScene.cpp']
+incs = '. #source/kernel/gen_system #intern/string #intern/moto/include'
-ng_network_env.Append (CPPPATH=['.',
- '#source/kernel/gen_system',
- '#intern/string',
- '#intern/moto/include'
- ])
-
-ng_network_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/NG_network', source=source_files)
+env.BlenderLib ( 'NG_network', sources, Split(incs), [], libtype='game2', priority=15 )
diff --git a/source/gameengine/Physics/Bullet/SConscript b/source/gameengine/Physics/Bullet/SConscript
index 8d82f346757..b9d7bed8880 100644
--- a/source/gameengine/Physics/Bullet/SConscript
+++ b/source/gameengine/Physics/Bullet/SConscript
@@ -1,22 +1,16 @@
#!/usr/bin/python
import sys
-Import ('user_options_dict')
-Import ('library_env')
+Import ('env')
-phy_bullet_env = library_env.Copy ()
+sources = 'CcdPhysicsEnvironment.cpp CcdPhysicsController.cpp'
-source_files = ['CcdPhysicsEnvironment.cpp',
- 'CcdPhysicsController.cpp'
- ]
+incs = '. ../common'
-phy_bullet_env.Append (CPPPATH=['.',
- '../common'])
+incs += ' ' + env['BF_BULLET_INC']
-phy_bullet_env.Append (CPPPATH = user_options_dict['BULLET_INCLUDE'])
+#TODO:
+#if sys.platform=='win32':
+# phy_bullet_env.Append (CXXFLAGS = ['/GR'])
+# phy_bullet_env.Append (CCFLAGS =['/O2'])
-
-if sys.platform=='win32':
- phy_bullet_env.Append (CXXFLAGS = ['/GR'])
- phy_bullet_env.Append (CCFLAGS =['/O2'])
-
-phy_bullet_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/PHY_Bullet', source=source_files)
+env.BlenderLib ( 'PHY_Bullet', Split(sources), Split(incs), [], libtype='game', priority=15 )
diff --git a/source/gameengine/Physics/Dummy/SConscript b/source/gameengine/Physics/Dummy/SConscript
index b5a642d4f9a..781e88e456f 100755
--- a/source/gameengine/Physics/Dummy/SConscript
+++ b/source/gameengine/Physics/Dummy/SConscript
@@ -1,13 +1,8 @@
#!/usr/bin/python
-Import ('user_options_dict')
-Import ('library_env')
+Import ('env')
-phy_dummy_env = library_env.Copy ()
+sources = 'DummyPhysicsEnvironment.cpp'
-source_files = ['DummyPhysicsEnvironment.cpp']
+incs = '. ../common'
-phy_dummy_env.Append (CPPPATH = ['.',
- '../common'
- ])
-
-phy_dummy_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/PHY_Dummy', source=source_files)
+env.BlenderLib ( 'PHY_Dummy', Split(sources), Split(incs), [], libtype='game', priority=10 )
diff --git a/source/gameengine/Physics/Sumo/SConscript b/source/gameengine/Physics/Sumo/SConscript
index b502a1ec616..7407aec469d 100755
--- a/source/gameengine/Physics/Sumo/SConscript
+++ b/source/gameengine/Physics/Sumo/SConscript
@@ -1,11 +1,8 @@
#!/usr/bin/python
-import sys
-Import ('user_options_dict')
-Import ('library_env')
+Import ('env')
-phy_sumo_env = library_env.Copy ()
-
-source_files = ['SumoPHYCallbackBridge.cpp',
+sumoenv = env.Copy()
+sources = ['SumoPHYCallbackBridge.cpp',
'SumoPhysicsController.cpp',
'SumoPhysicsEnvironment.cpp',
'Fuzzics/src/SM_FhObject.cpp',
@@ -14,16 +11,16 @@ source_files = ['SumoPHYCallbackBridge.cpp',
'Fuzzics/src/SM_MotionState.cpp'
]
-phy_sumo_env.Append (CPPPATH = ['.',
- '../common',
- 'Fuzzics/include',
- '#/intern/moto/include'
- ])
-
-phy_sumo_env.Append (CPPPATH = user_options_dict['SOLID_INCLUDE'])
+incs =['.',
+ '../common',
+ 'Fuzzics/include',
+ '#/intern/moto/include'
+ ]
+incs += [sumoenv['BF_SOLID_INC']]
-if sys.platform=='win32':
- phy_sumo_env.Append (CXXFLAGS = ['/GR'])
- phy_sumo_env.Append ( CCFLAGS =['/O1'])
+if sumoenv['PLATFORM']=='win32':
+ sumoenv.Append (CXXFLAGS = ['/GR'])
+ sumoenv.Append ( CCFLAGS =['/O1'])
-phy_sumo_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/PHY_Sumo', source=source_files)
+#env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/PHY_Sumo', source=source_files)
+env.BlenderLib ( 'PHY_Sumo', sources, incs, [], libtype='game2', priority=30 )
diff --git a/source/gameengine/Physics/common/SConscript b/source/gameengine/Physics/common/SConscript
index fbde29861e6..b6cb78742ab 100755
--- a/source/gameengine/Physics/common/SConscript
+++ b/source/gameengine/Physics/common/SConscript
@@ -1,16 +1,8 @@
#!/usr/bin/python
-Import ('user_options_dict')
-Import ('library_env')
+Import ('env')
-phy_physics_env = library_env.Copy ()
+sources = 'PHY_IMotionState.cpp PHY_IPhysicsController.cpp PHY_IPhysicsEnvironment.cpp'
-source_files = ['PHY_IMotionState.cpp',
- 'PHY_IPhysicsController.cpp',
- 'PHY_IPhysicsEnvironment.cpp']
+incs = '. ../Dummy #intern/moto/include'
-phy_physics_env.Append (CPPPATH = ['.',
- '../Dummy',
- '#intern/moto/include'
- ])
-
-phy_physics_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/PHY_Physics', source=source_files)
+env.BlenderLib ( 'PHY_Physics', Split(sources), Split(incs), [], libtype=['game', 'game2'], priority=[20, 35] )
diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/SConscript b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/SConscript
index 6baebd0fabc..56183c88946 100755
--- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/SConscript
+++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/SConscript
@@ -1,19 +1,9 @@
#!/usr/bin/python
-Import ('user_options_dict')
-Import ('library_env')
+Import ('env')
-ras_openglrasterizer_env = library_env.Copy ()
+sources = env.Glob('*.cpp') #'RAS_GLExtensionManager.cpp RAS_OpenGLRasterizer.cpp RAS_VAOpenGLRasterizer.cpp'
-source_files = ['RAS_GLExtensionManager.cpp',
- 'RAS_OpenGLRasterizer.cpp',
- 'RAS_VAOpenGLRasterizer.cpp']
+incs = '. #source/kernel/gen_system #intern/string #intern/moto/include #source/gameengine/Rasterizer'
+incs += ' ' + env['BF_OPENGL_INC']
-ras_openglrasterizer_env.Append (CPPPATH=['.',
- '#source/kernel/gen_system',
- '#intern/string',
- '#intern/moto/include',
- '#source/gameengine/Rasterizer'
- ])
-ras_openglrasterizer_env.Append (CPPPATH = user_options_dict['OPENGL_INCLUDE'])
-
-ras_openglrasterizer_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/RAS_OpenGLRasterizer', source=source_files)
+env.BlenderLib ( 'RAS_OpenGLRasterizer', Split(sources), Split(incs), [], libtype='game', priority=40 )
diff --git a/source/gameengine/Rasterizer/SConscript b/source/gameengine/Rasterizer/SConscript
index 358edb6c9de..1b833c8d7ee 100755
--- a/source/gameengine/Rasterizer/SConscript
+++ b/source/gameengine/Rasterizer/SConscript
@@ -1,27 +1,13 @@
#!/usr/bin/python
import sys
-Import ('user_options_dict')
-Import ('library_env')
+Import ('env')
-ras_rasterizer_env = library_env.Copy ()
+sources = env.Glob('*.cpp')
-source_files = ['RAS_BucketManager.cpp',
- 'RAS_FramingManager.cpp',
- 'RAS_IPolygonMaterial.cpp',
- 'RAS_IRenderTools.cpp',
- 'RAS_MaterialBucket.cpp',
- 'RAS_MeshObject.cpp',
- 'RAS_Polygon.cpp',
- 'RAS_TexVert.cpp',
- 'RAS_texmatrix.cpp']
+incs = '. #source/kernel/gen_system #intern/string #intern/moto/include'
-ras_rasterizer_env.Append (CPPPATH=['.',
- '#source/kernel/gen_system',
- '#intern/string',
- '#intern/moto/include'
- ])
+#TODO:
+#if sys.platform=='win32':
+# ras_rasterizer_env.Append ( CCFLAGS =['/Ox'])
-if sys.platform=='win32':
- ras_rasterizer_env.Append ( CCFLAGS =['/Ox'])
-
-ras_rasterizer_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/RAS_rasterizer', source=source_files)
+env.BlenderLib ( 'RAS_rasterizer', sources, Split(incs), [], libtype='game', priority=35 )
diff --git a/source/gameengine/SConscript b/source/gameengine/SConscript
index ca4283944b5..c2750d19706 100644
--- a/source/gameengine/SConscript
+++ b/source/gameengine/SConscript
@@ -1,5 +1,5 @@
#!/usr/bin/python
-Import ('user_options_dict')
+Import ('env')
SConscript(['BlenderRoutines/SConscript',
'Converter/SConscript',
@@ -14,12 +14,14 @@ SConscript(['BlenderRoutines/SConscript',
'Rasterizer/SConscript',
'Rasterizer/RAS_OpenGLRasterizer/SConscript',
'SceneGraph/SConscript',
- 'Physics/Bullet/SConscript'])
+ 'Physics/Bullet/SConscript',
+ 'Physics/Sumo/SConscript'
+ ])
-if user_options_dict['BUILD_BLENDER_PLAYER']:
- SConscript(['GamePlayer/SConscript'])
+if env['WITH_BF_PLAYER']:
+ SConscript(['GamePlayer/SConscript'])
-if user_options_dict['USE_PHYSICS'] == 'solid':
- SConscript(['Physics/Sumo/SConscript'])
-elif user_options_dict['USE_PHYSICS'] == 'ode':
- SConscript(['Physics/BlOde/SConscript'])
+#if user_options_dict['USE_PHYSICS'] == 'solid':
+# SConscript(['Physics/Sumo/SConscript'])
+#elif user_options_dict['USE_PHYSICS'] == 'ode':
+# SConscript(['Physics/BlOde/SConscript'])
diff --git a/source/gameengine/SceneGraph/SConscript b/source/gameengine/SceneGraph/SConscript
index 2905684d50e..d34f41eb2af 100755
--- a/source/gameengine/SceneGraph/SConscript
+++ b/source/gameengine/SceneGraph/SConscript
@@ -1,19 +1,9 @@
#!/usr/bin/python
-Import ('user_options_dict')
-Import ('library_env')
+Import ('env')
-sg_scenegraph_env = library_env.Copy ()
+sources = env.Glob('*.cpp') #'SG_BBox.cpp SG_Controller.cpp SG_IObject.cpp SG_Node.cpp SG_Spatial.cpp SG_Tree.cpp'
-source_files = ['SG_BBox.cpp',
- 'SG_Controller.cpp',
- 'SG_IObject.cpp',
- 'SG_Node.cpp',
- 'SG_Spatial.cpp',
- 'SG_Tree.cpp']
+incs = '. #intern/moto/include'
-sg_scenegraph_env.Append (CPPPATH=['.',
- '#intern/moto/include'
- ])
-
-sg_scenegraph_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/SG_SceneGraph', source=source_files)
+env.BlenderLib ( 'SG_SceneGraph', sources, Split(incs), [], libtype='game', priority=50 )
diff --git a/source/kernel/SConscript b/source/kernel/SConscript
index cb1dc0decbe..373f50f1232 100644
--- a/source/kernel/SConscript
+++ b/source/kernel/SConscript
@@ -1,18 +1,10 @@
#!/usr/bin/python
-Import ('user_options_dict')
-Import ('library_env')
+Import ('env')
-kernel_env = library_env.Copy ()
+sources = 'gen_messaging/intern/messaging.c gen_system/GEN_HashedPtr.cpp'
+sources += ' gen_system/GEN_Matrix4x4.cpp gen_system/SYS_SingletonSystem.cpp'
+sources += ' gen_system/SYS_System.cpp'
-source_files = ['gen_messaging/intern/messaging.c',
- 'gen_system/GEN_HashedPtr.cpp',
- 'gen_system/GEN_Matrix4x4.cpp',
- 'gen_system/SYS_SingletonSystem.cpp',
- 'gen_system/SYS_System.cpp']
+incs = 'gen_messaging gen_system #/intern/string #/intern/moto/include'
-kernel_env.Append (CPPPATH = ['gen_messaging',
- 'gen_system',
- '#/intern/string',
- '#/intern/moto/include'])
-
-kernel_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/blender_kernel', source=source_files)
+env.BlenderLib ( 'blender_kernel', Split(sources), Split(incs), [], libtype = ['common','game2'], priority = [15, 10] )