svn merge -r39930:39947 https://svn.blender.org/svnroot/bf-blender/trunk/blender
[blender.git] / build_files / scons / config / win32-mingw-config.py
1 LCGDIR = '#../lib/windows'
2 LIBDIR = "${LCGDIR}"
3
4 BF_PYTHON = LIBDIR + '/python'
5 BF_PYTHON_VERSION = '3.2'
6 WITH_BF_STATICPYTHON = False
7 BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
8 BF_PYTHON_BINARY = 'python'
9 BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}mw'
10 BF_PYTHON_DLL = 'python32'
11 BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
12 BF_PYTHON_LIB_STATIC = '${BF_PYTHON}/lib/libpython${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}.a'
13
14 WITH_BF_OPENAL = True
15 BF_OPENAL = LIBDIR + '/openal'
16 BF_OPENAL_INC = '${BF_OPENAL}/include'
17 BF_OPENAL_LIB = 'wrap_oal'
18 BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
19
20 WITH_BF_FFMPEG = False
21 BF_FFMPEG_LIB = 'avformat-53 avcodec-53 avdevice-53 avutil-51 swscale-2'
22 BF_FFMPEG_LIBPATH = LIBDIR + '/ffmpeg/lib'
23 BF_FFMPEG_INC =  LIBDIR + '/ffmpeg/include'
24 BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-53.dll ${BF_FFMPEG_LIBPATH}/avcodec-53.dll ${BF_FFMPEG_LIBPATH}/avdevice-53.dll ${BF_FFMPEG_LIBPATH}/avutil-51.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll'
25
26 BF_LIBSAMPLERATE = LIBDIR + '/samplerate'
27 BF_LIBSAMPLERATE_INC = '${BF_LIBSAMPLERATE}/include'
28 BF_LIBSAMPLERATE_LIB = 'libsamplerate'
29 BF_LIBSAMPLERATE_LIBPATH = '${BF_LIBSAMPLERATE}/lib'
30
31 WITH_BF_JACK = False
32 BF_JACK = LIBDIR + '/jack'
33 BF_JACK_INC = '${BF_JACK}/include'
34 BF_JACK_LIB = 'libjack'
35 BF_JACK_LIBPATH = '${BF_JACK}/lib'
36
37 WITH_BF_SNDFILE = False
38 BF_SNDFILE = LIBDIR + '/sndfile'
39 BF_SNDFILE_INC = '${BF_SNDFILE}/include'
40 BF_SNDFILE_LIB = 'libsndfile-1'
41 BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib'
42
43 WITH_BF_SDL = True
44 BF_SDL = LIBDIR + '/sdl'
45 BF_SDL_INC = '${BF_SDL}/include'
46 BF_SDL_LIB = 'SDL'
47 BF_SDL_LIBPATH = '${BF_SDL}/lib'
48
49 BF_PTHREADS = LIBDIR + '/pthreads'
50 BF_PTHREADS_INC = '${BF_PTHREADS}/include'
51 BF_PTHREADS_LIB = 'pthreadGC2'
52 BF_PTHREADS_LIBPATH = '${BF_PTHREADS}/lib'
53
54 WITH_BF_OPENEXR = False  # TODO, gives linking problems for the moment.
55 WITH_BF_STATICOPENEXR = False
56 BF_OPENEXR = LIBDIR + '/gcc/openexr'
57 BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/OpenEXR'
58 BF_OPENEXR_LIB = ' Half IlmImf Iex IlmThread '
59 BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
60 # Warning, this static lib configuration is untested! users of this OS please confirm.
61 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'
62
63 WITH_BF_DDS = True
64
65 WITH_BF_JPEG = True
66 BF_JPEG = LIBDIR + '/jpeg'
67 BF_JPEG_INC = '${BF_JPEG}/include'
68 BF_JPEG_LIB = 'liblibjpeg'
69 BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
70
71 WITH_BF_PNG = True
72 BF_PNG = LIBDIR + '/png'
73 BF_PNG_INC = '${BF_PNG}/include'
74 BF_PNG_LIB = 'png'
75 BF_PNG_LIBPATH = '${BF_PNG}/lib'
76
77 WITH_BF_TIFF = True
78 BF_TIFF = LIBDIR + '/gcc/tiff'
79 BF_TIFF_INC = '${BF_TIFF}/include'
80 BF_TIFF_LIB = 'tiff'
81 BF_TIFF_LIBPATH = '${BF_TIFF}/lib'
82
83 WITH_BF_ZLIB = True
84 BF_ZLIB = LIBDIR + '/zlib'
85 BF_ZLIB_INC = '${BF_ZLIB}/include'
86 BF_ZLIB_LIB = 'libz'
87 BF_ZLIB_LIBPATH = '${BF_ZLIB}/lib'
88
89 WITH_BF_INTERNATIONAL = True
90
91 BF_GETTEXT = LIBDIR + '/gcc/gettext'
92 BF_GETTEXT_INC = '${BF_GETTEXT}/include'
93 BF_GETTEXT_LIB = 'intl'
94 BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
95
96 WITH_BF_OPENJPEG = True
97 BF_OPENJPEG = '#extern/libopenjpeg'
98 BF_OPENJPEG_LIB = ''
99 BF_OPENJPEG_INC = '${BF_OPENJPEG}'
100 BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
101
102 WITH_BF_FFTW3 = False
103 BF_FFTW3 = LIBDIR + '/gcc/fftw3'
104 BF_FFTW3_INC = '${BF_FFTW3}/include'
105 BF_FFTW3_LIB = 'fftw3'
106 BF_FFTW3_LIBPATH = '${BF_FFTW3}/lib'
107
108 WITH_BF_GAMEENGINE = False
109 WITH_BF_PLAYER = False
110
111 WITH_BF_BULLET = True
112 BF_BULLET = '#extern/bullet2/src'
113 BF_BULLET_INC = '${BF_BULLET}'
114 BF_BULLET_LIB = 'extern_bullet'
115
116 BF_WINTAB = LIBDIR + '/wintab'
117 BF_WINTAB_INC = '${BF_WINTAB}/INCLUDE'
118
119 # enable freetype2 support for text objects
120 BF_FREETYPE = LIBDIR + '/gcc/freetype'
121 BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
122 BF_FREETYPE_LIB = 'freetype'
123 BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
124
125 WITH_BF_QUICKTIME = False # -DWITH_QUICKTIME
126 BF_QUICKTIME = '/usr/local'
127 BF_QUICKTIME_INC = '${BF_QUICKTIME}/include'
128
129 WITH_BF_ICONV = False
130 BF_ICONV = LIBDIR + "/iconv"
131 BF_ICONV_INC = '${BF_ICONV}/include'
132 BF_ICONV_LIB = 'iconv'
133 BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
134
135 WITH_BF_REDCODE = False
136 BF_REDCODE_INC = '#extern'
137
138 # Mesa Libs should go here if your using them as well....
139 WITH_BF_STATICOPENGL = False
140 BF_OPENGL = 'C:\\MingW'
141 BF_OPENGL_INC = '${BF_OPENGL}/include'
142 BF_OPENGL_LIBINC = '${BF_OPENGL}/lib'
143 BF_OPENGL_LIB = 'opengl32 glu32'
144 BF_OPENGL_LIB_STATIC = [ '${BF_OPENGL}/lib/libGL.a', '${BF_OPENGL}/lib/libGLU.a',
145              '${BF_OPENGL}/lib/libXmu.a', '${BF_OPENGL}/lib/libXext.a',
146              '${BF_OPENGL}/lib/libX11.a', '${BF_OPENGL}/lib/libXi.a' ]
147
148 WITH_BF_COLLADA = False  # TODO, gives linking problems at the moment.
149 BF_COLLADA = '#source/blender/collada'
150 BF_COLLADA_INC = '${BF_COLLADA}'
151 BF_COLLADA_LIB = 'bf_collada'
152
153 BF_OPENCOLLADA = LIBDIR + '/gcc/opencollada'
154 BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include'
155 BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver expat pcre buffer ftoa'
156 BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib'
157
158 #Ray trace optimization
159 WITH_BF_RAYOPTIMIZATION = False
160 BF_RAYOPTIMIZATION_SSE_FLAGS = ['-msse']
161
162 ##
163 CC = 'gcc'
164 CXX = 'g++'
165
166 CCFLAGS = [ '-pipe', '-funsigned-char', '-fno-strict-aliasing' ]
167
168 CPPFLAGS = ['-DWIN32', '-DFREE_WINDOWS', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64', '-D_LARGEFILE64_SOURCE']
169 CXXFLAGS = ['-pipe',  '-funsigned-char', '-fno-strict-aliasing' ]
170 REL_CFLAGS = ['-DNDEBUG',  '-O2']
171 REL_CCFLAGS = ['-DNDEBUG',  '-O2']
172
173 C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wstrict-prototypes']
174
175 CC_WARN = [ '-Wall' ]
176
177 LLIBS = ['-lshell32', '-lshfolder', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz', '-lstdc++','-lole32','-luuid']
178
179 PLATFORM_LINKFLAGS = ['--stack,2097152']
180
181 BF_DEBUG = False
182 BF_DEBUG_CCFLAGS= ['-g', '-D_DEBUG']
183
184 BF_PROFILE_CCFLAGS = ['-pg', '-g']
185 BF_PROFILE_LINKFLAGS = ['-pg']
186 BF_PROFILE_FLAGS = BF_PROFILE_CCFLAGS
187 BF_PROFILE = False
188
189 BF_BUILDDIR = '..\\build\\win32-mingw'
190 BF_INSTALLDIR='..\\install\\win32-mingw'