diff options
-rw-r--r-- | SConstruct | 493 | ||||
-rw-r--r-- | source/blender/blenlib/SConscript | 1 | ||||
-rw-r--r-- | source/blender/ftfont/SConscript | 1 | ||||
-rw-r--r-- | source/blender/python/SConscript | 5 | ||||
-rw-r--r-- | source/blender/src/SConscript | 12 | ||||
-rwxr-xr-x | source/gameengine/BlenderRoutines/SConscript | 9 | ||||
-rwxr-xr-x | source/gameengine/Converter/SConscript | 9 | ||||
-rwxr-xr-x | source/gameengine/Expressions/SConscript | 6 | ||||
-rwxr-xr-x | source/gameengine/GameLogic/SConscript | 7 | ||||
-rwxr-xr-x | source/gameengine/Ketsji/KXNetwork/SConscript | 4 | ||||
-rw-r--r-- | source/gameengine/Ketsji/SConscript | 9 |
11 files changed, 401 insertions, 155 deletions
diff --git a/SConstruct b/SConstruct index bcc11452313..40180d82193 100644 --- a/SConstruct +++ b/SConstruct @@ -30,33 +30,59 @@ if sys.platform == 'linux2': defines = [] warn_flags = ['-Wall', '-W'] window_system = 'X11' - platform_libs = ['m', 'z', 'GL', 'GLU', 'png', 'jpeg', 'util'] + platform_libs = ['m', 'util'] platform_libpath = [] platform_linkflags = [] extra_includes = [] - # SDL specific stuff. + # z library information + z_lib = ['z'] + z_libpath = ['/usr/lib'] + z_include = ['/usr/include'] + # png library information + png_lib = ['png'] + png_libpath = ['/usr/lib'] + png_include = ['/usr/include'] + # jpeg library information + jpeg_lib = ['jpeg'] + jpeg_libpath = ['/usr/lib'] + jpeg_include = ['/usr/include'] + # OpenGL library information + opengl_lib = ['GL', 'GLU'] + opengl_libpath = ['/usr/lib', '/usr/X11R6/lib'] + opengl_include = ['/usr/include'] + # SDL library information sdl_cenv.ParseConfig ('sdl-config --cflags') sdl_lenv.ParseConfig ('sdl-config --libs') - sdl_cdict = sdl_cenv.Dictionary() - sdl_ldict = sdl_lenv.Dictionary() - sdl_cflags = string.join(sdl_cdict['CCFLAGS']) - sdl_include = sdl_cdict['CPPPATH'][0] - link_env.Append (LIBS=sdl_ldict['LIBS']) - link_env.Append (LIBPATH=sdl_ldict['LIBPATH']) - solid_include = '#extern/solid/include' - ode_include = '#extern/ode/dist/include/ode' - # Python variables. - python_include = sysconfig.get_python_inc () - python_libpath = sysconfig.get_python_lib (0, 1) + '/config' - python_lib = 'python%d.%d' % sys.version_info[0:2] - # International stuff - if (use_international == 'true'): - defines += ['INTERNATIONAL', 'FTGL_STATIC_LIBRARY', 'WITH_FREETYPE2'] - platform_libpath += ['#../lib/linux-glibc2.2.5-i386/ftgl/lib', - '#../lib/linux-glibc2.2.5-i386/freetype/lib'] - platform_libs += ['ftgl', 'freetype'] - extra_includes += ['#../lib/linux-glibc2.2.5-i386/ftgl/include', - '#../lib/linux-glibc2.2.5-i386/freetype/include'] + sdl_cflags = sdl_cenv.Dictionary()['CCFLAGS'] + sdl_include = sdl_cenv.Dictionary()['CPPPATH'] + sdl_libpath = sdl_lenv.Dictionary()['LIBPATH'] + sdl_lib = sdl_lenv.Dictionary()['LIBS'] + # SOLID library information + solid_lib = [] # TODO + solid_libpath = [] # TODO + solid_include = ['#extern/solid/include'] + qhull_lib = [] # TODO + qhull_libpath = [] # TODO + qhull_include = ['#extern/qhull/include'] + # ODE library information + ode_lib = [] # TODO + ode_libpath = [] # TODO + ode_include = ['#extern/ode/dist/include/ode'] + # Python library information + python_lib = ['python%d.%d' % sys.version_info[0:2]] + python_libpath = [sysconfig.get_python_lib (0, 1) + '/config'] + python_include = [sysconfig.get_python_inc ()] + # International support information + ftgl_lib = ['ftgl'] + ftgl_libpath = ['#../lib/linux-glibc2.2.5-i386/ftgl/lib'] + ftgl_include = ['#../lib/linux-glibc2.2.5-i386/ftgl/include'] + freetype_lib = ['freetype'] + freetype_libpath = ['#../lib/linux-glibc2.2.5-i386/freetype/lib'] + freetype_include = ['#../lib/linux-glibc2.2.5-i386/freetype/include'] + gettext_lib = [] + gettext_libpath = [] + gettext_include = [] + i18n_defines = ['INTERNATIONAL', 'FTGL_STATIC_LIBRARY', 'WITH_FREETYPE2'] elif sys.platform == 'darwin': use_international = 'false' @@ -79,6 +105,22 @@ elif sys.platform == 'darwin': release_flags = [] debug_flags = ['-g'] window_system = 'CARBON' + # z library information + z_lib = ['z'] + z_libpath = [] + z_include = [] + # png library information + png_lib = ['png'] + png_libpath = [] + png_include = [] + # jpeg library information + jpeg_lib = ['jpeg'] + jpeg_libpath = [] + jpeg_include = [] + # OpenGL library information + opengl_lib = ['GL', 'GLU'] + opengl_libpath = [] + opengl_include = [] # SDL specific stuff. sdl_cenv.ParseConfig ('sdl-config --cflags') sdl_lenv.ParseConfig ('sdl-config --libs') @@ -91,17 +133,36 @@ elif sys.platform == 'darwin': sdl_ldict['LIBPATH'] = [darwin_precomp + '/sdl/lib'] sdl_cdict['CPPPATH'] = [darwin_precomp + '/sdl/include'] - sdl_include = sdl_cdict['CPPPATH'][0] - link_env.Append (LIBS=sdl_ldict['LIBS']) - link_env.Append (LIBPATH=sdl_ldict['LIBPATH']) - platform_libs = ['z', 'GL', 'GLU', 'png', 'jpeg', 'stdc++'] + platform_libs = ['stdc++'] extra_includes = ['/sw/include'] platform_libpath = ['/System/Library/Frameworks/OpenGL.framework/Libraries'] platform_linkflags = [] + # SOLID library information + solid_lib = [] # TODO + solid_libpath = [] # TODO + solid_include = ['#extern/solid/include'] + qhull_lib = [] # TODO + qhull_libpath = [] # TODO + qhull_include = ['#extern/qhull/include'] + # ODE library information + ode_lib = [] # TODO + ode_libpath = [] # TODO + ode_include = ['#extern/ode/dist/include/ode'] # Python variables. - python_lib = 'python%d.%d' % sys.version_info[0:2] - python_libpath = sysconfig.get_python_lib (0, 1) + '/config' - python_include = sysconfig.get_python_inc () + python_lib = ['python%d.%d' % sys.version_info[0:2]] + python_libpath = [sysconfig.get_python_lib (0, 1) + '/config'] + python_include = [sysconfig.get_python_inc ()] + # International stuff + ftgl_lib = ['ftgl'] + ftgl_libpath = [darwin_precomp + '/ftgl/lib'] + ftgl_include = [darwin_precomp + '/ftgl/include'] + freetype_lib = ['freetype'] + freetype_libpath = [darwin_precomp + '/freetype/lib'] + freetype_include = [darwin_precomp + '/freetype/include'] + gettext_lib = [] + gettext_libpath = [] + gettext_include = [] + i18n_defines = [] elif sys.platform == 'cygwin': use_international = 'false' @@ -119,26 +180,37 @@ elif sys.platform == 'cygwin': warn_flags = ['-Wall', '-Wno-char-subscripts'] platform_libs = ['png', 'jpeg', 'netapi32', 'opengl32', 'glu32', 'winmm', - 'mingw32', 'z'] + 'mingw32'] platform_libpath = ['/usr/lib/w32api', '/lib/w32api'] platform_linkflags = ['-mwindows', '-mno-cygwin', '-mconsole'] window_system = 'WIN32' extra_includes = ['/usr/include'] + # z library information + z_lib = ['z'] + z_libpath = ['/usr/lib'] + z_include = ['/usr/include'] # SDL specific stuff. sdl_cenv.ParseConfig ('sdl-config --cflags') sdl_lenv.ParseConfig ('sdl-config --libs') sdl_cdict = sdl_cenv.Dictionary() sdl_ldict = sdl_lenv.Dictionary() sdl_cflags = '-DWIN32' - sdl_include = sdl_cdict['CPPPATH'][0] - link_env.Append (LIBS=sdl_ldict['LIBS']) - link_env.Append (LIBPATH=sdl_ldict['LIBPATH']) # We need to force the Cygwin environment to use the g++ linker. link_env.Replace (CC='g++') # Python variables. python_include = sysconfig.get_python_inc () python_libpath = sysconfig.get_python_lib (0, 1) + '/config' python_lib = 'python%d.%d' % sys.version_info[0:2] + # International stuff + ftgl_lib = ['ftgl'] + ftgl_libpath = ['#../lib/windows/ftgl/lib'] + ftgl_include = ['#../lib/windows/ftgl/include'] + freetype_lib = ['freetype'] + freetype_libpath = ['#../lib/windows/freetype/lib'] + freetype_include = ['#../lib/windows/freetype/include'] + gettext_lib = [] + gettext_libpath = [] + gettext_include = [] elif sys.platform == 'win32': use_international = 'true' @@ -152,31 +224,19 @@ elif sys.platform == 'win32': debug_flags = ['/Zi'] extra_flags = ['/EHsc', '/J', '/W3', '/Gd', '/MT'] cxxflags = [] - defines = ['WIN32', '_CONSOLE', 'FTGL_STATIC_LIBRARY'] - defines += ['INTERNATIONAL', 'WITH_QUICKTIME'] - defines += ['_LIB', 'WITH_FREETYPE2', 'USE_OPENAL'] + defines = ['WIN32', '_CONSOLE'] + defines += ['WITH_QUICKTIME'] + defines += ['_LIB', 'USE_OPENAL'] warn_flags = [] - platform_libs = ['SDL', 'freetype2ST', 'ftgl_static_ST', 'gnu_gettext', - 'qtmlClient', 'odelib', 'openal_static', 'soundsystem', - 'ws2_32', 'dxguid', 'opengl32', 'libjpeg', 'glu32', - 'vfw32', 'winmm', 'libpng_st', 'libz_st', 'solid', - 'qhull', 'iconv', 'kernel32', 'user32', 'gdi32', + platform_libs = [ 'qtmlClient', 'odelib', 'openal_static', 'soundsystem', + 'ws2_32', 'dxguid', 'vfw32', 'winmm', + 'iconv', 'kernel32', 'user32', 'gdi32', 'winspool', 'comdlg32', 'advapi32', 'shell32', 'ole32', 'oleaut32', 'uuid', 'odbc32', 'odbccp32', 'libcmt', 'libc'] - platform_libpath = ['#../lib/windows/ftgl/lib', - '#../lib/windows/freetype/lib', - '#../lib/windows/gettext/lib', - '#../lib/windows/iconv/lib', - '#../lib/windows/jpeg/lib', + platform_libpath = ['#../lib/windows/iconv/lib', '#../lib/windows/QTDevWin/Libraries', - '#../lib/windows/ode/lib', - '#../lib/windows/openal/lib', - '#../lib/windows/png/lib', - '#../lib/windows/zlib/lib', - '#../lib/windows/solid/lib', - '#../lib/windows/qhull/lib', - '#../lib/windows/sdl/lib'] + '#../lib/windows/openal/lib'] platform_linkflags = [ '/SUBSYSTEM:CONSOLE', '/MACHINE:IX86', @@ -191,27 +251,60 @@ elif sys.platform == 'win32': '/NODEFAULTLIB:"libcmtd.lib"', ] window_system = 'WIN32' - extra_includes = ['#../lib/windows/zlib/include', - '#../lib/windows/jpeg/include', - '#../lib/windows/png/include'] - if use_international == 'true': - extra_includes += ['#../lib/windows/ftgl/include', - '#../lib/windows/freetype/include', - '#../lib/windows/gettext/include'] + extra_includes = [] if use_quicktime == 'true': extra_includes += ['#../lib/windows/QTDevWin/CIncludes'] if use_openal == 'true': extra_includes += ['#../lib/windows/openal/include'] - sdl_include = '#../lib/windows/sdl/include' - sdl_cflags = '' + # z library information + z_lib = ['libz_st'] + 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'] + # jpeg library information + jpeg_lib = ['libjpeg'] + jpeg_libpath = ['#../lib/windows/jpeg/lib'] + jpeg_include = ['#../lib/windows/jpeg/include'] + # OpenGL library information + opengl_lib = ['opengl32', 'glu32'] + opengl_libpath = [] + opengl_include = ['/usr/include'] + # SDL library information + sdl_include = ['#../lib/windows/sdl/include'] + sdl_libpath = ['#../lib/windows/sdl/lib'] + sdl_lib = ['SDL'] + sdl_cflags = [] link_env.RES(['source/icons/winblender.rc']) window_system = 'WIN32' - solid_include = '#../lib/windows/solid/include' - ode_include = '#../lib/windows/ode/include' + # SOLID library information + solid_lib = ['solid'] + solid_libpath = ['#../lib/windows/solid/lib'] + solid_include = ['#../lib/windows/solid/include'] + qhull_lib = ['qhull'] + qhull_libpath = ['#../lib/windows/qhull/lib'] + qhull_include = ['#extern/qhull/include'] + # 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.2' python_libpath = '#../lib/windows/python/lib' python_lib = 'python22' + # International stuff + ftgl_lib = ['ftgl_static_ST'] + ftgl_libpath = ['#../lib/windows/ftgl/lib'] + ftgl_include = ['#../lib/windows/ftgl/include'] + freetype_lib = ['freetype2ST'] + freetype_libpath = ['#../lib/windows/freetype/lib'] + freetype_include = ['#../lib/windows/freetype/include'] + gettext_lib = ['gnu_gettext'] + gettext_libpath = ['#../lib/windows/gettext/lib'] + gettext_include = ['#../lib/windows/gettext/include'] + i18n_defines = ['INTERNATIONAL', 'FTGL_STATIC_LIBRARY', 'WITH_FREETYPE2'] elif string.find (sys.platform, 'sunos') != -1: use_international = 'true' @@ -230,34 +323,59 @@ elif string.find (sys.platform, 'sunos') != -1: env['ENV']['CXX']='g++' warn_flags = ['-Wall', '-W'] window_system = 'X11' - platform_libs = ['m', 'z', 'GL', 'GLU', 'png', 'jpeg', 'util'] + platform_libs = ['m', 'util'] platform_libpath = [] platform_linkflags = [] extra_includes = [] - # SDL specific stuff. + # z library information + z_lib = ['z'] + z_libpath = [] + z_include = [] + # png library information + png_lib = ['png'] + png_libpath = [] + png_include = [] + # jpeg library information + jpeg_lib = ['jpeg'] + jpeg_libpath = [] + jpeg_include = [] + # OpenGL library information + opengl_lib = ['GL', 'GLU'] + opengl_libpath = [] + opengl_include = [] + # SDL library information sdl_cenv.ParseConfig ('sdl-config --cflags') sdl_lenv.ParseConfig ('sdl-config --libs') - sdl_cdict = sdl_cenv.Dictionary() - sdl_ldict = sdl_lenv.Dictionary() - sdl_cflags = string.join(sdl_cdict['CCFLAGS']) - sdl_include = sdl_cdict['CPPPATH'][0] - link_env.Append (LIBS=sdl_ldict['LIBS']) - link_env.Append (LIBPATH=sdl_ldict['LIBPATH']) - solid_include = '#extern/solid/include' - ode_include = '#extern/ode/dist/include/ode' + sdl_cflags = sdl_cenv.Dictionary()['CCFLAGS'] + sdl_include = sdl_cenv.Dictionary()['CPPPATH'] + sdl_libpath = sdl_lenv.Dictionary()['LIBPATH'] + sdl_lib = sdl_lenv.Dictionary()['LIBS'] + # SOLID library information + solid_lib = [] # TODO + solid_libpath = [] # TODO + solid_include = ['#extern/solid/include'] + qhull_lib = [] # TODO + qhull_libpath = [] # TODO + qhull_include = ['#extern/qhull/include'] + # ODE library information + ode_lib = [] # TODO + ode_libpath = [] # TODO + ode_include = ['#extern/ode/dist/include/ode'] # Python variables. - python_include = sysconfig.get_python_inc () - python_libpath = sysconfig.get_python_lib (0, 1) + '/config' - python_lib = 'python%d.%d' % sys.version_info[0:2] - # International stuff - if (use_international == 'true'): - defines += ['INTERNATIONAL', 'FTGL_STATIC_LIBRARY', 'WITH_FREETYPE2'] - platform_libpath += ['#../lib/solaris-2.8-sparc/ftgl', - '#../lib/solaris-2.8-sparc/freetype/lib'] - platform_libs += ['ftgl', 'freetype'] - extra_includes += ['#../lib/solaris-2.8-sparc/ftgl/include', - '#../lib/solaris-2.8-sparc/freetype/include'] - + python_lib = ['python%d.%d' % sys.version_info[0:2]] + python_libpath = [sysconfig.get_python_lib (0, 1) + '/config'] + python_include = [sysconfig.get_python_inc ()] + # International support information + ftgl_lib = ['ftgl'] + ftgl_libpath = ['#../lib/solaris-2.8-sparc/ftgl/lib'] + ftgl_include = ['#../lib/solaris-2.8-sparc/ftgl/include'] + freetype_lib = ['freetype'] + freetype_libpath = ['#../lib/solaris-2.8-sparc/freetype/lib'] + freetype_include = ['#../lib/solaris-2.8-sparc/freetype/include'] + gettext_lib = [] + gettext_libpath = [] + gettext_include = [] + i18n_defines = ['INTERNATIONAL', 'FTGL_STATIC_LIBRARY', 'WITH_FREETYPE2'] elif string.find (sys.platform, 'irix') != -1: use_international = 'false' @@ -277,28 +395,62 @@ elif string.find (sys.platform, 'irix') != -1: debug_flags = ['-O2', '-g'] defines = [] warn_flags = ['-fullwarn', '-woff', '1001,1110,1201,1209,1355,1424,1681,3201'] - sdl_cflags = '' - sdl_include = irix_precomp + '/sdl/include/SDL' - link_env.Append (LIBS=['libSDL.a']) - link_env.Append (LIBPATH=['/usr/lib32/mips3', irix_precomp + '/sdl/lib']) - python_libpath = irix_precomp + '/python/lib/python2.2/config' - python_include = irix_precomp + '/python/include/python2.2' - python_lib = 'python2.2' - - platform_libs = ['SDL', 'movieGL', 'GLU', 'GL', 'Xmu', 'Xext', 'X11', + platform_libs = ['movieGL', 'Xmu', 'Xext', 'X11', 'c', 'm', 'dmedia', 'cl', 'audio', - 'Cio', 'png', 'jpeg', 'z', 'pthread'] - platform_libpath = [irix_precomp + '/png/lib', - irix_precomp + '/jpeg/lib', - '/usr/lib32', '/lib/freeware/lib32'] + 'Cio', 'pthread'] + platform_libpath = ['/usr/lib32', + '/lib/freeware/lib32', + '/usr/lib32/mips3'] platform_linkflags = ['-mips3', '-n32'] - extra_includes = [irix_precomp + '/jpeg/include', - irix_precomp + '/png/include', - '/usr/freeware/include', + extra_includes = ['/usr/freeware/include', '/usr/include'] - solid_include = irix_precomp + '/solid/include' - ode_include = irix_precomp + '/ode/include' - + # z library information + z_lib = ['z'] + z_libpath = [] + z_include = [] + # png library information + png_lib = ['png'] + png_libpath = [irix_precomp + '/png/lib'] + png_include = [irix_precomp + '/png/include'] + # jpeg library information + jpeg_lib = ['jpeg'] + jpeg_libpath = [irix_precomp + '/jpeg/lib'] + jpeg_include = [irix_precomp + '/jpeg/include'] + # OpenGL library information + opengl_lib = ['GL', 'GLU'] + opengl_libpath = [] + opengl_include = [] + # SDL library information + sdl_cflags = [] + sdl_include = [irix_precomp + '/sdl/include/SDL'] + sdl_libpath = [irix_precomp + '/sdl/lib'] + sdl_lib = ['SDL', 'libSDL.a'] + # SOLID library information + solid_lib = [] # TODO + solid_libpath = [] # TODO + solid_include = [irix_precomp + '/solid/include'] + qhull_lib = [] # TODO + qhull_libpath = [] # TODO + qhull_include = ['#extern/qhull/include'] + # ODE library information + ode_lib = [] # TODO + ode_libpath = [] # TODO + ode_include = [irix_precomp + '/ode/include'] + # Python library information + python_libpath = [irix_precomp + '/python/lib/python2.2/config'] + python_include = [irix_precomp + '/python/include/python2.2'] + python_lib = ['python2.2'] + # International support information + ftgl_lib = ['ftgl'] + ftgl_libpath = [irix_precomp + '/ftgl/lib'] + ftgl_include = [irix_precomp + '/ftgl/include'] + freetype_lib = ['freetype'] + freetype_libpath = [irix_precomp + '/freetype/lib'] + freetype_include = [irix_precomp + '/freetype/include'] + gettext_lib = [] + gettext_libpath = [] + gettext_include = [] + i18n_defines = ['INTERNATIONAL', 'FTGL_STATIC_LIBRARY', 'WITH_FREETYPE2'] elif string.find (sys.platform, 'hp-ux') != -1: window_system = 'X11' @@ -334,11 +486,55 @@ else: config.write ("USE_OPENAL = '%s'\n"%(use_openal)) config.write ("USE_FMOD = '%s'\n"%(use_fmod)) config.write ("USE_QUICKTIME = '%s'\n"%(use_quicktime)) + config.write ("\n# External library information.\n") + config.write ("PYTHON_INCLUDE = %s\n"%(python_include)) + config.write ("PYTHON_LIBPATH = %s\n"%(python_libpath)) + config.write ("PYTHON_LIBRARY = %s\n"%(python_lib)) + config.write ("SDL_CFLAGS = %s\n"%(sdl_cflags)) + config.write ("SDL_INCLUDE = %s\n"%(sdl_include)) + config.write ("SDL_LIBPATH = %s\n"%(sdl_libpath)) + config.write ("SDL_LIBRARY = %s\n"%(sdl_lib)) + config.write ("Z_INCLUDE = %s\n"%(z_include)) + config.write ("Z_LIBPATH = %s\n"%(z_libpath)) + config.write ("Z_LIBRARY = %s\n"%(z_lib)) + config.write ("PNG_INCLUDE = %s\n"%(png_include)) + config.write ("PNG_LIBPATH = %s\n"%(png_libpath)) + config.write ("PNG_LIBRARY = %s\n"%(png_lib)) + config.write ("JPEG_INCLUDE = %s\n"%(jpeg_include)) + config.write ("JPEG_LIBPATH = %s\n"%(jpeg_libpath)) + config.write ("JPEG_LIBRARY = %s\n"%(jpeg_lib)) + config.write ("OPENGL_INCLUDE = %s\n"%(opengl_include)) + config.write ("OPENGL_LIBPATH = %s\n"%(opengl_libpath)) + config.write ("OPENGL_LIBRARY = %s\n"%(opengl_lib)) + config.write ("\n# The following information is only necessary when you've enabled support for\n") + config.write ("# the game engine.\n") + config.write ("SOLID_INCLUDE = %s\n"%(solid_include)) + config.write ("SOLID_LIBPATH = %s\n"%(solid_libpath)) + config.write ("SOLID_LIBRARY = %s\n"%(solid_lib)) + config.write ("QHULL_INCLUDE = %s\n"%(qhull_include)) + config.write ("QHULL_LIBPATH = %s\n"%(qhull_libpath)) + config.write ("QHULL_LIBRARY = %s\n"%(qhull_lib)) + config.write ("ODE_INCLUDE = %s\n"%(ode_include)) + config.write ("ODE_LIBPATH = %s\n"%(ode_libpath)) + config.write ("ODE_LIBRARY = %s\n"%(ode_lib)) + config.write ("\n# The following information is only necessary when building with\n") + config.write ("# internationalization support.\n"); + config.write ("I18N_DEFINES = %s\n"%(i18n_defines)) + config.write ("FTGL_INCLUDE = %s\n"%(ftgl_include)) + config.write ("FTGL_LIBPATH = %s\n"%(ftgl_libpath)) + config.write ("FTGL_LIBRARY = %s\n"%(ftgl_lib)) + config.write ("FREETYPE_INCLUDE = %s\n"%(freetype_include)) + config.write ("FREETYPE_LIBPATH = %s\n"%(freetype_libpath)) + config.write ("FREETYPE_LIBRARY = %s\n"%(freetype_lib)) + config.write ("GETTEXT_INCLUDE = %s\n"%(gettext_include)) + config.write ("GETTEXT_LIBPATH = %s\n"%(gettext_libpath)) + config.write ("GETTEXT_LIBRARY = %s\n"%(gettext_lib)) config.close () #----------------------------------------------------------------------------- # Read the options from the config file and update the various necessary flags #----------------------------------------------------------------------------- +list_opts = [] user_options_env = Environment () user_options = Options (config_file) user_options.AddOptions ( @@ -366,6 +562,44 @@ user_options.AddOptions ( (EnumOption ('BUILD_BINARY', 'release', 'Select a release or debug binary.', allowed_values = ('release', 'debug'))), + ('PYTHON_INCLUDE', 'Include directory for Python header files.'), + ('PYTHON_LIBPATH', 'Library path where the Python lib is located.'), + ('PYTHON_LIBRARY', 'Python library name.'), + ('SDL_CFLAGS', 'Necessary CFLAGS when using sdl functionality.'), + ('SDL_INCLUDE', 'Include directory for SDL header files.'), + ('SDL_LIBPATH', 'Library path where the SDL library is located.'), + ('SDL_LIBRARY', 'SDL library name.'), + ('Z_INCLUDE', 'Include directory for zlib header files.'), + ('Z_LIBPATH', 'Library path where the zlib library is located.'), + ('Z_LIBRARY', 'Z library name.'), + ('PNG_INCLUDE', 'Include directory for png header files.'), + ('PNG_LIBPATH', 'Library path where the png library is located.'), + ('PNG_LIBRARY', 'png library name.'), + ('JPEG_INCLUDE', 'Include directory for jpeg header files.'), + ('JPEG_LIBPATH', 'Library path where the jpeg library is located.'), + ('JPEG_LIBRARY', 'jpeg 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.'), + ('SOLID_INCLUDE', 'Include directory for SOLID header files.'), + ('SOLID_LIBPATH', 'Library path where the SOLID library is located.'), + ('SOLID_LIBRARY', 'SOLID library name.'), + ('QHULL_INCLUDE', 'Include directory for QHULL header files.'), + ('QHULL_LIBPATH', 'Library path where the QHULL library is located.'), + ('QHULL_LIBRARY', 'QHULL library name.'), + ('ODE_INCLUDE', 'Include directory for ODE header files.'), + ('ODE_LIBPATH', 'Library path where the ODE library is located.'), + ('ODE_LIBRARY', 'ODE library name.'), + ('I18N_DEFINES', 'Preprocessor defines needed for internationalization support.'), + ('FTGL_INCLUDE', 'Include directory for ftgl header files.'), + ('FTGL_LIBPATH', 'Library path where the ftgl library is located.'), + ('FTGL_LIBRARY', 'ftgl library name.'), + ('FREETYPE_INCLUDE', 'Include directory for freetype2 header files.'), + ('FREETYPE_LIBPATH', 'Library path where the freetype2 library is located.'), + ('FREETYPE_LIBRARY', 'Freetype2 library name.'), + ('GETTEXT_INCLUDE', 'Include directory for gettext header files.'), + ('GETTEXT_LIBPATH', 'Library path where the gettext library is located.'), + ('GETTEXT_LIBRARY', 'gettext library name.') ) user_options.Update (user_options_env) user_options_dict = user_options_env.Dictionary() @@ -391,26 +625,21 @@ else: #defines += ['_DEBUG'] specifying this makes msvc want to link to python22_d.lib?? platform_linkflags += ['/DEBUG','/PDB:blender.pdb'] +if user_options_dict['USE_INTERNATIONAL']: + defines += user_options_dict['I18N_DEFINES'] #----------------------------------------------------------------------------- # Settings to be exported to other SConscript files #----------------------------------------------------------------------------- -#cflags = extra_flags + release_flags + warn_flags -Export ('python_include') Export ('cflags') Export ('defines') Export ('cxxflags') Export ('window_system') -Export ('sdl_cflags') -Export ('sdl_include') -Export ('solid_include') -Export ('ode_include') Export ('extra_includes') Export ('platform_libs') Export ('platform_libpath') Export ('platform_linkflags') -Export ('root_build_dir') Export ('user_options_dict') BuildDir (root_build_dir+'/intern', 'intern', duplicate=0) @@ -457,11 +686,15 @@ link_env.Append (LIBS=libraries) link_env.Append (LIBPATH=libpath) link_env.Append (CPPDEFINES=defines) -if use_international == 'true': +if user_options_dict['USE_INTERNATIONAL'] == 1: link_env.Append (LIBS=['blender_FTF']) -if use_quicktime == 'true': + link_env.Append (LIBS=user_options_dict['FTGL_LIBRARY']) + link_env.Append (LIBPATH=user_options_dict['FTGL_LIBPATH']) + link_env.Append (LIBS=user_options_dict['FREETYPE_LIBRARY']) + link_env.Append (LIBPATH=user_options_dict['FREETYPE_LIBPATH']) +if user_options_dict['USE_QUICKTIME'] == 1: link_env.Append (LIBS=['blender_quicktime']) -if use_gameengine == 'true': +if user_options_dict['BUILD_GAMEENGINE'] == 1: link_env.Append (LIBS=['blender_expressions', 'KX_blenderhook', 'KX_converter', @@ -475,19 +708,37 @@ if use_gameengine == 'true': 'RAS_rasterizer', 'RAS_OpenGLRasterizer', 'SG_SceneGraph']) - if use_sumo == 'true': + if user_options_dict['USE_PHYSICS'] == 'solid': link_env.Append (LIBS=['PHY_Sumo']) - if use_ode == 'true': + link_env.Append (LIBS=user_options_dict['SOLID_LIBRARY']) + link_env.Append (LIBPATH=user_options_dict['SOLID_LIBPATH']) + link_env.Append (LIBS=user_options_dict['QHULL_LIBRARY']) + link_env.Append (LIBPATH=user_options_dict['QHULL_LIBPATH']) + else: link_env.Append (LIBS=['PHY_Ode']) - -link_env.Append (LIBS=python_lib) -link_env.Append (LIBPATH=python_libpath) + link_env.Append (LIBS=user_options_dict['ODE_LIBRARY']) + link_env.Append (LIBPATH=user_options_dict['ODE_LIBPATH']) + +link_env.Append (LIBS=user_options_dict['PYTHON_LIBRARY']) +link_env.Append (LIBPATH=user_options_dict['PYTHON_LIBPATH']) +link_env.Append (LIBS=user_options_dict['SDL_LIBRARY']) +link_env.Append (LIBPATH=user_options_dict['SDL_LIBPATH']) +link_env.Append (LIBS=user_options_dict['PNG_LIBRARY']) +link_env.Append (LIBPATH=user_options_dict['PNG_LIBPATH']) +link_env.Append (LIBS=user_options_dict['JPEG_LIBRARY']) +link_env.Append (LIBPATH=user_options_dict['JPEG_LIBPATH']) +link_env.Append (LIBS=user_options_dict['OPENGL_LIBRARY']) +link_env.Append (LIBPATH=user_options_dict['OPENGL_LIBPATH']) +link_env.Append (LIBS=user_options_dict['GETTEXT_LIBRARY']) +link_env.Append (LIBPATH=user_options_dict['GETTEXT_LIBPATH']) +link_env.Append (LIBS=user_options_dict['Z_LIBRARY']) +link_env.Append (LIBPATH=user_options_dict['Z_LIBPATH']) link_env.Append (LIBS=platform_libs) link_env.Append (LIBPATH=platform_libpath) if sys.platform == 'darwin': link_env.Append (LINKFLAGS=' -framework Carbon') link_env.Append (LINKFLAGS=' -framework AGL') - if use_quicktime == 'true': + if user_options_dict['USE_QUICKTIME'] == 1: link_env.Append (LINKFLAGS=' -framework QuickTime') else: link_env.Append (LINKFLAGS=platform_linkflags) diff --git a/source/blender/blenlib/SConscript b/source/blender/blenlib/SConscript index d3172a3515f..9b091fc7c7f 100644 --- a/source/blender/blenlib/SConscript +++ b/source/blender/blenlib/SConscript @@ -39,4 +39,5 @@ blenlib_env.Append (CPPPATH = ['.', '../include']) blenlib_env.Append (CPPPATH = extra_includes) +blenlib_env.Prepend (CPPPATH = user_options_dict['FREETYPE_INCLUDE']) blenlib_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/blender_blenlib', source=source_files) diff --git a/source/blender/ftfont/SConscript b/source/blender/ftfont/SConscript index f44b765ec76..abd5933e815 100644 --- a/source/blender/ftfont/SConscript +++ b/source/blender/ftfont/SConscript @@ -16,6 +16,7 @@ include_paths = ['.', ftf_env = Environment() ftf_env.Append(CPPPATH = extra_includes) ftf_env.Append(CPPPATH = include_paths) +ftf_env.Prepend (CPPPATH = user_options_dict['FREETYPE_INCLUDE']) ftf_env.Append(CCFLAGS = cflags) ftf_env.Append(CXXFLAGS = cxxflags) ftf_env.Append(CPPDEFINES = defines) diff --git a/source/blender/python/SConscript b/source/blender/python/SConscript index 66b359bc61e..5f1cbbb8767 100644 --- a/source/blender/python/SConscript +++ b/source/blender/python/SConscript @@ -4,7 +4,6 @@ python_env = Environment () Import ('cflags') Import ('cxxflags') Import ('defines') -Import ('python_include') Import ('extra_includes') Import ('user_options_dict') python_env.Append (CCFLAGS = cflags) @@ -57,8 +56,8 @@ python_env.Append (CPPPATH = ['api2_2x', '#/intern/guardedalloc', '#/intern/bmfont', '../imbuf', - '../include', - python_include]) + '../include']) +python_env.Append (CPPPATH = user_options_dict['PYTHON_INCLUDE']) python_env.Append (CPPPATH = extra_includes) python_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/blender_python', source=source_files) diff --git a/source/blender/src/SConscript b/source/blender/src/SConscript index c718ad1c90f..68ed7ef0077 100644 --- a/source/blender/src/SConscript +++ b/source/blender/src/SConscript @@ -4,13 +4,10 @@ src_env = Environment() Import ('cflags') Import ('cxxflags') Import ('defines') -Import ('python_include') -Import ('sdl_cflags') -Import ('sdl_include') Import ('extra_includes') Import ('user_options_dict') src_env.Append (CCFLAGS = cflags) -src_env.Append (CCFLAGS = sdl_cflags) +src_env.Append (CCFLAGS = user_options_dict['SDL_CFLAGS']) src_env.Append (CXXFLAGS = cxxflags) src_env.Append (CPPDEFINES = defines) @@ -136,9 +133,10 @@ src_env.Append (CPPPATH = ['#/intern/guardedalloc', '../readstreamglue', '../img', '../quicktime', - '#/intern/ghost', - python_include, - sdl_include]) + '#/intern/ghost']) + +src_env.Append (CPPPATH = user_options_dict['PYTHON_INCLUDE']) +src_env.Append (CPPPATH = user_options_dict['SDL_INCLUDE']) if user_options_dict['USE_INTERNATIONAL'] == 1: src_env.Append (CPPPATH=['../ftfont']) diff --git a/source/gameengine/BlenderRoutines/SConscript b/source/gameengine/BlenderRoutines/SConscript index 0e39cf02107..bd6e42d1622 100755 --- a/source/gameengine/BlenderRoutines/SConscript +++ b/source/gameengine/BlenderRoutines/SConscript @@ -4,8 +4,6 @@ kx_blenderhook_env = Environment() Import ('cflags') Import ('cxxflags') Import ('defines') -Import ('python_include') -Import ('solid_include') Import ('user_options_dict') kx_blenderhook_env.Append (CCFLAGS = cflags) kx_blenderhook_env.Append (CXXFLAGS = cxxflags) @@ -26,7 +24,6 @@ kx_blenderhook_env.Append (CPPPATH=['.', '#intern/string', '#intern/guardedalloc', '#source/gameengine/Rasterizer/RAS_OpenGLRasterizer', - python_include, '#intern/bmfont', '#source/gameengine/Converter', '#source/blender/imbuf', @@ -47,8 +44,10 @@ kx_blenderhook_env.Append (CPPPATH=['.', '#source/gameengine/Network/LoopBackNetwork', '#intern/SoundSystem', '#source/blender/misc', - '#source/blender/blenloader', - solid_include, + '#source/blender/blenloader' ]) +kx_blenderhook_env.Append (CPPPATH = user_options_dict['PYTHON_INCLUDE']) +kx_blenderhook_env.Append (CPPPATH = user_options_dict['SOLID_INCLUDE']) + kx_blenderhook_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/KX_blenderhook', source=source_files) diff --git a/source/gameengine/Converter/SConscript b/source/gameengine/Converter/SConscript index 795274ca345..81968e1f864 100755 --- a/source/gameengine/Converter/SConscript +++ b/source/gameengine/Converter/SConscript @@ -4,8 +4,6 @@ kx_converter_env = Environment() Import ('cflags') Import ('cxxflags') Import ('defines') -Import ('solid_include') -Import ('python_include') Import ('user_options_dict') kx_converter_env.Append (CCFLAGS = cflags) kx_converter_env.Append (CXXFLAGS = cxxflags) @@ -33,7 +31,6 @@ kx_converter_env.Append (CPPPATH = ['.', '#intern/string', '#intern/guardedalloc', '#source/gameengine/Rasterizer/RAS_OpenGLRasterizer', - python_include, '#intern/bmfont', '#intern/SoundSystem', '#intern/SoundSystem/include', @@ -63,8 +60,10 @@ kx_converter_env.Append (CPPPATH = ['.', '#source/gameengine/Physics/Sumo/Fuzzics/include', '#source/gameengine/Network/LoopBackNetwork', '#source/blender/misc', - '#source/blender/blenloader', - solid_include + '#source/blender/blenloader' ]) +kx_converter_env.Append (CPPPATH = user_options_dict['PYTHON_INCLUDE']) +kx_converter_env.Append (CPPPATH = user_options_dict['SOLID_INCLUDE']) + kx_converter_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/KX_converter', source=source_files) diff --git a/source/gameengine/Expressions/SConscript b/source/gameengine/Expressions/SConscript index 5a5205bd3bc..4ee0e322cc5 100755 --- a/source/gameengine/Expressions/SConscript +++ b/source/gameengine/Expressions/SConscript @@ -4,7 +4,6 @@ expressions_env = Environment() Import ('cflags') Import ('cxxflags') Import ('defines') -Import ('python_include') Import ('user_options_dict') expressions_env.Append (CCFLAGS = cflags) expressions_env.Append (CXXFLAGS = cxxflags) @@ -32,7 +31,8 @@ source_files = ['BoolValue.cpp', expressions_env.Append (CPPPATH = ['.', '#source/kernel/gen_system', - '#intern/string', - python_include]) + '#intern/string']) + +expressions_env.Append (CPPPATH = user_options_dict['PYTHON_INCLUDE']) expressions_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/blender_expressions', source=source_files) diff --git a/source/gameengine/GameLogic/SConscript b/source/gameengine/GameLogic/SConscript index 33de774b314..5659b510552 100755 --- a/source/gameengine/GameLogic/SConscript +++ b/source/gameengine/GameLogic/SConscript @@ -4,7 +4,6 @@ sca_gamelogic_env = Environment() Import ('cflags') Import ('cxxflags') Import ('defines') -Import ('python_include') Import ('user_options_dict') sca_gamelogic_env.Append (CCFLAGS = cflags) sca_gamelogic_env.Append (CXXFLAGS = cxxflags) @@ -42,8 +41,8 @@ sca_gamelogic_env.Append (CPPPATH=['.', '#/source/kernel/gen_system', '#/intern/string', '#/source/gameengine/Expressions', - '#/intern/moto/include', - python_include, - ]) + '#/intern/moto/include']) + +sca_gamelogic_env.Append (CPPPATH = user_options_dict['PYTHON_INCLUDE']) sca_gamelogic_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/SCA_GameLogic', source=source_files) diff --git a/source/gameengine/Ketsji/KXNetwork/SConscript b/source/gameengine/Ketsji/KXNetwork/SConscript index 43dc4998c36..2f4be26cdf5 100755 --- a/source/gameengine/Ketsji/KXNetwork/SConscript +++ b/source/gameengine/Ketsji/KXNetwork/SConscript @@ -4,7 +4,6 @@ kx_network_env = Environment() Import ('cflags') Import ('cxxflags') Import ('defines') -Import ('python_include') Import ('user_options_dict') kx_network_env.Append (CCFLAGS = cflags) kx_network_env.Append (CXXFLAGS = cxxflags) @@ -20,11 +19,12 @@ source_files = ['KX_NetworkEventManager.cpp', kx_network_env.Append (CPPPATH = ['.', '#source/kernel/gen_system', '#intern/string', - python_include, '#source/gameengine/Ketsji', '#source/gameengine/GameLogic', '#source/gameengine/Expressions', '#source/gameengine/Network', ]) +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) diff --git a/source/gameengine/Ketsji/SConscript b/source/gameengine/Ketsji/SConscript index f035f5f4b9e..489d112ba5e 100644 --- a/source/gameengine/Ketsji/SConscript +++ b/source/gameengine/Ketsji/SConscript @@ -4,8 +4,6 @@ ketsji_env = Environment() Import ('cflags') Import ('cxxflags') Import ('defines') -Import ('python_include') -Import ('solid_include') Import ('user_options_dict') ketsji_env.Append (CCFLAGS = cflags) ketsji_env.Append (CXXFLAGS = cxxflags) @@ -63,7 +61,7 @@ source_files = ['KX_WorldIpoController.cpp', if user_options_dict['USE_PHYSICS'] == 'solid': source_files += ['KX_SumoPhysicsController.cpp'] - ketsji_env.Append (CPPPATH = [solid_include]) + ketsji_env.Append (CPPPATH = user_options_dict['SOLID_INCLUDE']) if user_options_dict['USE_PHYSICS'] == 'ode': source_files += ['KX_OdePhysicsController.cpp'] @@ -103,8 +101,9 @@ ketsji_env.Append (CPPPATH = ['.', '#source/gameengine/Physics/Sumo/Fuzzics/include', '#source/gameengine/Network/LoopBackNetwork', '#source/blender/misc', - '#source/blender/blenloader', - python_include + '#source/blender/blenloader' ]) +ketsji_env.Append (CPPPATH = user_options_dict['PYTHON_INCLUDE']) + ketsji_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/KX_ketsji', source=source_files) |