fix for bug of long group long name, bug found and fixed for bmx007
[blender-staging.git] / SConstruct
index cc9dac9bedc1299cce20af58335501c04f61bbc9..695fd29795b403230783a55289ef97a2ba8e653f 100644 (file)
@@ -11,6 +11,7 @@ bs_globals.targets = COMMAND_LINE_TARGETS
 
 print 'targets = ',bs_globals.targets
 print 'arguments = ', bs_globals.arguments
+print os.getcwd()
 
 appname = ''
 playername = ''
@@ -25,7 +26,10 @@ if sys.platform != 'win32':
        config_guess = os.popen("SRCHOME=source/ source/tools/guess/guessconfig").read()[:-1]
 else:
        config_guess = "windows"
-       
+
+#the above check is not enough for darwin. we way want to build for darwin/X11
+#more, now even for Os X, we need to check and take in account arch 
+#(PPC, x86, universal binaries)        
 if sys.platform == 'darwin':
        appname = 'blender'
        playername = 'blenderplayer'
@@ -42,12 +46,16 @@ bs_config.parseOpts()
 # don't want to put scons-generated .sconsign files in the source tree, but in
 # the root_build_dir, we have to create that dir ourselves before SCons tries
 # to access/create the file containing .sconsign data.
+# we need to create the top level hierarchy too (at least on Os X) 
 if os.path.isdir (bs_globals.root_build_dir) == 0:
        os.makedirs (bs_globals.root_build_dir)
+       os.makedirs (bs_globals.root_build_dir+os.sep+'extern')
+       os.makedirs (bs_globals.root_build_dir+os.sep+'intern')
+       os.makedirs (bs_globals.root_build_dir+os.sep+'source')
 
 # Blender version.
-version='2.37'
-shortversion = '237' # for wininst target -> nsis installer creation
+version='2.40-alpha1'
+shortversion = '240alpha1' # for wininst target -> nsis installer creation
 
 sdl_env = Environment (ENV = os.environ)
 freetype_env = Environment (ENV = os.environ)
@@ -59,12 +67,15 @@ if sys.platform == 'linux2' or sys.platform == 'linux-i386':
        use_openal = 'false'
        use_fmod = 'false'
        use_quicktime = 'false'
+       use_openexr = 'true'
        use_sumo = 'true'
        use_ode = 'false'
+       use_bullet = 'true'
        use_buildinfo = 'true'
+       use_fluidsim = 'true'
        build_blender_dynamic = 'true'
        build_blender_static = 'false'
-       build_blender_player = 'true'
+       build_blender_player = 'false'
        build_blender_plugin = 'false'
        release_flags = ['-O2']
        debug_flags = ['-O2', '-g']
@@ -85,10 +96,20 @@ if sys.platform == 'linux2' or sys.platform == 'linux-i386':
        png_lib = ['png']
        png_libpath = ['/usr/lib']
        png_include = ['/usr/include']
+       # OpenEXR library information
+       if use_openexr == 'true':
+               defines += ['WITH_OPENEXR']
+       openexr_lib = ['Iex', 'Half', 'IlmImf', 'Imath']
+       openexr_libpath = ['/usr/lib']
+       openexr_include = ['/usr/include/OpenEXR']
        # jpeg library information
        jpeg_lib = ['jpeg']
        jpeg_libpath = ['/usr/lib']
        jpeg_include = ['/usr/include']
+       #tiff library information
+       tiff_lib = ['tiff']
+       tiff_libpath = ['/usr/lib']
+       tiff_include = ['/usr/include']
        # OpenGL library information
        opengl_lib = ['GL', 'GLU']
        opengl_static = ['/usr/lib/libGL.a', '/usr/lib/libGLU.a']
@@ -107,6 +128,10 @@ if sys.platform == 'linux2' or sys.platform == 'linux-i386':
        qhull_lib = []
        qhull_libpath = []
        qhull_include = ['#extern/qhull/include']
+       # Bullet library information
+       bullet_lib = []
+       bullet_libpath = []
+       bullet_include = ['#extern/bullet','#extern/bullet/LinearMath','#extern/bullet/Bullet','#extern/bullet/BulletDynamics']
        # ODE library information
        ode_lib = ['ode']
        ode_libpath = ['#../lib/linux-glibc2.2.5-i386/ode/lib']
@@ -137,12 +162,15 @@ elif sys.platform == 'darwin':
        use_gameengine = 'true'
        use_openal = 'true'
        use_fmod = 'false'
-       use_openal = 'false'
+       use_openal = 'true'
        use_quicktime = 'true'
+       use_openexr = 'true'
        use_precomp = 'true'
        use_sumo = 'true'
        use_ode = 'false'
+       use_bullet = 'true'
        use_buildinfo = 'true'
+       use_fluidsim = 'true'
        build_blender_dynamic = 'true'
        build_blender_static = 'false'
        build_blender_player = 'true'
@@ -178,10 +206,20 @@ elif sys.platform == 'darwin':
        png_lib = ['libpng']
        png_libpath = [darwin_precomp + 'png/lib']
        png_include = [darwin_precomp + 'png/include']
+       # OpenEXR library information
+       if use_openexr == 'true':
+               defines += ['WITH_OPENEXR']
+       openexr_lib = ['Iex', 'Half', 'IlmImf', 'Imath']
+       openexr_libpath = ['/usr/local/lib']
+       openexr_include = ['/usr/local/include/OpenEXR']
        # jpeg library information
        jpeg_lib = ['libjpeg']
        jpeg_libpath = [darwin_precomp + 'jpeg/lib']
        jpeg_include = [darwin_precomp + 'jpeg/include']
+       # TIFF library information
+       tiff_lib = ['libtiff']
+       tiff_libpath = [darwin_precomp + 'tiff/lib']
+       tiff_include = [darwin_precomp + 'tiff/include']
        # OpenGL library information
        opengl_lib = ['GL', 'GLU']
        opengl_static = []
@@ -209,6 +247,10 @@ elif sys.platform == 'darwin':
        qhull_lib = []                                          
        qhull_libpath = []                                          
        qhull_include = ['#/extern/qhull/include']
+       # Bullet library information
+       bullet_lib = []
+       bullet_libpath = []
+       bullet_include = ['#extern/bullet','#extern/bullet/LinearMath','#extern/bullet/Bullet','#extern/bullet/BulletDynamics']
        # ODE library information
        ode_lib = ['libode']                                             
        ode_libpath = [darwin_precomp + 'ode/lib']                                          
@@ -231,8 +273,8 @@ elif sys.platform == 'darwin':
                                                '-framework', 'IOKit' , 
                                                '-framework', 'AppKit']
        # International stuff
-       ftgl_lib = []
-       ftgl_libpath = []
+       ftgl_lib = ['libftgl']
+       ftgl_libpath = [darwin_precomp + 'ftgl/lib']
        ftgl_include = ['#extern/bFTGL/include']
        freetype_lib = ['libfreetype']
        freetype_libpath = [darwin_precomp + 'freetype/lib']
@@ -251,9 +293,12 @@ elif sys.platform == 'cygwin':
        use_openal = 'false'
        use_fmod = 'false'
        use_quicktime = 'false'
+       use_openexr = 'true'
        use_sumo = 'false'
        use_ode = 'false'
+       use_bullet = 'false'
        use_buildinfo = 'false'
+       use_fluidsim = 'true'
        build_blender_dynamic = 'true'
        build_blender_static = 'false'
        build_blender_player = 'false'
@@ -279,10 +324,20 @@ elif sys.platform == 'cygwin':
        png_lib = ['png']
        png_libpath = ['#../lib/windows/png/lib']
        png_include = ['#../lib/windows/png/include']
+       # OpenEXR library information
+       if use_openexr == 'true':
+               defines += ['WITH_OPENEXR']
+       openexr_lib = ['Iex', 'Half', 'IlmImf', 'Imath']
+       openexr_libpath = ['/usr/lib']
+       openexr_include = ['/usr/include/OpenEXR']
        # jpeg library information
        jpeg_lib = ['jpeg']
        jpeg_libpath = ['#../lib/windows/jpeg/lib']
        jpeg_include = ['#../lib/windows/jpeg/include']
+       # Tiff Library information
+       tiff_lib = ['libtiff']
+       tiff_libpath = ['#../lib/windows/tiff/lib']
+       tiff_include = ['#../lib/windows/tiff/include']
        # OpenGL library information
        opengl_lib = ['opengl32', 'glu32']
        opengl_static = []
@@ -301,6 +356,10 @@ elif sys.platform == 'cygwin':
        qhull_lib = []
        qhull_libpath = []
        qhull_include = ['#extern/qhull/include']
+       # Bullet library information
+       bullet_lib = []
+       bullet_libpath = []
+       bullet_include = ['#extern/bullet','#extern/bullet/LinearMath','#extern/bullet/Bullet','#extern/bullet/BulletDynamics']
        # ODE library information
        ode_lib = ['ode']
        ode_libpath = ['#../lib/windows/gcc/ode/lib']
@@ -331,9 +390,12 @@ elif sys.platform == 'win32':
        use_openal = 'true'
        use_fmod = 'false'
        use_quicktime = 'true'
+       use_openexr = 'true'
+       use_bullet = 'true'
        use_sumo = 'true'
        use_ode = 'false'
        use_buildinfo = 'true'
+       use_fluidsim = 'true'
        build_blender_dynamic = 'true'
        build_blender_static = 'false'
        build_blender_player = 'true'
@@ -343,15 +405,16 @@ elif sys.platform == 'win32':
        extra_flags = ['/EHsc', '/J', '/W3', '/Gd', '/MT']
        cxxflags = []
        defines = ['WIN32', '_CONSOLE']
-       defines += ['WITH_QUICKTIME']
+       if use_quicktime == 'true':
+               defines += ['WITH_QUICKTIME']
        defines += ['_LIB', 'USE_OPENAL']
        defines += ['FTGL_LIBRARY_STATIC']
        warn_flags = []
        platform_libs = [ 'qtmlClient', 'soundsystem',
                                         'ws2_32', 'dxguid', 'vfw32', 'winmm',
                                         'iconv', 'kernel32', 'user32', 'gdi32',
-                                        'winspool', 'comdlg32', 'advapi32', 'shell32',
-                                        'ole32', 'oleaut32', 'uuid', 'odbc32', 'odbccp32',
+                                        'comdlg32', 'advapi32', 'shell32',
+                                        'ole32', 'oleaut32', 'uuid', 
                                         'libcmt', 'libc']
        platform_libpath = ['#../lib/windows/iconv/lib',
                                                '#../lib/windows/QTDevWin/Libraries']
@@ -373,17 +436,27 @@ elif sys.platform == 'win32':
        if use_quicktime == 'true':
                extra_includes += ['#../lib/windows/QTDevWin/CIncludes']
        # z library information
-       z_lib = ['libz_st']
+       z_lib = ['zlib']
        z_libpath = ['#../lib/windows/zlib/lib']
        z_include = ['#../lib/windows/zlib/include']
        # png library information
        png_lib = ['libpng_st']
        png_libpath = ['#../lib/windows/png/lib']
        png_include = ['#../lib/windows/png/include']
+       # OpenEXR library information
+       if use_openexr == 'true':
+               defines += ['WITH_OPENEXR']
+       openexr_lib = ['Iex', 'Half', 'IlmImf', 'Imath']
+       openexr_libpath = ['/usr/lib']
+       openexr_include = ['/usr/include/OpenEXR']
        # jpeg library information
        jpeg_lib = ['libjpeg']
        jpeg_libpath = ['#../lib/windows/jpeg/lib']
        jpeg_include = ['#../lib/windows/jpeg/include']
+       # Tiff Library information
+       tiff_lib = ['libtiff']
+       tiff_libpath = ['#../lib/windows/tiff/lib']
+       tiff_include = ['#../lib/windows/tiff/include']
        # OpenGL library information
        opengl_lib = ['opengl32', 'glu32']
        opengl_static = []
@@ -402,14 +475,18 @@ elif sys.platform == 'win32':
        qhull_lib = ['qhull']
        qhull_libpath = ['#../lib/windows/qhull/lib']
        qhull_include = ['#extern/qhull/include']
+       # Bullet library information
+       bullet_lib = []
+       bullet_libpath = []
+       bullet_include = ['#extern/bullet','#extern/bullet/LinearMath','#extern/bullet/Bullet','#extern/bullet/BulletDynamics']
        # ODE library information
        ode_lib = []                                                                                            # TODO
        ode_libpath = ['#../lib/windows/ode/lib']
        ode_include = ['#../lib/windows/ode/include']
        # Python lib name
-       python_include = ['#../lib/windows/python/include/python2.3']
+       python_include = ['#../lib/windows/python/include/python2.4']
        python_libpath = ['#../lib/windows/python/lib']
-       python_lib = ['python23']
+       python_lib = ['python24']
        python_linkflags = []
        # International stuff
        ftgl_lib = []
@@ -432,9 +509,12 @@ elif string.find (sys.platform, 'sunos') != -1:
        use_openal = 'false'
        use_fmod = 'false'
        use_quicktime = 'false'
+       use_openexr = 'false'
        use_sumo = 'false'
        use_ode = 'false'
+       use_bullet = 'false'
        use_buildinfo = 'false'
+       use_fluidsim = 'true'
        build_blender_dynamic = 'true'
        build_blender_static = 'false'
        build_blender_player = 'false'
@@ -458,6 +538,12 @@ elif string.find (sys.platform, 'sunos') != -1:
        png_lib = ['png']
        png_libpath = []
        png_include = []
+       # OpenEXR library information
+       if use_openexr == 'true':
+               defines += ['WITH_OPENEXR']
+       openexr_lib = ['Iex', 'Half', 'IlmImf', 'Imath']
+       openexr_libpath = ['/usr/lib']
+       openexr_include = ['/usr/include/OpenEXR']
        # jpeg library information
        jpeg_lib = ['jpeg']
        jpeg_libpath = []
@@ -484,6 +570,10 @@ elif string.find (sys.platform, 'sunos') != -1:
        ode_lib = []
        ode_libpath = []
        ode_include = ['#extern/ode/dist/include/ode']
+       # Bullet library information
+       bullet_lib = []
+       bullet_libpath = []
+       bullet_include = ['#extern/bullet','#extern/bullet/LinearMath','#extern/bullet/Bullet','#extern/bullet/BulletDynamics']
        # Python variables.
        python_lib = ['python%d.%d' % sys.version_info[0:2]]
        python_libpath = [sysconfig.get_python_lib (0, 1) + '/config']
@@ -510,9 +600,12 @@ elif string.find (sys.platform, 'irix') != -1:
        use_openal = 'false'
        use_fmod = 'false'
        use_quicktime = 'false'
+       use_openexr = 'false'
        use_sumo = 'false'
        use_ode = 'false'
+       use_bullet = 'false'
        use_buildinfo = 'false'
+       use_fluidsim = 'true'
        build_blender_dynamic = 'true'
        build_blender_static = 'false'
        build_blender_player = 'false'
@@ -544,6 +637,12 @@ elif string.find (sys.platform, 'irix') != -1:
        png_lib = ['png']
        png_libpath = [irix_precomp + '/png/lib']
        png_include = [irix_precomp + '/png/include']
+       # OpenEXR library information
+       if use_openexr == 'true':
+               defines += ['WITH_OPENEXR']
+       openexr_lib = ['Iex', 'Half', 'IlmImf', 'Imath']
+       openexr_libpath = ['/usr/lib']
+       openexr_include = ['/usr/include/OpenEXR']
        # jpeg library information
        jpeg_lib = ['jpeg']
        jpeg_libpath = [irix_precomp + '/jpeg/lib']
@@ -565,6 +664,10 @@ elif string.find (sys.platform, 'irix') != -1:
        qhull_lib = []
        qhull_libpath = []
        qhull_include = ['#extern/qhull/include']
+       # Bullet library information
+       bullet_lib = []
+       bullet_libpath = []
+       bullet_include = ['#extern/bullet','#extern/bullet/LinearMath','#extern/bullet/Bullet','#extern/bullet/BulletDynamics']
        # ODE library information
        ode_lib = []
        ode_libpath = []
@@ -600,9 +703,12 @@ elif sys.platform=='openbsd3':
        use_openal = 'false'
        use_fmod = 'false'
        use_quicktime = 'false'
+       use_openexr = 'false'
        use_sumo = 'false'
        use_ode = 'false'
+       use_bullet = 'false'
        use_buildinfo = 'true'
+       use_fluidsim = 'true'
        build_blender_dynamic = 'true'
        build_blender_static = 'false'
        build_blender_player = 'false'
@@ -625,6 +731,12 @@ elif sys.platform=='openbsd3':
        png_lib = ['png']
        png_libpath = ['/usr/local/lib']
        png_include = ['/usr/local/include/libpng']
+       # OpenEXR library information
+       if use_openexr == 'true':
+               defines += ['WITH_OPENEXR']
+       openexr_lib = ['Iex', 'Half', 'IlmImf', 'Imath']
+       openexr_libpath = ['/usr/lib']
+       openexr_include = ['/usr/include/OpenEXR']
        # jpeg library information
        jpeg_lib = ['jpeg']
        jpeg_libpath = ['/usr/local/lib']
@@ -647,6 +759,10 @@ elif sys.platform=='openbsd3':
        qhull_lib = []
        qhull_libpath = []
        qhull_include = ['#extern/qhull/include']
+       # Bullet library information
+       bullet_lib = []
+       bullet_libpath = []
+       bullet_include = ['#extern/bullet','#extern/bullet/LinearMath','#extern/bullet/Bullet','#extern/bullet/BulletDynamics']
        # ODE library information
        ode_lib = ['ode']
        ode_libpath = ['#../lib/linux-glibc2.2.5-i386/ode/lib']
@@ -679,9 +795,12 @@ elif sys.platform=='freebsd4' or sys.platform=='freebsd5':
        use_openal = 'false'
        use_fmod = 'false'
        use_quicktime = 'false'
+       use_openexr = 'false'
        use_sumo = 'false'
        use_ode = 'false'
+       use_bullet = 'false'
        use_buildinfo = 'true'
+       use_fluidsim = 'true'
        build_blender_dynamic = 'true'
        build_blender_static = 'false'
        build_blender_player = 'false'
@@ -704,6 +823,12 @@ elif sys.platform=='freebsd4' or sys.platform=='freebsd5':
        png_lib = ['png']
        png_libpath = ['/usr/local/lib']
        png_include = ['/usr/local/include']
+       # OpenEXR library information
+       if use_openexr == 'true':
+               defines += ['WITH_OPENEXR']
+       openexr_lib = ['Iex', 'Half', 'IlmImf', 'Imath']
+       openexr_libpath = ['/usr/lib']
+       openexr_include = ['/usr/include/OpenEXR']
        # jpeg library information
        jpeg_lib = ['jpeg']
        jpeg_libpath = ['/usr/local/lib']
@@ -726,6 +851,10 @@ elif sys.platform=='freebsd4' or sys.platform=='freebsd5':
        qhull_lib = []
        qhull_libpath = []
        qhull_include = ['#extern/qhull/include']
+       # Bullet library information
+       bullet_lib = []
+       bullet_libpath = []
+       bullet_include = ['#extern/bullet','#extern/bullet/LinearMath','#extern/bullet/Bullet','#extern/bullet/BulletDynamics']
        # ODE library information
        ode_lib = ['ode']
        ode_libpath = ['#../lib/linux-glibc2.2.5-i386/ode/lib']
@@ -794,11 +923,15 @@ else:
        config.write ("BUILD_GAMEENGINE = %r\n"%(use_gameengine))
        if use_ode == 'true':
                config.write ("USE_PHYSICS = 'ode'\n")
+       elif (use_bullet == 'true') and (use_sumo == 'false'):
+               config.write("USE_PHYSICS = 'bullet'\n")
        else:
                config.write ("USE_PHYSICS = 'solid'\n")
        config.write ("USE_OPENAL = %r\n"%(use_openal))
        config.write ("USE_FMOD = %r\n"%(use_fmod))
        config.write ("USE_QUICKTIME = %r\n"%(use_quicktime))
+       config.write ("USE_OPENEXR = %r\n"%(use_openexr))
+       config.write ("USE_FLUIDSIM = %r\n"%(use_fluidsim))
        config.write ("\n# Compiler information.\n")
        config.write ("HOST_CC = %r\n"%(env_dict['CC']))
        config.write ("HOST_CXX = %r\n"%(env_dict['CXX']))
@@ -824,9 +957,15 @@ else:
        config.write ("PNG_INCLUDE = %r\n"%(png_include))
        config.write ("PNG_LIBPATH = %r\n"%(png_libpath))
        config.write ("PNG_LIBRARY = %r\n"%(png_lib))
+        config.write ("OPENEXR_INCLUDE = %r\n"%(openexr_include))
+        config.write ("OPENEXR_LIBPATH = %r\n"%(openexr_libpath))
+        config.write ("OPENEXR_LIBRARY = %r\n"%(openexr_lib))
        config.write ("JPEG_INCLUDE = %r\n"%(jpeg_include))
        config.write ("JPEG_LIBPATH = %r\n"%(jpeg_libpath))
        config.write ("JPEG_LIBRARY = %r\n"%(jpeg_lib))
+       config.write ("TIFF_INCLUDE = %r\n"%(tiff_include))
+       config.write ("TIFF_LIBPATH = %r\n"%(tiff_libpath))
+       config.write ("TIFF_LIBRARY = %r\n"%(tiff_lib))
        config.write ("OPENGL_INCLUDE = %r\n"%(opengl_include))
        config.write ("OPENGL_LIBPATH = %r\n"%(opengl_libpath))
        config.write ("OPENGL_LIBRARY = %r\n"%(opengl_lib))
@@ -842,6 +981,9 @@ else:
        config.write ("ODE_INCLUDE = %r\n"%(ode_include))
        config.write ("ODE_LIBPATH = %r\n"%(ode_libpath))
        config.write ("ODE_LIBRARY = %r\n"%(ode_lib))
+       config.write ("BULLET_INCLUDE = %r\n"%(bullet_include))
+       config.write ("BULLET_LIBPATH = %r\n"%(bullet_libpath))
+       config.write ("BULLET_LIBRARY = %r\n"%(bullet_lib))
        config.write ("OPENAL_INCLUDE = %r\n"%(openal_include))
        config.write ("OPENAL_LIBPATH = %r\n"%(openal_libpath))
        config.write ("OPENAL_LIBRARY = %r\n"%(openal_lib))
@@ -891,7 +1033,7 @@ user_options.AddOptions (
                                        'false')),
                (EnumOption ('USE_PHYSICS', 'solid',
                                        'Select which physics engine to use.',
-                                       allowed_values = ('ode', 'solid'))),
+                                       allowed_values = ('ode', 'solid', 'bullet'))),
                (BoolOption ('BUILD_GAMEENGINE',
                                        'Set to 1 to build blender with game engine support.',
                                        'false')),
@@ -904,6 +1046,12 @@ user_options.AddOptions (
                (BoolOption ('USE_QUICKTIME',
                                        'Set to 1 to add support for QuickTime.',
                                        'false')),
+               (BoolOption ('USE_OPENEXR',
+                                        'Set to 1 to add support for OpenEXR.',
+                                        'false')),
+               (BoolOption ('USE_FLUIDSIM', # NT test new
+                                       'Set to 0 to disable compilation of fluid simulation library El\'Beem.',
+                                       'true')),
                ('HOST_CC', 'C compiler for the host platfor. This is the same as target platform when not cross compiling.'),
                ('HOST_CXX', 'C++ compiler for the host platform. This is the same as target platform when not cross compiling.'),
                ('TARGET_CC', 'C compiler for the target platform.'),
@@ -927,9 +1075,15 @@ user_options.AddOptions (
                ('PNG_INCLUDE', 'Include directory for png header files.'),
                ('PNG_LIBPATH', 'Library path where the png library is located.'),
                ('PNG_LIBRARY', 'png library name.'),
+                ('OPENEXR_INCLUDE', 'Include directory for OpenEXR header files.'),
+                ('OPENEXR_LIBPATH', 'Library path where the OpenEXR libraries are located.'),
+                ('OPENEXR_LIBRARY', 'OpenEXR library names.'),
                ('JPEG_INCLUDE', 'Include directory for jpeg header files.'),
                ('JPEG_LIBPATH', 'Library path where the jpeg library is located.'),
                ('JPEG_LIBRARY', 'jpeg library name.'),
+               ('TIFF_INCLUDE', 'Include directory for TIFF header files.'),
+               ('TIFF_LIBPATH', 'Library path where the TIFF library is located.'),
+               ('TIFF_LIBRARY', 'TIFF library name.'),
                ('OPENGL_INCLUDE', 'Include directory for OpenGL header files.'),
                ('OPENGL_LIBPATH', 'Library path where the OpenGL libraries are located.'),
                ('OPENGL_LIBRARY', 'OpenGL library names.'),
@@ -943,6 +1097,9 @@ user_options.AddOptions (
                ('ODE_INCLUDE', 'Include directory for ODE header files.'),
                ('ODE_LIBPATH', 'Library path where the ODE library is located.'),
                ('ODE_LIBRARY', 'ODE library name.'),
+               ('BULLET_INCLUDE', 'Include directory for BULLET header files.'),
+               ('BULLET_LIBPATH', 'Library path where the BULLET library is located.'),
+               ('BULLET_LIBRARY', 'BULLET library name'),
                ('OPENAL_INCLUDE', 'Include directory for OpenAL header files.'),
                ('OPENAL_LIBPATH', 'Library path where the OpenAL library is located.'),
                ('OPENAL_LIBRARY', 'OpenAL library name.'),
@@ -978,6 +1135,7 @@ bs_globals.config_guess = config_guess
 
 if user_options_dict['BUILD_GAMEENGINE'] == 1:
        defines += ['GAMEBLENDER=1']
+       defines += ['USE_BULLET']
        if user_options_dict['USE_PHYSICS'] == 'ode':
                defines += ['USE_ODE']
        else:
@@ -1000,6 +1158,9 @@ platform_linkflags += user_options_dict['LDFLAGS']
 
 user_options_dict['PLATFORM_LINKFLAGS'] = platform_linkflags
 
+if user_options_dict['USE_FLUIDSIM'] == 0: # NT test new
+       use_fluidsim='false';
+
 #-----------------------------------------------------------------------------
 # Generic library generation environment. This one is the basis for each
 # library.
@@ -1026,6 +1187,7 @@ if bs_globals.enable_clean==0: # only read SConscripts when not cleaning, this t
        Export ('user_options_dict')
        Export ('library_env')
        Export ('sdl_env')
+       Export ('use_fluidsim') # NT test
        
        BuildDir (bs_globals.root_build_dir+'/extern', 'extern', duplicate=0)
        SConscript (bs_globals.root_build_dir+'extern/SConscript')