Files
test2/source/blender/src/SConscript

71 lines
2.1 KiB
Python
Raw Normal View History

#!/usr/bin/python
Import ('env')
# TODO: src_env.Append (CCFLAGS = user_options_dict['SDL_CFLAGS'])
2004-01-04 21:11:59 +00:00
sources = env.Glob('*.c')
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:])
2004-01-04 21:11:59 +00:00
incs = ' #/intern/guardedalloc #/intern/memutil'
incs += ' ../blenlib ../makesdna ../blenkernel'
incs += ' ../include #/intern/bmfont ../imbuf ../render/extern/include'
incs += ' #/intern/bsp/extern ../radiosity/extern/include'
incs += ' #/intern/decimation/extern ../blenloader ../python'
incs += ' ../../kernel/gen_system #/intern/SoundSystem ../readstreamglue'
incs += ' ../quicktime #/intern/elbeem/extern'
incs += ' #/intern/ghost #/intern/opennl/extern'
incs += ' ' + env['BF_PYTHON_INC']
incs += ' ' + env['BF_SDL_INC']
incs += ' ' + env['BF_OPENGL_INC']
2004-01-04 21:11:59 +00:00
defs = []
2004-01-04 21:11:59 +00:00
if env['WITH_BF_YAFRAY'] == 0:
defs.append('DISABLE_YAFRAY')
if env['WITH_BF_INTERNATIONAL'] == 1:
incs += ' ../ftfont'
defs.append('INTERNATIONAL')
defs.append('FTGL_STATIC_LIBRARY')
if env['WITH_BF_OPENEXR'] == 1:
defs.append('WITH_OPENEXR')
2004-01-04 21:11:59 +00:00
if env['WITH_BF_QUICKTIME']==1:
incs += ' ' + env['BF_QUICKTIME_INC']
defs.append('WITH_QUICKTIME')
if env['WITH_BF_ICONV'] == 1:
incs += ' ' + env['BF_ICONV_INC']
defs.append('WITH_ICONV')
if env['WITH_BF_FFMPEG'] == 1:
defs.append('WITH_FFMPEG')
incs += ' ' + env['BF_FFMPEG_INC']
if env['WITH_BF_VERSE']:
defs.append('WITH_VERSE')
incs += ' ' + env['BF_VERSE_INCLUDE']
# TODO buildinfo
if env['BF_BUILDINFO'] == 1:
defs.append('NAN_BUILDINFO')
if (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] )