diff options
author | Joshua Leung <aligorith@gmail.com> | 2007-11-29 09:31:36 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2007-11-29 09:31:36 +0300 |
commit | 4b37ee227e871fecb50e5df7caea068fb2951609 (patch) | |
tree | f08159462042b1839594ae373acc1c40039b4796 /source/blender/src/SConscript | |
parent | 2a4f31e2a5049c211a489da53a58969000356572 (diff) |
Scons Compiling Hack:
Restoring the "evil src splitting hack" for scons+mingw systems. By default, it is not used, but if your system is choking when trying to link src, then add BF_SPLIT_SRC=1 to your user-config.py to use this hack.
Diffstat (limited to 'source/blender/src/SConscript')
-rw-r--r-- | source/blender/src/SConscript | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/source/blender/src/SConscript b/source/blender/src/SConscript index ba3e03ea1eb..f466798c40c 100644 --- a/source/blender/src/SConscript +++ b/source/blender/src/SConscript @@ -5,6 +5,20 @@ Import ('env') sources = env.Glob('*.c') +if env['BF_SPLIT_SRC'] == 1: + numobj = len(sources) + maxobj = 30 + + numlibs = numobj / maxobj + if (numobj % maxobj): + numlibs = numlibs + 1 + subsources = [] + + if (env['OURPLATFORM'] == 'win32-mingw'): + for i in range(numlibs - 1): + subsources.append(sources[i*maxobj:(i+1)*maxobj]) + subsources.append(sources[(numlibs-1)*maxobj:]) + incs = ' #/intern/guardedalloc #/intern/memutil' incs += ' ../blenlib ../makesdna ../blenkernel' incs += ' ../include #/intern/bmfont ../imbuf ../render/extern/include' @@ -60,5 +74,9 @@ if env['WITH_BF_VERSE']: # TODO buildinfo if env['BF_BUILDINFO'] == 1: defs.append('NAN_BUILDINFO') - -env.BlenderLib ( libname = 'src', sources = sources, includes = Split(incs), defines = defs, libtype=['core', 'intern'], priority = [5, 25] ) + +if (env['BF_SPLIT_SRC'] == 1) and (env['OURPLATFORM'] == 'win32-mingw'): + for i in range(numlibs): + env.BlenderLib ( libname = 'src%d' % (i), sources = subsources[i], includes = Split(incs), defines = defs, libtype=['core', 'intern'], priority = [5, 25] ) +else: + env.BlenderLib ( libname = 'src', sources = sources, includes = Split(incs), defines = defs, libtype=['core', 'intern'], priority = [5, 25] ) |