diff options
Diffstat (limited to 'source/blender/src/SConscript')
-rw-r--r-- | source/blender/src/SConscript | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/source/blender/src/SConscript b/source/blender/src/SConscript index d0a07f9b3d8..58aa3ddad88 100644 --- a/source/blender/src/SConscript +++ b/source/blender/src/SConscript @@ -5,10 +5,17 @@ Import ('env') sources = env.Glob('*.c') numobj = len(sources) +maxobj = 30 + +numlibs = numobj / maxobj +if (numobj % maxobj): + numlibs = numlibs + 1 +subsources = [] if (env['OURPLATFORM'] == 'win32-mingw'): - sources1 = sources[:(numobj/2)] - sources2 = sources[(numobj/2):] + 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' @@ -57,7 +64,7 @@ if env['BF_BUILDINFO'] == 1: defs.append('NAN_BUILDINFO') if (env['OURPLATFORM'] == 'win32-mingw'): - env.BlenderLib ( libname = 'src1', sources = sources1, includes = Split(incs), defines = defs, libtype=['core', 'intern'], priority = [5, 25] ) - env.BlenderLib ( libname = 'src2', sources = sources2, includes = Split(incs), defines = defs, libtype=['core', 'intern'], priority = [5, 25] ) + 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] ) |