I should have talked to joeedh before committing last time...

This is an another attempt to fix the mingw long commandline
issue on all versions of windows (I didn't realize that the
2k in Win2k refered to the length of the commandline).

In this version, I break libsrc.a up so that no archive has
more than 30 object files (adjustable with one line of
code). I also fudge the priority numbers to ensure correct
linking. This was done in a "guess the number" way until
it worked, so please test and please check for correctness.
This commit is contained in:
Chris Want 2006-11-28 21:12:31 +00:00
parent b1f466e804
commit 6a53c0ae6a
4 changed files with 25 additions and 7 deletions

@ -7,4 +7,8 @@ incs = '. intern extern ../moto/include ../container ../memutil'
incs += ' ../../source/blender/makesdna ../../intern/guardedalloc'
incs += ' ../../source/blender/blenlib'
env.BlenderLib ('blender_bop', sources, Split(incs) , [], libtype='common', priority = 5 )
if (env['OURPLATFORM'] == 'win32-mingw'):
env.BlenderLib ('blender_bop', sources, Split(incs) , [], libtype=['common','intern'], priority = [5,50] )
else:
env.BlenderLib ('blender_bop', sources, Split(incs) , [], libtype='common', priority = 5 )

@ -5,4 +5,8 @@ sources = env.Glob('intern/*.cpp')
incs = 'intern ../container ../moto/include ../memutil'
env.BlenderLib ('blender_BSP', sources, Split(incs), [], libtype='core', priority=15 )
if (env['OURPLATFORM'] == 'win32-mingw'):
env.BlenderLib ('blender_BSP', sources, Split(incs), [], libtype=['common','intern'], priority=[26,26] )
else:
env.BlenderLib ('blender_BSP', sources, Split(incs), [], libtype='core', priority=15 )

@ -5,5 +5,8 @@ sources = env.Glob('intern/*.c') + env.Glob('superlu/*.c')
incs = 'extern superlu'
env.BlenderLib ('blender_ONL', sources, Split(incs), [], libtype='core', priority=55 )
if (env['OURPLATFORM'] == 'win32-mingw'):
env.BlenderLib ('blender_ONL', sources, Split(incs), [], libtype=['core','intern'], priority=[1,80] )
else:
env.BlenderLib ('blender_ONL', sources, Split(incs), [], libtype='core', priority=55 )

@ -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] )