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/intern
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 /intern
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 'intern')
-rw-r--r--intern/SConscript4
-rw-r--r--intern/SoundSystem/SConscript52
-rw-r--r--intern/bmfont/SConscript26
-rw-r--r--intern/boolop/SConscript34
-rw-r--r--intern/bsp/SConscript25
-rw-r--r--intern/container/SConscript12
-rw-r--r--intern/csg/SConscript30
-rw-r--r--intern/decimation/SConscript22
-rw-r--r--intern/elbeem/SConscript76
-rw-r--r--intern/ghost/SConscript60
-rw-r--r--intern/guardedalloc/SConscript11
-rw-r--r--intern/iksolver/SConscript17
-rw-r--r--intern/memutil/SConscript11
-rw-r--r--intern/moto/SConscript22
-rw-r--r--intern/opennl/SConscript44
-rw-r--r--intern/string/SConscript12
16 files changed, 112 insertions, 346 deletions
diff --git a/intern/SConscript b/intern/SConscript
index ec6a61f6c71..606a81ae923 100644
--- a/intern/SConscript
+++ b/intern/SConscript
@@ -13,6 +13,10 @@ SConscript(['SoundSystem/SConscript',
'elbeem/SConscript',
'opennl/SConscript'])
+# NEW_CSG was intended for intern/csg, but
+# getting it to compile is difficult
+# intern/bsp has been used anyway, so
+# perhaps get rid of intern/csg?
NEW_CSG='false'
if NEW_CSG=='false':
diff --git a/intern/SoundSystem/SConscript b/intern/SoundSystem/SConscript
index 0ff757b54a7..d06b28e7c2d 100644
--- a/intern/SoundSystem/SConscript
+++ b/intern/SoundSystem/SConscript
@@ -1,47 +1,17 @@
#!/usr/bin/python
-import sys
-Import ('user_options_dict')
-Import ('extra_includes')
-Import ('library_env')
+Import ('env')
-soundsys_env = library_env.Copy ()
+sources = env.Glob('dummy/*.cpp') + env.Glob('intern/*.cpp')
-source_files = ['dummy/SND_DummyDevice.cpp',
- 'intern/SND_AudioDevice.cpp',
- 'intern/SND_C-api.cpp',
- 'intern/SND_CDObject.cpp',
- 'intern/SND_DeviceManager.cpp',
- 'intern/SND_IdObject.cpp',
- 'intern/SND_Scene.cpp',
- 'intern/SND_SoundListener.cpp',
- 'intern/SND_SoundObject.cpp',
- 'intern/SND_Utils.cpp',
- 'intern/SND_WaveCache.cpp',
- 'intern/SND_WaveSlot.cpp']
+incs = '. intern ../moto/include ../string dummy openal sdl'
+defs = ''
+if env['WITH_BF_OPENAL'] == 1:
+ sources += env.Glob('openal/*.cpp') + env.Glob('sdl/*.cpp')
+ incs += ' ' + env['BF_OPENAL_INC']
+ incs += ' ' + env['BF_SDL_INC']
-soundsys_env.Append (CPPPATH = ['.',
- '../SoundSystem',
- 'intern',
- '../moto/include',
- '../string',
- 'dummy',
- 'openal',
- 'sdl'])
+if env['WITH_BF_OPENAL'] == 0:
+ defs = 'NO_SOUND'
-if user_options_dict['USE_OPENAL'] == 1:
- source_files += ['openal/SND_OpenALDevice.cpp',
- 'openal/pthread_cancel.cpp',
- 'sdl/SND_SDLCDDevice.cpp']
- soundsys_env.Append (CPPPATH=user_options_dict['OPENAL_INCLUDE'])
- soundsys_env.Append (CPPPATH=user_options_dict['SDL_INCLUDE'])
-
-if user_options_dict['USE_FMOD'] == 1:
- source_files += ['fmod/SND_FmodDevice.cpp']
-
-if user_options_dict['USE_OPENAL'] == 0 and user_options_dict['USE_FMOD'] == 0:
- soundsys_env.Append (CPPDEFINES = 'NO_SOUND')
-
-soundsys_env.Append (CPPPATH = extra_includes)
-
-soundsys_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/soundsystem', source=source_files)
+env.BlenderLib ('blender_sndsys', sources, Split(incs), Split(defs), libtype=['core','player2'], priority = [20,10] )
diff --git a/intern/bmfont/SConscript b/intern/bmfont/SConscript
index 3c2bf973c14..614f8ec87ea 100644
--- a/intern/bmfont/SConscript
+++ b/intern/bmfont/SConscript
@@ -1,24 +1,10 @@
#!/usr/bin/python
-Import ('user_options_dict')
-Import ('library_env')
+Import ('env')
-bmfont_env = library_env.Copy ()
+sources = env.Glob('intern/*.cpp')
-source_files = ['intern/BMF_Api.cpp',
- 'intern/BMF_BitmapFont.cpp',
- 'intern/BMF_font_helv10.cpp',
- 'intern/BMF_font_helv12.cpp',
- 'intern/BMF_font_helvb10.cpp',
- 'intern/BMF_font_helvb12.cpp',
- 'intern/BMF_font_helvb14.cpp',
- 'intern/BMF_font_helvb8.cpp',
- 'intern/BMF_font_scr12.cpp',
- 'intern/BMF_font_scr14.cpp',
- 'intern/BMF_font_scr15.cpp']
+incs = '. intern'
+incs += ' ' + env['BF_OPENGL_INC']
+defs = ''
-bmfont_env.Append (CPPPATH = ['.',
- '../bmfont',
- 'intern'])
-
-bmfont_env.Append (CPPPATH = user_options_dict['OPENGL_INCLUDE'])
-bmfont_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/blender_BMF', source=source_files)
+env.BlenderLib ('blender_BMF', sources, Split(incs), Split(defs), libtype='intern', priority = 20 )
diff --git a/intern/boolop/SConscript b/intern/boolop/SConscript
index a0df706e9f7..afd4ff24d6e 100644
--- a/intern/boolop/SConscript
+++ b/intern/boolop/SConscript
@@ -1,34 +1,8 @@
#!/usr/bin/python
-Import ('user_options_dict')
-Import ('library_env')
+Import ('env')
-bop_env = library_env.Copy ()
+sources = env.Glob('intern/*.cpp')
-source_files = [
- 'intern/BOP_BBox.cpp',
- 'intern/BOP_BSPNode.cpp',
- 'intern/BOP_BSPTree.cpp',
- 'intern/BOP_Edge.cpp',
- 'intern/BOP_Face.cpp',
- 'intern/BOP_Face2Face.cpp',
- 'intern/BOP_Interface.cpp',
- 'intern/BOP_Material.cpp',
- 'intern/BOP_MaterialContainer.cpp',
- 'intern/BOP_MathUtils.cpp',
- 'intern/BOP_Merge.cpp',
- 'intern/BOP_Mesh.cpp',
- 'intern/BOP_Segment.cpp',
- 'intern/BOP_Splitter.cpp',
- 'intern/BOP_Tag.cpp',
- 'intern/BOP_Triangulator.cpp',
- 'intern/BOP_Vertex.cpp'
- ]
+incs = '. intern extern ../moto/include ../container ../memutil'
-bop_env.Append (CPPPATH = [ '.',
- 'intern',
- 'extern',
- '#intern/moto/include',
- '#intern/container',
- '#intern/memutil'])
-
-bop_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/blender_bop', source=source_files)
+env.BlenderLib ('blender_bop', sources, Split(incs) , [], libtype='common', priority = 5 )
diff --git a/intern/bsp/SConscript b/intern/bsp/SConscript
index 1563a3cd319..6dc3deb7109 100644
--- a/intern/bsp/SConscript
+++ b/intern/bsp/SConscript
@@ -1,25 +1,8 @@
#!/usr/bin/python
-Import ('user_options_dict')
-Import ('library_env')
+Import ('env')
-bsp_env = library_env.Copy ()
+sources = env.Glob('intern/*.cpp')
-source_files = ['intern/BSP_CSGHelper.cpp',
- 'intern/BSP_CSGMesh.cpp',
- 'intern/BSP_CSGMeshBuilder.cpp',
- 'intern/BSP_CSGMeshSplitter.cpp',
- 'intern/BSP_CSGNCMeshSplitter.cpp',
- 'intern/BSP_CSGUserData.cpp',
- 'intern/BSP_FragNode.cpp',
- 'intern/BSP_FragTree.cpp',
- 'intern/BSP_MeshFragment.cpp',
- 'intern/BSP_MeshPrimitives.cpp',
- 'intern/BSP_Triangulate.cpp',
- 'intern/CSG_BooleanOps.cpp']
+incs = 'intern ../container ../moto/include ../memutil'
-bsp_env.Append (CPPPATH = ['intern',
- '../container',
- '../moto/include',
- '../memutil'])
-
-bsp_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/blender_BSP', source=source_files)
+env.BlenderLib ('blender_BSP', sources, Split(incs), [], libtype='core', priority=15 )
diff --git a/intern/container/SConscript b/intern/container/SConscript
index a7e7c7d39e7..c58cf72ff89 100644
--- a/intern/container/SConscript
+++ b/intern/container/SConscript
@@ -1,11 +1,7 @@
#!/usr/bin/python
-Import ('user_options_dict')
-Import ('library_env')
+Import ('env')
-cont_env = library_env.Copy ()
+sources = env.Glob('intern/*.cpp')
+incs = '.'
-source_files = ['intern/CTR_List.cpp']
-
-cont_env.Append (CPPPATH = ['.','../container'])
-
-cont_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/blender_CTR', source=source_files)
+env.BlenderLib ('blender_CTR', sources, Split(incs) , [], libtype='intern', priority = 5 )
diff --git a/intern/csg/SConscript b/intern/csg/SConscript
index e06cd2c73e6..84d718e5b67 100644
--- a/intern/csg/SConscript
+++ b/intern/csg/SConscript
@@ -1,30 +1,8 @@
#!/usr/bin/python
-csg_env = Environment()
+Import('env')
-# Import the C flags set in the SConstruct file
-Import ('cflags')
-Import ('cxxflags')
-Import ('defines')
-csg_env.Append (CCFLAGS = cflags)
-csg_env.Append (CXXFLAGS = cxxflags)
-csg_env.Append (CPPDEFINES = defines)
+sources = env.Glob('intern/*.cpp') + env.Glob('intern/*.inl')
-source_files = ['intern/CSG_BBoxTree.cpp',
- 'intern/CSG_ConnectedMeshWrapper.inl',
- 'intern/CSG_Math.inl',
- 'intern/CSG_Triangulate.inl',
- 'intern/blender/CSG_CsgOp.cpp',
- 'intern/blender/CSG_Interface.cpp',
- 'intern/CSG_BooleanOp.inl',
- 'intern/CSG_MeshWrapper.inl',
- 'intern/MT_Line3.cpp'
- ]
+incs = 'intern ../container ../moto/include ../memutil intern/blender extern'
-csg_env.Append (CPPPATH = ['intern',
- '../container',
- '../moto/include',
- '../memutil',
- 'intern/blender',
- 'extern'])
-
-csg_env.Library (target='#/lib/blender_BSP', source=source_files)
+env.BlenderLib ('blender_BSP', sources, Split(incs) , [], libtype='blender', priority=15)
diff --git a/intern/decimation/SConscript b/intern/decimation/SConscript
index 181efb4eaf9..4ba7dbdba4c 100644
--- a/intern/decimation/SConscript
+++ b/intern/decimation/SConscript
@@ -1,22 +1,8 @@
#!/usr/bin/python
-Import ('user_options_dict')
-Import ('library_env')
+Import ('env')
-dec_env = library_env.Copy ()
+sources = env.Glob('intern/*.cpp')
-source_files = ['intern/LOD_EdgeCollapser.cpp',
- 'intern/LOD_ExternNormalEditor.cpp',
- 'intern/LOD_FaceNormalEditor.cpp',
- 'intern/LOD_ManMesh2.cpp',
- 'intern/LOD_MeshPrimitives.cpp',
- 'intern/LOD_QSDecimator.cpp',
- 'intern/LOD_QuadricEditor.cpp',
- 'intern/LOD_decimation.cpp']
+incs = '. ../moto/include ../container ../memutil'
-dec_env.Append (CPPPATH = ['intern',
- 'extern',
- '../moto/include',
- '../container',
- '../memutil'])
-
-dec_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/blender_LOD', source=source_files)
+env.BlenderLib ('blender_LOD', sources, Split(incs) , [], libtype=['core','common', 'player2'], priority = [10, 20, 5] )
diff --git a/intern/elbeem/SConscript b/intern/elbeem/SConscript
index 3ef20b9be3a..45050aff599 100644
--- a/intern/elbeem/SConscript
+++ b/intern/elbeem/SConscript
@@ -1,55 +1,23 @@
#!/usr/bin/python
-Import ('library_env')
-Import('user_options_dict');
-Import('use_fluidsim');
-
-elbeem_env = library_env.Copy();
-elbeem_env.Append(CPPDEFINES= 'NOGUI');
-elbeem_env.Append(CPPDEFINES= [('ELBEEM_BLENDER',1)] );
-
-if use_fluidsim=='false':
- # print "El'Beem Fluid Simulation Disabled..." # debug
- elbeem_env.Append (CPPPATH = user_options_dict['PNG_INCLUDE'])
- # dummy interface build
- Sources = [
- "intern/utilities.cpp",
- "intern/blenderdummy.cpp"
- ]; # sources
-else:
- # print "Including El'Beem Fluid Simulation..." # debug
- elbeem_env.Append (CPPPATH = user_options_dict['PNG_INCLUDE'])
- elbeem_env.Append (CPPPATH = user_options_dict['Z_INCLUDE'])
- elbeem_env.Append (CPPPATH = user_options_dict['SDL_INCLUDE'])
-
- # main build----------------------------------------
- Sources = [
-
- "intern/cfgparser.cpp",
- "intern/cfglexer.cpp",
-
- "intern/attributes.cpp",
- "intern/elbeem.cpp",
- "intern/isosurface.cpp",
- "intern/ntl_blenderdumper.cpp",
- "intern/ntl_bsptree.cpp",
- "intern/ntl_geometrymodel.cpp",
- "intern/ntl_geometryobject.cpp",
- "intern/ntl_lightobject.cpp",
- "intern/ntl_ray.cpp",
- "intern/ntl_scene.cpp",
- "intern/ntl_world.cpp",
- "intern/parametrizer.cpp",
- "intern/particletracer.cpp",
- "intern/simulation_object.cpp",
- "intern/utilities.cpp",
- "intern/blendercall.cpp",
-
- "intern/solver_init.cpp",
- "intern/solver_interface.cpp",
- "intern/solver_main.cpp",
- "intern/solver_util.cpp"
-
- ]; # sources
-
-elbeem_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/blender_elbeem', source=Sources)
-
+import sys
+Import('env')
+
+#if use_fluidsim=='false':
+# # print "El'Beem Fluid Simulation Disabled..." # debug
+# elbeem_env.Append (CPPPATH = user_options_dict['PNG_INCLUDE'])
+# elbeem_env.Append (CPPPATH = user_options_dict['SDL_INCLUDE'])
+# elbeem_env.Append(CPPDEFINES= 'ELBEEM_DUMMIES');
+# # dummy interface build
+# Sources = [
+# "intern/utilities.cpp",
+# "intern/blenderdummy.cpp"
+# ]; # sources
+
+sources = env.Glob('intern/*.cpp')
+
+defs = 'NOGUI ELBEEM_BLENDER=1'
+if sys.platform=='win32':
+ defs += ' USE_MSVC6FIXES'
+incs = env['BF_PNG_INC'] + ' ' + env['BF_ZLIB_INC'] + ' ' +env['BF_SDL_INC']
+
+env.BlenderLib ('blender_elbeem', sources, Split(incs), Split(defs), libtype='blender', priority=0 )
diff --git a/intern/ghost/SConscript b/intern/ghost/SConscript
index 23a741bb3b9..6009b14767f 100644
--- a/intern/ghost/SConscript
+++ b/intern/ghost/SConscript
@@ -1,42 +1,30 @@
#!/usr/bin/python
-Import ('user_options_dict')
-Import ('library_env')
-Import ('window_system')
+import sys
+import os
-ghost_env = library_env.Copy ()
+Import ('env')
-source_files = ['intern/GHOST_Buttons.cpp',
- 'intern/GHOST_C-api.cpp',
- 'intern/GHOST_CallbackEventConsumer.cpp',
- 'intern/GHOST_DisplayManager.cpp',
- 'intern/GHOST_EventManager.cpp',
- 'intern/GHOST_EventPrinter.cpp',
- 'intern/GHOST_ISystem.cpp',
- 'intern/GHOST_ModifierKeys.cpp',
- 'intern/GHOST_Rect.cpp',
- 'intern/GHOST_System.cpp',
- 'intern/GHOST_TimerManager.cpp',
- 'intern/GHOST_Window.cpp',
- 'intern/GHOST_WindowManager.cpp']
+window_system = sys.platform
-if window_system == 'X11':
- source_files += ['intern/GHOST_DisplayManagerX11.cpp',
- 'intern/GHOST_SystemX11.cpp',
- 'intern/GHOST_WindowX11.cpp']
-elif window_system == 'WIN32':
- source_files += ['intern/GHOST_DisplayManagerWin32.cpp',
- 'intern/GHOST_SystemWin32.cpp',
- 'intern/GHOST_WindowWin32.cpp']
-elif window_system == 'CARBON':
- source_files += ['intern/GHOST_DisplayManagerCarbon.cpp',
- 'intern/GHOST_SystemCarbon.cpp',
- 'intern/GHOST_WindowCarbon.cpp']
-else:
- print "Unknown window system specified."
+sources = env.Glob('intern/*.cpp')
+
+pf = ['GHOST_DisplayManager', 'GHOST_System', 'GHOST_Window']
-ghost_env.Append (CPPPATH = ['.',
- '../ghost',
- '../string'])
+if window_system == 'linux2':
+ for f in pf:
+ sources.remove('intern' + os.sep + f + 'Win32.cpp')
+ sources.remove('intern' + os.sep + f + 'Carbon.cpp')
+elif window_system == 'win32':
+ for f in pf:
+ sources.remove('intern' + os.sep + f + 'X11.cpp')
+ sources.remove('intern' + os.sep + f + 'Carbon.cpp')
+elif window_system == 'darwin':
+ for f in pf:
+ sources.remove('intern' + os.sep + f + 'Win32.cpp')
+ sources.remove('intern' + os.sep + f + 'X11.cpp')
+else:
+ print "Unknown window system specified."
+ Exit()
-ghost_env.Append (CPPPATH = user_options_dict['OPENGL_INCLUDE'])
-ghost_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/blender_GHOST', source=source_files)
+incs = '. ../string ' + env['BF_OPENGL_INC']
+env.BlenderLib ('blender_GHOST', sources, Split(incs), [], libtype='core', priority = 25 )
diff --git a/intern/guardedalloc/SConscript b/intern/guardedalloc/SConscript
index 4044aa82e4f..519dbe8eedf 100644
--- a/intern/guardedalloc/SConscript
+++ b/intern/guardedalloc/SConscript
@@ -1,11 +1,8 @@
#!/usr/bin/python
-Import ('user_options_dict')
-Import ('library_env')
-guardal_env = library_env.Copy ()
+Import('env')
-source_files = ['intern/mallocn.c']
+sources = env.Glob('intern/*.c')
+incs = '.'
-guardal_env.Append (CPPPATH = ['../guardedalloc'])
-
-guardal_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/blender_guardedalloc', source=source_files)
+env.BlenderLib ('blender_guardedalloc', sources, Split(incs), [], libtype='intern', priority = 0 )
diff --git a/intern/iksolver/SConscript b/intern/iksolver/SConscript
index 7ef8a9b9d11..81bf61dfcd8 100644
--- a/intern/iksolver/SConscript
+++ b/intern/iksolver/SConscript
@@ -1,17 +1,8 @@
#!/usr/bin/python
-Import ('user_options_dict')
-Import ('library_env')
+Import ('env')
-iksolver_env = library_env.Copy ()
+sources = env.Glob('intern/*.cpp')
-source_files = ['intern/IK_QTask.cpp',
- 'intern/IK_QJacobianSolver.cpp',
- 'intern/IK_QSegment.cpp',
- 'intern/IK_QJacobian.cpp',
- 'intern/IK_Solver.cpp']
+incs = 'intern ../moto/include ../memutil'
-iksolver_env.Append (CPPPATH = ['intern',
- '../moto/include',
- '../memutil'])
-
-iksolver_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/blender_IK', source=source_files)
+env.BlenderLib ('blender_IK', sources, Split(incs), [], libtype='blender', priority=10 )
diff --git a/intern/memutil/SConscript b/intern/memutil/SConscript
index febb6364a05..4d17f13f214 100644
--- a/intern/memutil/SConscript
+++ b/intern/memutil/SConscript
@@ -1,11 +1,8 @@
#!/usr/bin/python
-Import ('user_options_dict')
-Import ('library_env')
+Import ('env')
-memutil_env = library_env.Copy ()
+sources = env.Glob('intern/*.cpp')
-source_files = ['intern/MEM_RefCountedC-Api.cpp']
+incs = '.'
-memutil_env.Append (CPPPATH = ['.','../memutil'])
-
-memutil_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/blender_MEM', source=source_files)
+env.BlenderLib ('blender_MEM', sources, Split(incs), [], libtype='intern', priority = 10 )
diff --git a/intern/moto/SConscript b/intern/moto/SConscript
index b0956c15dd2..44e2fae76f3 100644
--- a/intern/moto/SConscript
+++ b/intern/moto/SConscript
@@ -1,22 +1,8 @@
#!/usr/bin/python
-Import ('user_options_dict')
-Import ('library_env')
+Import ('env')
-moto_env = library_env.Copy ()
+sources = env.Glob('intern/*.cpp')
-source_files = ['intern/MT_Assert.cpp',
- 'intern/MT_CmMatrix4x4.cpp',
- 'intern/MT_Matrix3x3.cpp',
- 'intern/MT_Matrix4x4.cpp',
- 'intern/MT_Plane3.cpp',
- 'intern/MT_Point3.cpp',
- 'intern/MT_Quaternion.cpp',
- 'intern/MT_Transform.cpp',
- 'intern/MT_Vector2.cpp',
- 'intern/MT_Vector3.cpp',
- 'intern/MT_Vector4.cpp',
- 'intern/MT_random.cpp']
+incs = 'include'
-moto_env.Append (CPPPATH = ['include'])
-
-moto_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/blender_MT', source=source_files)
+env.BlenderLib ('blender_MT', sources, Split(incs), [], libtype=['intern','game','game2'], priority = [15, 55,100] )
diff --git a/intern/opennl/SConscript b/intern/opennl/SConscript
index 4e0260c7f33..b1cbdeb8ba3 100644
--- a/intern/opennl/SConscript
+++ b/intern/opennl/SConscript
@@ -1,43 +1,9 @@
-Import ('user_options_dict')
-Import ('library_env')
+#!/usr/bin/python
+Import ('env')
-opennl_env = library_env.Copy ()
+sources = env.Glob('intern/*.c') + env.Glob('superlu/*.c')
-source_files = ['intern/opennl.c',
- 'superlu/colamd.c',
- 'superlu/get_perm_c.c',
- 'superlu/heap_relax_snode.c',
- 'superlu/lsame.c',
- 'superlu/memory.c',
- 'superlu/mmd.c',
- 'superlu/relax_snode.c',
- 'superlu/scolumn_bmod.c',
- 'superlu/scolumn_dfs.c',
- 'superlu/scopy_to_ucol.c',
- 'superlu/sgssv.c',
- 'superlu/sgstrf.c',
- 'superlu/sgstrs.c',
- 'superlu/smemory.c',
- 'superlu/smyblas2.c',
- 'superlu/sp_coletree.c',
- 'superlu/sp_ienv.c',
- 'superlu/sp_preorder.c',
- 'superlu/spanel_bmod.c',
- 'superlu/spanel_dfs.c',
- 'superlu/spivotL.c',
- 'superlu/spruneL.c',
- 'superlu/ssnode_bmod.c',
- 'superlu/ssnode_dfs.c',
- 'superlu/ssp_blas2.c',
- 'superlu/ssp_blas3.c',
- 'superlu/strsv.c',
- 'superlu/superlu_timer.c',
- 'superlu/sutil.c',
- 'superlu/util.c',
- 'superlu/xerbla.c']
+incs = 'extern superlu'
-opennl_env.Append (CPPPATH = ['extern',
- 'superlu'])
-
-opennl_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/blender_ONL', source=source_files)
+env.BlenderLib ('blender_ONL', sources, Split(incs), [], libtype='core', priority=55 )
diff --git a/intern/string/SConscript b/intern/string/SConscript
index 16833832d0d..423904ff868 100644
--- a/intern/string/SConscript
+++ b/intern/string/SConscript
@@ -1,11 +1,7 @@
#!/usr/bin/python
-Import ('user_options_dict')
-Import ('library_env')
+Import ('env')
-string_env = library_env.Copy ()
+sources = env.Glob('intern/*.cpp')
+incs = '.'
-source_files = ['intern/STR_String.cpp']
-
-string_env.Append (CPPPATH = ['.', '../string'])
-
-string_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/blender_STR', source=source_files)
+env.BlenderLib ('blender_STR', sources, Split(incs), [], libtype='core', priority = 30 )