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