Enable shader model 3.0 shaders for mingw compilers
[blender.git] / build_files / scons / config / win64-mingw-config.py
1 LCGDIR = '#../lib/mingw64'
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
13 WITH_BF_OPENAL = True
14 BF_OPENAL = LIBDIR + '/openal'
15 BF_OPENAL_INC = '${BF_OPENAL}/include'
16 BF_OPENAL_LIB = 'wrap_oal'
17 BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
18
19 WITH_BF_FFMPEG = True
20 BF_FFMPEG_LIB = 'avformat.dll avcodec.dll avdevice.dll avutil.dll swscale.dll swresample.dll'
21 BF_FFMPEG_LIBPATH = LIBDIR + '/ffmpeg/lib'
22 BF_FFMPEG_INC =  LIBDIR + '/ffmpeg/include'
23 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 ${BF_FFMPEG_LIBPATH}/swresample-0.dll ${BF_FFMPEG_LIBPATH}/xvidcore.dll'
24
25 WITH_BF_JACK = False
26 BF_JACK = LIBDIR + '/jack'
27 BF_JACK_INC = '${BF_JACK}/include'
28 BF_JACK_LIB = 'libjack'
29 BF_JACK_LIBPATH = '${BF_JACK}/lib'
30
31 WITH_BF_SNDFILE = False
32 BF_SNDFILE = LIBDIR + '/sndfile'
33 BF_SNDFILE_INC = '${BF_SNDFILE}/include'
34 BF_SNDFILE_LIB = 'libsndfile-1'
35 BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib'
36
37 WITH_BF_SDL = True
38 BF_SDL = LIBDIR + '/sdl'
39 BF_SDL_INC = '${BF_SDL}/include'
40 BF_SDL_LIB = 'SDL'
41 BF_SDL_LIBPATH = '${BF_SDL}/lib'
42
43 BF_PTHREADS = '' # Part of MinGW-w64
44 BF_PTHREADS_INC = ''
45 BF_PTHREADS_LIB = ''
46 BF_PTHREADS_LIBPATH = ''
47
48 WITH_BF_OPENEXR = True
49 WITH_BF_STATICOPENEXR = False
50 BF_OPENEXR = LIBDIR + '/openexr'
51 BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/OpenEXR'
52 BF_OPENEXR_LIB = 'Half IlmImf Imath IlmThread Iex'
53 BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
54
55 WITH_BF_DDS = True
56
57 WITH_BF_JPEG = True
58 BF_JPEG = LIBDIR + '/jpeg'
59 BF_JPEG_INC = '${BF_JPEG}/include'
60 BF_JPEG_LIB = 'jpeg'
61 BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
62
63 WITH_BF_PNG = True
64 BF_PNG = LIBDIR + '/png'
65 BF_PNG_INC = '${BF_PNG}/include'
66 BF_PNG_LIB = 'png'
67 BF_PNG_LIBPATH = '${BF_PNG}/lib'
68
69 WITH_BF_TIFF = True
70 BF_TIFF = LIBDIR + '/tiff'
71 BF_TIFF_INC = '${BF_TIFF}/include'
72 BF_TIFF_LIB = 'tiff'
73 BF_TIFF_LIBPATH = '${BF_TIFF}/lib'
74
75 WITH_BF_ZLIB = True
76 BF_ZLIB = LIBDIR + '/zlib'
77 BF_ZLIB_INC = '${BF_ZLIB}/include'
78 BF_ZLIB_LIB = 'z'
79 BF_ZLIB_LIBPATH = '${BF_ZLIB}/lib'
80
81 WITH_BF_INTERNATIONAL = True
82
83 BF_GETTEXT = LIBDIR + '/gettext'
84 BF_GETTEXT_INC = '${BF_GETTEXT}/include'
85 BF_GETTEXT_LIB = 'intl'
86 BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
87
88 WITH_BF_OPENJPEG = True
89 BF_OPENJPEG = '#extern/libopenjpeg'
90 BF_OPENJPEG_LIB = ''
91 BF_OPENJPEG_INC = '${BF_OPENJPEG}'
92 BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
93
94 WITH_BF_FFTW3 = True
95 BF_FFTW3 = LIBDIR + '/fftw3'
96 BF_FFTW3_INC = '${BF_FFTW3}/include'
97 BF_FFTW3_LIB = 'fftw3'
98 BF_FFTW3_LIBPATH = '${BF_FFTW3}/lib'
99
100 WITH_BF_GAMEENGINE = True
101 WITH_BF_OCEANSIM = True
102 WITH_BF_PLAYER = True
103 WITH_BF_LIBMV = True
104
105 WITH_BF_BULLET = True
106 BF_BULLET = '#extern/bullet2/src'
107 BF_BULLET_INC = '${BF_BULLET}'
108 BF_BULLET_LIB = 'extern_bullet'
109
110 BF_WINTAB = LIBDIR + '/wintab'
111 BF_WINTAB_INC = '${BF_WINTAB}/INCLUDE'
112
113 # enable freetype2 support for text objects
114 BF_FREETYPE = LIBDIR + '/freetype'
115 BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2/'
116 BF_FREETYPE_LIB = 'freetype'
117 BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
118
119 WITH_BF_QUICKTIME = False
120
121 WITH_BF_ICONV = True
122 BF_ICONV = LIBDIR + "/iconv"
123 BF_ICONV_INC = '${BF_ICONV}/include'
124 BF_ICONV_LIB = 'iconv'
125 BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
126
127 WITH_BF_REDCODE = False
128 BF_REDCODE_INC = '#extern'
129
130 # Mesa Libs should go here if your using them as well....
131 WITH_BF_STATICOPENGL = False
132 BF_OPENGL = 'C:\\MingW'
133 BF_OPENGL_INC = '${BF_OPENGL}/include'
134 BF_OPENGL_LIBINC = '${BF_OPENGL}/lib'
135 BF_OPENGL_LIB = 'opengl32 glu32'
136 BF_OPENGL_LIB_STATIC = [ '${BF_OPENGL}/lib/libGL.a', '${BF_OPENGL}/lib/libGLU.a',
137              '${BF_OPENGL}/lib/libXmu.a', '${BF_OPENGL}/lib/libXext.a',
138              '${BF_OPENGL}/lib/libX11.a', '${BF_OPENGL}/lib/libXi.a' ]
139
140 WITH_BF_COLLADA = True
141 BF_COLLADA = '#source/blender/collada'
142 BF_COLLADA_INC = '${BF_COLLADA}'
143 BF_COLLADA_LIB = 'bf_collada'
144
145 BF_OPENCOLLADA = LIBDIR + '/opencollada'
146 BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include'
147 BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver pcre buffer ftoa xml'
148 BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib'
149
150 #Cycles
151 WITH_BF_CYCLES = True
152 WITH_BF_CYCLES_CUDA_BINARIES = False
153 BF_CYCLES_CUDA_NVCC = "" # Path to the NVIDIA CUDA compiler
154 BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_13', 'sm_20', 'sm_21', 'sm_30']
155
156 WITH_BF_OIIO = True
157 BF_OIIO = LIBDIR + '/openimageio'
158 BF_OIIO_INC = '${BF_OIIO}/include'
159 BF_OIIO_LIB = 'OpenImageIO'
160 BF_OIIO_LIBPATH = '${BF_OIIO}/lib'
161
162 WITH_BF_BOOST = True
163 BF_BOOST = LIBDIR + '/boost'
164 BF_BOOST_INC = BF_BOOST + '/include'
165 BF_BOOST_LIB = 'boost_date_time-mgw47-mt-s-1_49 boost_date_time-mgw47-mt-sd-1_49 boost_filesystem-mgw47-mt-s-1_49 boost_filesystem-mgw47-mt-sd-1_49 boost_regex-mgw47-mt-s-1_49 boost_regex-mgw47-mt-sd-1_49 boost_system-mgw47-mt-s-1_49 boost_system-mgw47-mt-sd-1_49 boost_thread-mgw47-mt-s-1_49 boost_thread-mgw47-mt-sd-1_49'
166 BF_BOOST_LIBPATH = BF_BOOST + '/lib'
167
168 #Ray trace optimization
169 WITH_BF_RAYOPTIMIZATION = True
170 BF_RAYOPTIMIZATION_SSE_FLAGS = ['-mmmx', '-msse', '-msse2']
171
172 #May produce errors with unsupported MinGW-w64 builds
173 WITH_BF_OPENMP = False
174
175 ##
176 CC = 'gcc'
177 CXX = 'g++'
178
179 CCFLAGS = [ '-pipe', '-funsigned-char', '-fno-strict-aliasing' ]
180 CXXFLAGS = [ '-fpermissive' ]
181
182 CPPFLAGS = ['-DWIN32', '-DMS_WIN64', '-DFREE_WINDOWS', '-DFREE_WINDOWS64', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64', '-D_LARGEFILE64_SOURCE', '-DBOOST_ALL_NO_LIB', '-DBOOST_THREAD_USE_LIB', '-DGLEW_STATIC', '-DOPJ_STATIC']
183 REL_CFLAGS = []
184 REL_CXXFLAGS = []
185 REL_CCFLAGS = ['-DNDEBUG', '-O2', '-ftree-vectorize']
186
187 C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wstrict-prototypes']
188
189 CC_WARN = [ '-Wall' ]
190
191 LLIBS = ['-lshell32', '-lshfolder', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz', '-lstdc++','-lole32','-luuid', '-lwsock32', '-lpsapi', '-lpthread']
192
193 PLATFORM_LINKFLAGS = ['-Xlinker', '--stack=2097152']
194
195 ## DISABLED, causes linking errors!
196 ## for re-distrobution, so users dont need mingw installed
197 # PLATFORM_LINKFLAGS += ["-static-libgcc", "-static-libstdc++"]
198
199 BF_DEBUG = False
200 BF_DEBUG_CCFLAGS= ['-g', '-D_DEBUG']
201
202 BF_PROFILE_CCFLAGS = ['-pg', '-g']
203 BF_PROFILE_LINKFLAGS = ['-pg']
204 BF_PROFILE_FLAGS = BF_PROFILE_CCFLAGS
205 BF_PROFILE = False
206
207 BF_BUILDDIR = '..\\build\\win64-mingw'
208 BF_INSTALLDIR='..\\install\\win64-mingw'