svn merge -r38814:38905 https://svn.blender.org/svnroot/bf-blender/trunk/blender .
[blender-staging.git] / build_files / scons / config / linux2-config.py
1 LCGDIR = '../lib/linux2'
2 LIBDIR = "${LCGDIR}"
3
4 BF_PYTHON_ABI_FLAGS = 'm'  # Most common for linux distros
5 BF_PYTHON = '/usr'
6 BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
7 BF_PYTHON_VERSION = '3.2'
8 WITH_BF_STATICPYTHON = False
9 BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}${BF_PYTHON_ABI_FLAGS}'
10 BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
11 BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}${BF_PYTHON_ABI_FLAGS}'  # BF_PYTHON+'/lib/python'+BF_PYTHON_VERSION+'/config/libpython'+BF_PYTHON_VERSION+'.a'
12 BF_PYTHON_LINKFLAGS = ['-Xlinker', '-export-dynamic']
13 BF_PYTHON_LIB_STATIC = '${BF_PYTHON}/lib/libpython${BF_PYTHON_VERSION}${BF_PYTHON_ABI_FLAGS}.a'
14
15 WITH_BF_OPENAL = True
16 WITH_BF_STATICOPENAL = False
17 BF_OPENAL = '/usr'
18 BF_OPENAL_INC = '${BF_OPENAL}/include'
19 BF_OPENAL_LIB = 'openal'
20 BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a'
21
22 BF_CXX = '/usr'
23 WITH_BF_STATICCXX = False
24 BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
25
26 BF_LIBSAMPLERATE = '/usr'
27 WITH_BF_STATICLIBSAMPLERATE = False
28 BF_LIBSAMPLERATE_INC = '${BF_LIBSAMPLERATE}/include'
29 BF_LIBSAMPLERATE_LIB = 'samplerate'
30 BF_LIBSAMPLERATE_LIBPATH = '${BF_LIBSAMPLERATE}/lib'
31 BF_LIBSAMPLERATE_LIB_STATIC = '${BF_LIBSAMPLERATE}/lib/libsamplerate.a'
32
33 WITH_BF_JACK = False
34 BF_JACK = '/usr'
35 BF_JACK_INC = '${BF_JACK}/include/jack'
36 BF_JACK_LIB = 'jack'
37 BF_JACK_LIBPATH = '${BF_JACK}/lib'
38
39 WITH_BF_SNDFILE = False
40 WITH_BF_STATICSNDFILE = False
41 BF_SNDFILE = '/usr'
42 BF_SNDFILE_INC = '${BF_SNDFILE}/include/sndfile'
43 BF_SNDFILE_LIB = 'sndfile'
44 BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib'
45 BF_SNDFILE_LIB_STATIC = '${BF_SNDFILE}/lib/libsndfile.a ${BF_OGG}/lib/libvorbis.a ${BF_OGG}/lib/libFLAC.a ${BF_OGG}/lib/libvorbisenc.a ${BF_OGG}/lib/libogg.a'
46
47 WITH_BF_SDL = True
48 BF_SDL = '/usr' #$(shell sdl-config --prefix)
49 BF_SDL_INC = '${BF_SDL}/include/SDL' #$(shell $(BF_SDL)/bin/sdl-config --cflags)
50 BF_SDL_LIB = 'SDL' #BF_SDL #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer
51
52 WITH_BF_OPENEXR = True
53 WITH_BF_STATICOPENEXR = False
54 BF_OPENEXR = '/usr'
55 # when compiling with your own openexr lib you might need to set...
56 # BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR ${BF_OPENEXR}/include'
57
58 BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR'
59 BF_OPENEXR_LIB = 'Half IlmImf Iex Imath '
60 BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
61 # BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
62
63
64 WITH_BF_DDS = True
65
66 WITH_BF_JPEG = True
67 BF_JPEG = '/usr'
68 BF_JPEG_INC = '${BF_JPEG}/include'
69 BF_JPEG_LIB = 'jpeg'
70
71 WITH_BF_PNG = True
72 BF_PNG = '/usr'
73 BF_PNG_INC = '${BF_PNG}/include'
74 BF_PNG_LIB = 'png'
75
76 WITH_BF_TIFF = True
77 BF_TIFF = '/usr'
78 BF_TIFF_INC = '${BF_TIFF}/include'
79 BF_TIFF_LIB = 'tiff'
80
81 WITH_BF_ZLIB = True
82 BF_ZLIB = '/usr'
83 BF_ZLIB_INC = '${BF_ZLIB}/include'
84 BF_ZLIB_LIB = 'z'
85
86 WITH_BF_INTERNATIONAL = True
87
88 BF_GETTEXT = '/usr'
89 BF_GETTEXT_INC = '${BF_GETTEXT}/include'
90 BF_GETTEXT_LIB = 'gettextlib'
91 BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
92 #WITH_BF_GETTEXT_STATIC = True
93 #BF_GETTEXT_LIB_STATIC = '${BF_GETTEXT}/lib/libgettextlib.a'
94
95 WITH_BF_GAMEENGINE = True
96 WITH_BF_PLAYER = True
97
98 WITH_BF_BULLET = True
99 BF_BULLET = '#extern/bullet2/src'
100 BF_BULLET_INC = '${BF_BULLET}'
101 BF_BULLET_LIB = 'extern_bullet'
102
103 # enable freetype2 support for text objects
104 BF_FREETYPE = '/usr'
105 BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
106 BF_FREETYPE_LIB = 'freetype'
107 #WITH_BF_FREETYPE_STATIC = True
108 #BF_FREETYPE_LIB_STATIC = '${BF_FREETYPE}/lib/libfreetype.a'
109
110 WITH_BF_QUICKTIME = False # -DWITH_QUICKTIME
111 BF_QUICKTIME = '/usr/local'
112 BF_QUICKTIME_INC = '${BF_QUICKTIME}/include'
113
114 WITH_BF_ICONV = False
115 BF_ICONV = LIBDIR + "/iconv"
116 BF_ICONV_INC = '${BF_ICONV}/include'
117 BF_ICONV_LIB = 'iconv'
118 BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
119
120 WITH_BF_BINRELOC = True
121
122 # enable ffmpeg  support
123 WITH_BF_FFMPEG = True  # -DWITH_FFMPEG
124 BF_FFMPEG = '/usr'
125 BF_FFMPEG_LIB = 'avformat avcodec swscale avutil avdevice'
126 BF_FFMPEG_INC = '${BF_FFMPEG}/include'
127 BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
128 #WITH_BF_STATICFFMPEG = True
129 #BF_FFMPEG_LIB_STATIC = '${BF_FFMPEG_LIBPATH}/libavformat.a ${BF_FFMPEG_LIBPATH/libavcodec.a ${BF_FFMPEG_LIBPATH}/libswscale.a ${BF_FFMPEG_LIBPATH}/libavutil.a ${BF_FFMPEG_LIBPATH}/libavdevice.a'
130
131 # enable ogg, vorbis and theora in ffmpeg
132 WITH_BF_OGG = False  # -DWITH_OGG 
133 BF_OGG = '/usr'
134 BF_OGG_INC = '${BF_OGG}/include'
135 BF_OGG_LIB = 'ogg vorbis vorbisenc theoraenc theoradec'
136
137 WITH_BF_OPENJPEG = True 
138 BF_OPENJPEG = '#extern/libopenjpeg'
139 BF_OPENJPEG_LIB = ''
140 BF_OPENJPEG_INC = '${BF_OPENJPEG}'
141 BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
142
143 WITH_BF_FFTW3 = False
144 WITH_BF_STATICFFTW3 = False
145 BF_FFTW3 = '/usr'
146 BF_FFTW3_INC = '${BF_FFTW3}/include'
147 BF_FFTW3_LIB = 'fftw3'
148 BF_FFTW3_LIBPATH = '${BF_FFTW3}/lib'
149 BF_FFTW3_LIB_STATIC = '${BF_FFTW3_LIBPATH}/libfftw3.a'
150
151 WITH_BF_REDCODE = False  
152 BF_REDCODE = '#extern/libredcode'
153 BF_REDCODE_LIB = ''
154 # BF_REDCODE_INC = '${BF_REDCODE}/include'
155 BF_REDCODE_INC = '${BF_REDCODE}/../' #C files request "libredcode/format.h" which is in "#extern/libredcode/format.h", stupid but compiles for now.
156 BF_REDCODE_LIBPATH='${BF_REDCODE}/lib'
157
158 # Mesa Libs should go here if your using them as well....
159 WITH_BF_STATICOPENGL = False
160 BF_OPENGL = '/usr'
161 BF_OPENGL_INC = '${BF_OPENGL}/include'
162 BF_OPENGL_LIB = 'GL GLU X11 Xi'
163 BF_OPENGL_LIBPATH = '/usr/X11R6/lib'
164 BF_OPENGL_LIB_STATIC = '${BF_OPENGL_LIBPATH}/libGL.a ${BF_OPENGL_LIBPATH}/libGLU.a ${BF_OPENGL_LIBPATH}/libXxf86vm.a ${BF_OPENGL_LIBPATH}/libX11.a ${BF_OPENGL_LIBPATH}/libXi.a ${BF_OPENGL_LIBPATH}/libXext.a ${BF_OPENGL_LIBPATH}/libXxf86vm.a'
165
166 WITH_BF_COLLADA = False
167 BF_COLLADA = '#source/blender/collada'
168 BF_COLLADA_INC = '${BF_COLLADA}'
169 BF_COLLADA_LIB = 'bf_collada'
170 BF_OPENCOLLADA = '/usr'
171 BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}'
172 BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver pcre buffer ftoa'
173 BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib'
174 BF_PCRE = ''
175 BF_PCRE_LIB = 'pcre'
176 BF_PCRE_LIBPATH = '/usr/lib'
177 BF_EXPAT = '/usr'
178 BF_EXPAT_LIB = 'expat'
179 BF_EXPAT_LIBPATH = '/usr/lib'
180
181 WITH_BF_JEMALLOC = False
182 WITH_BF_STATICJEMALLOC = False
183 BF_JEMALLOC = '/usr'
184 BF_JEMALLOC_INC = '${BF_JEMALLOC}/include'
185 BF_JEMALLOC_LIBPATH = '${BF_JEMALLOC}/lib'
186 BF_JEMALLOC_LIB = 'jemalloc'
187 BF_JEMALLOC_LIB_STATIC = '${BF_JEMALLOC_LIBPATH}/libjemalloc.a'
188
189 WITH_BF_OPENMP = True
190
191 #Ray trace optimization
192 WITH_BF_RAYOPTIMIZATION = True
193 BF_RAYOPTIMIZATION_SSE_FLAGS = ['-msse','-pthread']
194
195 #SpaceNavigator and friends
196 WITH_BF_NDOF = True
197 BF_NDOF_LIB = 'spnav'
198
199 ##
200 CC = 'gcc'
201 CXX = 'g++'
202 ##ifeq ($CPU),alpha)
203 ##   CFLAGS += -pipe -fPIC -funsigned-char -fno-strict-aliasing -mieee
204
205 CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing','-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64','-D_LARGEFILE64_SOURCE']
206
207 CPPFLAGS = []
208 CXXFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing','-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64','-D_LARGEFILE64_SOURCE']
209 # g++ 4.6, only needed for bullet
210 CXXFLAGS += ['-fpermissive']
211 if WITH_BF_FFMPEG:
212   # libavutil needs UINT64_C()
213   CXXFLAGS += ['-D__STDC_CONSTANT_MACROS', ]
214 REL_CFLAGS = ['-DNDEBUG', '-O2']
215 REL_CCFLAGS = ['-DNDEBUG', '-O2']
216 ##BF_DEPEND = True
217 ##
218 ##AR = ar
219 ##ARFLAGS = ruv
220 ##ARFLAGSQUIET = ru
221 ##
222 C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wunused-parameter', '-Wstrict-prototypes', '-Werror=declaration-after-statement', '-Werror=implicit-function-declaration', '-Werror=return-type']
223 CC_WARN = ['-Wall']
224 CXX_WARN = ['-Wno-invalid-offsetof', '-Wno-sign-compare']
225
226
227 ##FIX_STUBS_WARNINGS = -Wno-unused
228
229 LLIBS = ['util', 'c', 'm', 'dl', 'pthread', 'stdc++']
230 if WITH_BF_NDOF:
231         LLIBS = LLIBS + [BF_NDOF_LIB];
232 ##LOPTS = --dynamic
233 ##DYNLDFLAGS = -shared $(LDFLAGS)
234
235 BF_PROFILE = False
236 BF_PROFILE_CCFLAGS = ['-pg','-g']
237 BF_PROFILE_LINKFLAGS = ['-pg']
238
239 BF_DEBUG = False
240 BF_DEBUG_CCFLAGS = ['-g', '-D_DEBUG']
241
242 BF_BUILDDIR = '../build/linux2'
243 BF_INSTALLDIR='../install/linux2'
244
245 #Link against pthread
246 PLATFORM_LINKFLAGS = ['-pthread']
247