Fix for invert comp node, was allocating a compbuf unnecessarily.
[blender.git] / source / blender / src / SConscript
1 #!/usr/bin/python
2 Import ('env')
3
4 # TODO: src_env.Append (CCFLAGS = user_options_dict['SDL_CFLAGS'])
5
6 sources = env.Glob('*.c')
7 numobj = len(sources)
8 maxobj = 30
9
10 numlibs = numobj / maxobj
11 if (numobj % maxobj):
12     numlibs = numlibs + 1
13 subsources = []
14
15 if (env['OURPLATFORM'] == 'win32-mingw'):
16     for i in range(numlibs - 1):
17         subsources.append(sources[i*maxobj:(i+1)*maxobj])
18     subsources.append(sources[(numlibs-1)*maxobj:])
19
20 incs = ' #/intern/guardedalloc #/intern/memutil'
21 incs += ' ../blenlib ../makesdna ../blenkernel'
22 incs += ' ../include #/intern/bmfont ../imbuf ../render/extern/include'
23 incs += ' #/intern/bsp/extern ../radiosity/extern/include'
24 incs += ' #/intern/decimation/extern ../blenloader ../python'
25 incs += ' ../../kernel/gen_system #/intern/SoundSystem ../readstreamglue ../nodes'
26 incs += ' ../quicktime #/intern/elbeem/extern'
27 incs += ' #/intern/ghost #/intern/opennl/extern'
28
29
30 incs += ' ' + env['BF_PYTHON_INC']
31 incs += ' ' + env['BF_SDL_INC']
32 incs += ' ' + env['BF_OPENGL_INC']
33
34 defs = []
35
36 if env['BF_TWEAK_MODE'] == 1:
37     defs.append('TWEAK_MODE')
38
39 if env['WITH_BF_YAFRAY'] == 0:
40     defs.append('DISABLE_YAFRAY')
41
42 if env['WITH_BF_INTERNATIONAL'] == 1:
43     incs += ' ../ftfont'
44     defs.append('INTERNATIONAL')
45     defs.append('FTGL_STATIC_LIBRARY')
46
47 if env['WITH_BF_OPENEXR'] == 1:
48     defs.append('WITH_OPENEXR')
49
50 if env['WITH_BF_QUICKTIME']==1:
51     incs += ' ' + env['BF_QUICKTIME_INC']
52     defs.append('WITH_QUICKTIME')
53
54 if env['WITH_BF_ICONV'] == 1:
55     incs += ' ' + env['BF_ICONV_INC']
56     defs.append('WITH_ICONV')
57
58 if env['WITH_BF_FFMPEG'] == 1:
59     defs.append('WITH_FFMPEG')
60     incs += ' ' + env['BF_FFMPEG_INC']
61
62 if env['WITH_BF_VERSE']:
63     defs.append('WITH_VERSE')
64     incs += ' ' + env['BF_VERSE_INCLUDE']
65
66 # TODO buildinfo
67 if env['BF_BUILDINFO'] == 1:
68     defs.append('NAN_BUILDINFO')
69
70 if (env['OURPLATFORM'] == 'win32-mingw'):
71     for i in range(numlibs):
72         env.BlenderLib ( libname = 'src%d' % (i), sources = subsources[i], includes = Split(incs), defines = defs, libtype=['core', 'intern'], priority = [5, 25] )
73 else:
74     env.BlenderLib ( libname = 'src', sources = sources, includes = Split(incs), defines = defs, libtype=['core', 'intern'], priority = [5, 25] )