[#18164] jpeg2000 patch, with some fixes from Peter too.
[blender.git] / config / linux2-config.py
1 LCGDIR = '../lib/linux2'
2 LIBDIR = "${LCGDIR}"
3
4 WITH_BF_VERSE = False
5 BF_VERSE_INCLUDE = "#extern/verse/dist"
6
7 BF_PYTHON = '/usr'
8 BF_PYTHON_VERSION = '2.5'
9 WITH_BF_STATICPYTHON = False
10 BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
11 BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
12 BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}' #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}.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 # some distros have a separate libalut
24 # if you get linker complaints, you need to uncomment the line below
25 # BF_OPENAL_LIB = 'openal alut'  
26 # BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a ${BF_OPENAL}/lib/libalut.a'
27
28 BF_CXX = '/usr'
29 WITH_BF_STATICCXX = False
30 BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
31
32 WITH_BF_SDL = True
33 BF_SDL = '/usr' #$(shell sdl-config --prefix)
34 BF_SDL_INC = '${BF_SDL}/include/SDL' #$(shell $(BF_SDL)/bin/sdl-config --cflags)
35 BF_SDL_LIB = 'SDL' #BF_SDL #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer
36
37 WITH_BF_FMOD = False
38 BF_FMOD = LIBDIR + '/fmod'
39
40 WITH_BF_OPENEXR = True
41 WITH_BF_STATICOPENEXR = False
42 BF_OPENEXR = '/usr'
43 # when compiling with your own openexr lib you might need to set...
44 # BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR ${BF_OPENEXR}/include'
45
46 BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR'
47 BF_OPENEXR_LIB = 'Half IlmImf Iex Imath '
48 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'
49 # BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
50
51
52 WITH_BF_DDS = True
53
54 WITH_BF_JPEG = True
55 BF_JPEG = '/usr'
56 BF_JPEG_INC = '${BF_JPEG}/include'
57 BF_JPEG_LIB = 'jpeg'
58
59 WITH_BF_PNG = True
60 BF_PNG = '/usr'
61 BF_PNG_INC = '${BF_PNG}/include'
62 BF_PNG_LIB = 'png'
63
64 BF_TIFF = '/usr'
65 BF_TIFF_INC = '${BF_TIFF}/include'
66
67 WITH_BF_ZLIB = True
68 BF_ZLIB = '/usr'
69 BF_ZLIB_INC = '${BF_ZLIB}/include'
70 BF_ZLIB_LIB = 'z'
71
72 WITH_BF_INTERNATIONAL = True
73
74 BF_GETTEXT = '/usr'
75 BF_GETTEXT_INC = '${BF_GETTEXT}/include'
76 BF_GETTEXT_LIB = 'gettextlib'
77 BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
78
79 WITH_BF_FTGL = True
80 BF_FTGL = '#extern/bFTGL'
81 BF_FTGL_INC = '${BF_FTGL}/include'
82 BF_FTGL_LIB = 'extern_ftgl'
83
84 WITH_BF_GAMEENGINE=False
85
86 WITH_BF_ODE = False
87 BF_ODE = LIBDIR + '/ode'
88 BF_ODE_INC = BF_ODE + '/include'
89 BF_ODE_LIB = BF_ODE + '/lib/libode.a'
90
91 WITH_BF_BULLET = True
92 BF_BULLET = '#extern/bullet2/src'
93 BF_BULLET_INC = '${BF_BULLET}'
94 BF_BULLET_LIB = 'extern_bullet'
95
96 BF_SOLID = '#extern/solid'
97 BF_SOLID_INC = '${BF_SOLID}'
98 BF_SOLID_LIB = 'extern_solid'
99
100 WITH_BF_YAFRAY = True
101
102 #WITH_BF_NSPR = True
103 #BF_NSPR = $(LIBDIR)/nspr
104 #BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr
105 #BF_NSPR_LIB = 
106
107 # Uncomment the following line to use Mozilla inplace of netscape
108 #CPPFLAGS += -DMOZ_NOT_NET
109 # Location of MOZILLA/Netscape header files...
110 #BF_MOZILLA = $(LIBDIR)/mozilla
111 #BF_MOZILLA_INC = -I$(BF_MOZILLA)/include/mozilla/nspr -I$(BF_MOZILLA)/include/mozilla -I$(BF_MOZILLA)/include/mozilla/xpcom -I$(BF_MOZILLA)/include/mozilla/idl
112 #BF_MOZILLA_LIB =
113 # Will fall back to look in BF_MOZILLA_INC/nspr and BF_MOZILLA_LIB
114 # if this is not set.
115 #
116 # Be paranoid regarding library creation (do not update archives)
117 #BF_PARANOID = True
118
119 # enable freetype2 support for text objects
120 BF_FREETYPE = '/usr'
121 BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
122 BF_FREETYPE_LIB = 'freetype'
123
124 WITH_BF_QUICKTIME = False # -DWITH_QUICKTIME
125 BF_QUICKTIME = '/usr/local'
126 BF_QUICKTIME_INC = '${BF_QUICKTIME}/include'
127
128 WITH_BF_ICONV = False
129 BF_ICONV = LIBDIR + "/iconv"
130 BF_ICONV_INC = '${BF_ICONV}/include'
131 BF_ICONV_LIB = 'iconv'
132 BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
133
134 WITH_BF_BINRELOC = True
135
136 # enable ffmpeg  support
137 WITH_BF_FFMPEG = True  # -DWITH_FFMPEG
138 BF_FFMPEG = '#extern/ffmpeg'
139 BF_FFMPEG_LIB = ''
140 # Uncomment the following two lines to use system's ffmpeg
141 # BF_FFMPEG = '/usr'
142 # BF_FFMPEG_LIB = 'avformat avcodec swscale avutil avdevice'
143 # trick : The version of ffmpeg in extern/ffmpeg uses explicit libav.. directory in #include statements
144 #         To keep Blender compatible with older version, I add ${BF_FFMPEG} to the inc dir so that ffmpeg
145 #         finds the files directly in extern/ffmpeg/libav... while blender finds them in
146 #         extern/ffmpeg/include. When using system ffmpeg, you don't need that, assuming the system library
147 #         still use the flat directory model, otherwise will not compile anyway
148 BF_FFMPEG_INC = '${BF_FFMPEG}/include ${BF_FFMPEG}'
149 BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
150
151 # enable ogg, vorbis and theora in ffmpeg
152 WITH_BF_OGG = False  # -DWITH_OGG 
153 BF_OGG = '/usr'
154 BF_OGG_INC = '${BF_OGG}/include'
155 BF_OGG_LIB = 'ogg vorbis theoraenc theoradec'
156
157 WITH_BF_OPENJPEG = True 
158 BF_OPENJPEG = '#extern/libopenjpeg'
159 BF_OPENJPEG_LIB = ''
160 BF_OPENJPEG_INC = '${BF_OPENJPEG}'
161 BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
162
163 WITH_BF_REDCODE = False  
164 BF_REDCODE = '#extern/libredcode'
165 BF_REDCODE_LIB = ''
166 # BF_REDCODE_INC = '${BF_REDCODE}/include'
167 BF_REDCODE_INC = '${BF_REDCODE}/../' #C files request "libredcode/format.h" which is in "#extern/libredcode/format.h", stupid but compiles for now.
168 BF_REDCODE_LIBPATH='${BF_REDCODE}/lib'
169
170 # Mesa Libs should go here if your using them as well....
171 WITH_BF_STATICOPENGL = False
172 BF_OPENGL = '/usr'
173 BF_OPENGL_INC = '${BF_OPENGL}/include'
174 BF_OPENGL_LIB = 'GL GLU X11 Xi'
175 BF_OPENGL_LIBPATH = '/usr/X11R6/lib'
176 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'
177
178 ##
179 CC = 'gcc'
180 CXX = 'g++'
181 ##ifeq ($CPU),alpha)
182 ##   CFLAGS += -pipe -fPIC -funsigned-char -fno-strict-aliasing -mieee
183
184 CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing']
185
186 CPPFLAGS = ['-DXP_UNIX']
187 CXXFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing']
188 REL_CFLAGS = ['-O2']
189 REL_CCFLAGS = ['-O2']
190 ##BF_DEPEND = True
191 ##
192 ##AR = ar
193 ##ARFLAGS = ruv
194 ##ARFLAGSQUIET = ru
195 ##
196 C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement']
197
198 CC_WARN = ['-Wall']
199
200 ##FIX_STUBS_WARNINGS = -Wno-unused
201
202 LLIBS = ['util', 'c', 'm', 'dl', 'pthread', 'stdc++']
203 ##LOPTS = --dynamic
204 ##DYNLDFLAGS = -shared $(LDFLAGS)
205
206 BF_PROFILE = False
207 BF_PROFILE_CCFLAGS = ['-pg','-g']
208 BF_PROFILE_LINKFLAGS = ['-pg']
209
210 BF_DEBUG = False
211 BF_DEBUG_CCFLAGS = ['-g']
212
213 BF_BUILDDIR = '../build/linux2'
214 BF_INSTALLDIR='../install/linux2'
215 BF_DOCDIR='../install/doc'
216
217
218 #Link against pthread
219 PLATFORM_LINKFLAGS = ['-pthread']
220