Minor tweaks to some UI messages...
[blender.git] / build_files / scons / config / linux-config.py
1 from Modules.FindPython import FindPython
2
3 py = FindPython()
4
5 BF_PYTHON_ABI_FLAGS = py['ABI_FLAGS']
6 BF_PYTHON = py['PYTHON']
7 BF_PYTHON_LIBPATH = py['LIBPATH']
8 BF_PYTHON_VERSION = py['VERSION']
9 WITH_BF_STATICPYTHON = False
10 BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}${BF_PYTHON_ABI_FLAGS}'
11 BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
12 BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}${BF_PYTHON_ABI_FLAGS}'  # BF_PYTHON+'/lib/python'+BF_PYTHON_VERSION+'/config/libpython'+BF_PYTHON_VERSION+'.a'
13 BF_PYTHON_LINKFLAGS = ['-Xlinker', '-export-dynamic']
14 BF_PYTHON_LIB_STATIC = '${BF_PYTHON}/lib/libpython${BF_PYTHON_VERSION}${BF_PYTHON_ABI_FLAGS}.a'
15
16 WITH_BF_OPENAL = True
17 WITH_BF_STATICOPENAL = False
18 BF_OPENAL = '/usr'
19 BF_OPENAL_INC = '${BF_OPENAL}/include'
20 BF_OPENAL_LIB = 'openal'
21 BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a'
22
23 BF_CXX = '/usr'
24 WITH_BF_STATICCXX = False
25 BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
26
27 WITH_BF_JACK = False
28 BF_JACK = '/usr'
29 BF_JACK_INC = '${BF_JACK}/include/jack'
30 BF_JACK_LIB = 'jack'
31 BF_JACK_LIBPATH = '${BF_JACK}/lib'
32
33 WITH_BF_SNDFILE = False
34 WITH_BF_STATICSNDFILE = False
35 BF_SNDFILE = '/usr'
36 BF_SNDFILE_INC = '${BF_SNDFILE}/include/sndfile'
37 BF_SNDFILE_LIB = 'sndfile'
38 BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib'
39 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'
40
41 WITH_BF_SDL = True
42 BF_SDL = '/usr' #$(shell sdl-config --prefix)
43 BF_SDL_INC = '${BF_SDL}/include/SDL' #$(shell $(BF_SDL)/bin/sdl-config --cflags)
44 BF_SDL_LIB = 'SDL' #BF_SDL #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer
45
46 WITH_BF_OPENEXR = True
47 WITH_BF_STATICOPENEXR = False
48 BF_OPENEXR = '/usr'
49 # when compiling with your own openexr lib you might need to set...
50 # BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR ${BF_OPENEXR}/include'
51
52 BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR'
53 BF_OPENEXR_LIB = 'Half IlmImf Iex Imath '
54 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'
55 # BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
56
57
58 WITH_BF_DDS = True
59
60 WITH_BF_JPEG = True
61 BF_JPEG = '/usr'
62 BF_JPEG_INC = '${BF_JPEG}/include'
63 BF_JPEG_LIB = 'jpeg'
64
65 WITH_BF_PNG = True
66 BF_PNG = '/usr'
67 BF_PNG_INC = '${BF_PNG}/include'
68 BF_PNG_LIB = 'png'
69
70 WITH_BF_TIFF = True
71 BF_TIFF = '/usr'
72 BF_TIFF_INC = '${BF_TIFF}/include'
73 BF_TIFF_LIB = 'tiff'
74
75 WITH_BF_ZLIB = True
76 BF_ZLIB = '/usr'
77 BF_ZLIB_INC = '${BF_ZLIB}/include'
78 BF_ZLIB_LIB = 'z'
79
80 WITH_BF_INTERNATIONAL = True
81
82 WITH_BF_GAMEENGINE = True
83 WITH_BF_PLAYER = True
84 WITH_BF_OCEANSIM = True
85
86 WITH_BF_BULLET = True
87 BF_BULLET = '#extern/bullet2/src'
88 BF_BULLET_INC = '${BF_BULLET}'
89 BF_BULLET_LIB = 'extern_bullet'
90
91 WITH_BF_ELTOPO = False
92 BF_LAPACK = '/usr'
93 BF_LAPACK_LIB = 'lapack3gf blas clapack'
94 BF_LAPACK_LIBPATH = '${BF_LAPACK}/lib'
95
96 BF_FREETYPE = '/usr'
97 BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
98 BF_FREETYPE_LIB = 'freetype'
99 #BF_FREETYPE_LIB_STATIC = '${BF_FREETYPE}/lib/libfreetype.a'
100
101 WITH_BF_QUICKTIME = False
102 BF_QUICKTIME = '/usr/local'
103 BF_QUICKTIME_INC = '${BF_QUICKTIME}/include'
104
105 WITH_BF_ICONV = False
106 BF_ICONV = "/usr"
107 BF_ICONV_INC = '${BF_ICONV}/include'
108 BF_ICONV_LIB = 'iconv'
109 BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
110
111 WITH_BF_BINRELOC = True
112
113 # enable ffmpeg  support
114 WITH_BF_FFMPEG = True
115 BF_FFMPEG = '/usr'
116 BF_FFMPEG_LIB = 'avformat avcodec swscale avutil avdevice'
117 BF_FFMPEG_INC = '${BF_FFMPEG}/include'
118 BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
119 #WITH_BF_STATICFFMPEG = True
120 #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'
121
122 # enable ogg, vorbis and theora in ffmpeg
123 WITH_BF_OGG = False
124 BF_OGG = '/usr'
125 BF_OGG_INC = '${BF_OGG}/include'
126 BF_OGG_LIB = 'ogg vorbis vorbisenc theoraenc theoradec'
127
128 WITH_BF_OPENJPEG = True 
129 BF_OPENJPEG = '#extern/libopenjpeg'
130 BF_OPENJPEG_LIB = ''
131 BF_OPENJPEG_INC = '${BF_OPENJPEG}'
132 BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
133
134 WITH_BF_FFTW3 = False
135 WITH_BF_STATICFFTW3 = False
136 BF_FFTW3 = '/usr'
137 BF_FFTW3_INC = '${BF_FFTW3}/include'
138 BF_FFTW3_LIB = 'fftw3'
139 BF_FFTW3_LIBPATH = '${BF_FFTW3}/lib'
140 BF_FFTW3_LIB_STATIC = '${BF_FFTW3_LIBPATH}/libfftw3.a'
141
142 WITH_BF_REDCODE = False  
143 BF_REDCODE = '#extern/libredcode'
144 BF_REDCODE_LIB = ''
145 # BF_REDCODE_INC = '${BF_REDCODE}/include'
146 BF_REDCODE_INC = '${BF_REDCODE}/../' #C files request "libredcode/format.h" which is in "#extern/libredcode/format.h", stupid but compiles for now.
147 BF_REDCODE_LIBPATH='${BF_REDCODE}/lib'
148
149 # Mesa Libs should go here if your using them as well....
150 WITH_BF_STATICOPENGL = False
151 BF_OPENGL = '/usr'
152 BF_OPENGL_INC = '${BF_OPENGL}/include'
153 BF_OPENGL_LIB = 'GL GLU X11 Xi'
154 BF_OPENGL_LIBPATH = '/usr/X11R6/lib'
155 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'
156
157 WITH_BF_COLLADA = False
158 BF_COLLADA = '#source/blender/collada'
159 BF_COLLADA_INC = '${BF_COLLADA}'
160 BF_COLLADA_LIB = 'bf_collada'
161 BF_OPENCOLLADA = '/usr'
162 BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}'
163 BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver pcre buffer ftoa'
164 BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib'
165 BF_PCRE = ''
166 BF_PCRE_LIB = 'pcre'
167 BF_PCRE_LIBPATH = '/usr/lib'
168 BF_EXPAT = '/usr'
169 BF_EXPAT_LIB = 'expat'
170 BF_EXPAT_LIBPATH = '/usr/lib'
171
172 WITH_BF_JEMALLOC = False
173 WITH_BF_STATICJEMALLOC = False
174 BF_JEMALLOC = '/usr'
175 BF_JEMALLOC_INC = '${BF_JEMALLOC}/include'
176 BF_JEMALLOC_LIBPATH = '${BF_JEMALLOC}/lib'
177 BF_JEMALLOC_LIB = 'jemalloc'
178 BF_JEMALLOC_LIB_STATIC = '${BF_JEMALLOC_LIBPATH}/libjemalloc.a'
179
180 WITH_BF_OIIO = False
181 WITH_BF_STATICOIIO = False
182 BF_OIIO = '/usr'
183 BF_OIIO_INC = '${BF_OIIO}/include'
184 BF_OIIO_LIB = 'OpenImageIO'
185 BF_OIIO_LIB_STATIC = '${BF_OIIO_LIBPATH}/libOpenImageIO.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_JPEG}/lib/libjpeg.a'
186 BF_OIIO_LIBPATH = '${BF_OIIO}/lib'
187
188 WITH_BF_OCIO = False
189 WITH_BF_STATICOCIO = False
190 BF_OCIO = '/usr'
191 BF_OCIO_INC = '${BF_OCIO}/include'
192 BF_OCIO_LIB = 'OpenColorIO yaml-cpp tinyxml'
193 BF_OCIO_LIB_STATIC = '${BF_OCIO_LIBPATH}/libOpenColorIO.a ${BF_OCIO_LIBPATH}/libtinyxml.a ${BF_OCIO_LIBPATH}/libyaml-cpp.a'
194 BF_OCIO_LIBPATH = '${BF_OCIO}/lib'
195
196 WITH_BF_BOOST = False
197 WITH_BF_STATICBOOST = False
198 BF_BOOST = '/usr'
199 BF_BOOST_INC = '${BF_BOOST}/include'
200 BF_BOOST_LIB = 'boost_filesystem boost_regex boost_system boost_thread boost_date_time'
201 BF_BOOST_LIB_STATIC = '${BF_BOOST_LIBPATH}/libboost_filesystem.a ${BF_BOOST_LIBPATH}/libboost_date_time.a ' + \
202     '${BF_BOOST_LIBPATH}/libboost_regex.a ${BF_BOOST_LIBPATH}/libboost_locale.a ${BF_BOOST_LIBPATH}/libboost_system.a' + \
203     '${BF_BOOST_LIBPATH}/libboost_thread.a'
204 BF_BOOST_LIB_INTERNATIONAL = 'boost_locale'
205 BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
206
207 WITH_BF_CYCLES = WITH_BF_OIIO and WITH_BF_BOOST
208
209 WITH_BF_CYCLES_CUDA_BINARIES = False
210 BF_CYCLES_CUDA_NVCC = '/usr/local/cuda/bin/nvcc'
211 BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_13', 'sm_20', 'sm_21', 'sm_30']
212
213 WITH_BF_OPENMP = True
214
215 #Ray trace optimization
216 WITH_BF_RAYOPTIMIZATION = True
217 BF_RAYOPTIMIZATION_SSE_FLAGS = ['-msse','-pthread']
218
219 #SpaceNavigator and friends
220 WITH_BF_3DMOUSE = True
221 WITH_BF_STATIC3DMOUSE = False
222 BF_3DMOUSE = '/usr'
223 BF_3DMOUSE_INC = '${BF_3DMOUSE}/include'
224 BF_3DMOUSE_LIBPATH = '${BF_3DMOUSE}/lib'
225 BF_3DMOUSE_LIB = 'spnav'
226 BF_3DMOUSE_LIB_STATIC = '${BF_3DMOUSE_LIBPATH}/libspnav.a'
227
228 ##
229 CC = 'gcc'
230 CXX = 'g++'
231
232 CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing','-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64','-D_LARGEFILE64_SOURCE']
233 CXXFLAGS = []
234
235 CPPFLAGS = []
236 # g++ 4.6, only needed for bullet
237 CXXFLAGS += ['-fpermissive']
238 if WITH_BF_FFMPEG:
239     # libavutil needs UINT64_C()
240     CXXFLAGS += ['-D__STDC_CONSTANT_MACROS', ]
241 REL_CFLAGS = []
242 REL_CXXFLAGS = []
243 REL_CCFLAGS = ['-DNDEBUG', '-O2']
244
245 C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wunused-parameter', '-Wstrict-prototypes', '-Werror=declaration-after-statement', '-Werror=implicit-function-declaration', '-Werror=return-type']
246 CC_WARN = ['-Wall']
247 CXX_WARN = ['-Wno-invalid-offsetof', '-Wno-sign-compare']
248
249 LLIBS = ['util', 'c', 'm', 'dl', 'pthread', 'stdc++']
250
251 BF_PROFILE = False
252 BF_PROFILE_CCFLAGS = ['-pg','-g']
253 BF_PROFILE_LINKFLAGS = ['-pg']
254
255 BF_DEBUG = False
256 BF_DEBUG_CCFLAGS = ['-g', '-D_DEBUG']
257
258 BF_BUILDDIR = '../build/linux'
259 BF_INSTALLDIR='../install/linux'
260
261 #Link against pthread
262 PLATFORM_LINKFLAGS = ['-pthread']
263
264 #Fix for LLVM conflict with Mesa llvmpipe
265 if WITH_BF_LLVM:
266     PLATFORM_LINKFLAGS += ['-Wl,--version-script=source/creator/blender.map']