3c3ac61a3cb9a06d71df6d136c5e3b2fcedd73d2
[blender-staging.git] / source / blender / blenkernel / SConscript
1 #!/usr/bin/env python
2 #
3 # ***** BEGIN GPL LICENSE BLOCK *****
4 #
5 # This program is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU General Public License
7 # as published by the Free Software Foundation; either version 2
8 # of the License, or (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software Foundation,
17 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 #
19 # The Original Code is Copyright (C) 2006, Blender Foundation
20 # All rights reserved.
21 #
22 # The Original Code is: all of this file.
23 #
24 # Contributor(s): Nathan Letwory.
25 #
26 # ***** END GPL LICENSE BLOCK *****
27
28 Import ('env')
29 import os
30
31 sources = env.Glob('intern/*.c')
32 sources.remove('intern' + os.sep + 'mask_rasterize.c')
33 sources.remove('intern' + os.sep + 'mask_evaluate.c')
34 sources.remove('intern' + os.sep + 'mask.c')
35
36 sources_mask = env.Glob('intern/mask*.c')
37
38 incs = [
39     '.',
40     '#/extern/libmv',
41     '#/intern/ffmpeg',
42     '#/intern/guardedalloc',
43     '#/intern/memutil',
44     '#/intern/mikktspace',
45     '#/intern/raskter',
46     '#/intern/rigidbody',
47     '#/extern/bullet2/src',
48     '#/extern/glew/include',
49     '#/intern/audaspace/intern',
50     '#/intern/bsp/extern',
51     '#/intern/elbeem/extern',
52     '#/intern/iksolver/extern',
53     '#/intern/opennl/extern',
54     '#/intern/smoke/extern',
55     '#/intern/atomic',
56     '../avi',
57     '../blenfont',
58     '../blenlib',
59     '../blenloader',
60     '../bmesh',
61     '../gpu',
62     '../ikplugin',
63     '../imbuf',
64     '../makesdna',
65     '../makesrna',
66     '../modifiers',
67     '../nodes',
68     '../render/extern/include',
69     '../windowmanager',
70     env['BF_OPENGL_INC'],
71     env['BF_ZLIB_INC'],
72     ]
73 incs = ' '.join(incs)
74
75 defs = [
76     'GLEW_STATIC',
77     ]
78
79 if env['WITH_BF_SMOKE']:
80     defs.append('WITH_SMOKE')
81
82 if env['WITH_BF_FRAMESERVER']:
83     defs.append('WITH_FRAMESERVER')
84
85 if env['WITH_BF_PYTHON']:
86     incs += ' ../python'
87     defs.append('WITH_PYTHON')
88     if env['BF_DEBUG']:
89         defs.append('DEBUG')
90
91 '''
92 if env['WITH_BF_ELTOPO']:
93     incs += ' #/extern/eltopo'
94     incs += ' #/extern/eltopo/eltopo3d'
95     defs.append('WITH_ELTOPO')
96 '''
97 if env['WITH_BF_QUICKTIME']:
98     incs += ' ../quicktime'
99
100 if env['WITH_BF_SDL']:
101     incs += ' ' + env['BF_SDL_INC']
102     defs.append('WITH_SDL')
103
104 if env['WITH_BF_OPENEXR']:
105     defs.append('WITH_OPENEXR')
106
107 if env['WITH_BF_TIFF']:
108     defs.append('WITH_TIFF')
109
110 if env['WITH_BF_OPENJPEG']:
111     defs.append('WITH_OPENJPEG')
112
113 if env['WITH_BF_DDS']:
114     defs.append('WITH_DDS')
115
116 if env['WITH_BF_CINEON']:
117     defs.append('WITH_CINEON')
118
119 if env['WITH_BF_HDR']:
120     defs.append('WITH_HDR')
121
122 if env['WITH_BF_JACK']:
123     defs.append('WITH_JACK')
124
125 if env['WITH_BF_FFMPEG']:
126     defs.append('WITH_FFMPEG')
127     incs += ' ' + env['BF_FFMPEG_INC']
128
129 if env['WITH_BF_QUICKTIME']:
130     defs.append('WITH_QUICKTIME')
131     incs += ' ' + env['BF_QUICKTIME_INC']
132
133 if env['WITH_BF_BULLET']:
134     defs.append('WITH_BULLET')
135
136 if env['WITH_BF_FLUID']:
137     defs.append('WITH_MOD_FLUID')
138
139 if env['WITH_BF_OCEANSIM']:
140     defs.append('WITH_OCEANSIM')
141
142 if env['WITH_BF_LZO']:
143     incs += ' #/extern/lzo/minilzo'
144     defs.append('WITH_LZO')
145
146 if env['WITH_BF_LZMA']:
147     incs += ' #/extern/lzma'
148     defs.append('WITH_LZMA')
149
150 if env['WITH_BF_GAMEENGINE']:
151     incs += ' #/extern/recastnavigation'
152     defs.append('WITH_GAMEENGINE')
153 else:
154     sources.remove('intern' + os.sep + 'navmesh_conversion.c')
155
156 if env['WITH_BF_LIBMV']:
157     defs.append('WITH_LIBMV')
158
159 if env['WITH_BF_FFTW3']:
160     defs.append('FFTW3=1')
161     incs += ' ' + env['BF_FFTW3_INC'] 
162
163 if env['WITH_BF_INTERNATIONAL']:
164     defs.append('WITH_INTERNATIONAL')
165
166 if env['WITH_BF_FREESTYLE']:
167     defs.append('WITH_FREESTYLE')
168
169 if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'):
170     incs += ' ' + env['BF_PTHREADS_INC']
171
172
173 if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
174     env.BlenderLib ( libname = 'bf_blenkernel', sources = sources, includes = Split(incs), defines = defs, libtype=['core','player'], priority = [166,25]) #, cc_compileflags = env['CCFLAGS'].append('/WX') )
175 else:
176     env.BlenderLib ( libname = 'bf_blenkernel', sources = sources, includes = Split(incs), defines = defs, libtype=['core','player', 'player2'], priority = [166,25,0] )
177
178 env.BlenderLib ( libname = 'bf_blenkernel_mask', sources = sources_mask, includes = Split(incs), defines = defs, libtype=['core','player', 'player2'], priority = [200,25,0] )