2.5
[blender.git] / config / linux2-config.py
1 LCGDIR = '../lib/linux2'
2 LIBDIR = "${LCGDIR}"
3
4 def py_version_string():
5         '''
6         returns py version - "2.5", "2.6" etc
7         '''
8         import platform
9         ver = platform.python_version_tuple()
10         return '%d.%d' % (int(ver[0]), int(ver[1])) # py2.5 uses strings, 2.6 ints
11
12 BF_PYTHON = '/usr'
13 BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
14 BF_PYTHON_VERSION = py_version_string()
15 WITH_BF_STATICPYTHON = False
16 BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
17 BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
18 BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}' #BF_PYTHON+'/lib/python'+BF_PYTHON_VERSION+'/config/libpython'+BF_PYTHON_VERSION+'.a'
19 BF_PYTHON_LINKFLAGS = ['-Xlinker', '-export-dynamic']
20 BF_PYTHON_LIB_STATIC = '${BF_PYTHON}/lib/libpython${BF_PYTHON_VERSION}.a'
21
22 WITH_BF_OPENAL = True
23 WITH_BF_STATICOPENAL = False
24 BF_OPENAL = '/usr'
25 BF_OPENAL_INC = '${BF_OPENAL}/include'
26 BF_OPENAL_LIB = 'openal'
27 BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a'
28
29 BF_CXX = '/usr'
30 WITH_BF_STATICCXX = False
31 BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
32
33 WITH_BF_SDL = True
34 BF_SDL = '/usr' #$(shell sdl-config --prefix)
35 BF_SDL_INC = '${BF_SDL}/include/SDL' #$(shell $(BF_SDL)/bin/sdl-config --cflags)
36 BF_SDL_LIB = 'SDL' #BF_SDL #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer
37
38 WITH_BF_OPENEXR = True
39 WITH_BF_STATICOPENEXR = False
40 BF_OPENEXR = '/usr'
41 # when compiling with your own openexr lib you might need to set...
42 # BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR ${BF_OPENEXR}/include'
43
44 BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR'
45 BF_OPENEXR_LIB = 'Half IlmImf Iex Imath '
46 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'
47 # BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
48
49
50 WITH_BF_DDS = True
51
52 WITH_BF_JPEG = True
53 BF_JPEG = '/usr'
54 BF_JPEG_INC = '${BF_JPEG}/include'
55 BF_JPEG_LIB = 'jpeg'
56
57 WITH_BF_PNG = True
58 BF_PNG = '/usr'
59 BF_PNG_INC = '${BF_PNG}/include'
60 BF_PNG_LIB = 'png'
61
62 BF_TIFF = '/usr'
63 BF_TIFF_INC = '${BF_TIFF}/include'
64
65 WITH_BF_ZLIB = True
66 BF_ZLIB = '/usr'
67 BF_ZLIB_INC = '${BF_ZLIB}/include'
68 BF_ZLIB_LIB = 'z'
69
70 WITH_BF_INTERNATIONAL = True
71
72 BF_GETTEXT = '/usr'
73 BF_GETTEXT_INC = '${BF_GETTEXT}/include'
74 BF_GETTEXT_LIB = 'gettextlib'
75 BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
76
77 WITH_BF_GAMEENGINE = True
78 WITH_BF_PLAYER = True
79
80 WITH_BF_ODE = False
81 BF_ODE = LIBDIR + '/ode'
82 BF_ODE_INC = BF_ODE + '/include'
83 BF_ODE_LIB = BF_ODE + '/lib/libode.a'
84
85 WITH_BF_BULLET = True
86 BF_BULLET = '#extern/bullet2/src'
87 BF_BULLET_INC = '${BF_BULLET}'
88 BF_BULLET_LIB = 'extern_bullet'
89
90 BF_SOLID = '#extern/solid'
91 BF_SOLID_INC = '${BF_SOLID}'
92 BF_SOLID_LIB = 'extern_solid'
93
94 #WITH_BF_NSPR = True
95 #BF_NSPR = $(LIBDIR)/nspr
96 #BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr
97 #BF_NSPR_LIB = 
98
99 # Uncomment the following line to use Mozilla inplace of netscape
100 #CPPFLAGS += -DMOZ_NOT_NET
101 # Location of MOZILLA/Netscape header files...
102 #BF_MOZILLA = $(LIBDIR)/mozilla
103 #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
104 #BF_MOZILLA_LIB =
105 # Will fall back to look in BF_MOZILLA_INC/nspr and BF_MOZILLA_LIB
106 # if this is not set.
107 #
108 # Be paranoid regarding library creation (do not update archives)
109 #BF_PARANOID = True
110
111 # enable freetype2 support for text objects
112 BF_FREETYPE = '/usr'
113 BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
114 BF_FREETYPE_LIB = 'freetype'
115
116 WITH_BF_QUICKTIME = False # -DWITH_QUICKTIME
117 BF_QUICKTIME = '/usr/local'
118 BF_QUICKTIME_INC = '${BF_QUICKTIME}/include'
119
120 WITH_BF_ICONV = False
121 BF_ICONV = LIBDIR + "/iconv"
122 BF_ICONV_INC = '${BF_ICONV}/include'
123 BF_ICONV_LIB = 'iconv'
124 BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
125
126 WITH_BF_BINRELOC = True
127
128 # enable ffmpeg  support
129 WITH_BF_FFMPEG = True  # -DWITH_FFMPEG
130 BF_FFMPEG = '#extern/ffmpeg'
131 BF_FFMPEG_LIB = ''
132 # Uncomment the following two lines to use system's ffmpeg
133 # BF_FFMPEG = '/usr'
134 # BF_FFMPEG_LIB = 'avformat avcodec swscale avutil avdevice'
135 BF_FFMPEG_INC = '${BF_FFMPEG}'
136 BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
137
138 # enable ogg, vorbis and theora in ffmpeg
139 WITH_BF_OGG = False  # -DWITH_OGG 
140 BF_OGG = '/usr'
141 BF_OGG_INC = '${BF_OGG}/include'
142 BF_OGG_LIB = 'ogg vorbis vorbisenc theoraenc theoradec'
143
144 WITH_BF_OPENJPEG = True 
145 BF_OPENJPEG = '#extern/libopenjpeg'
146 BF_OPENJPEG_LIB = ''
147 BF_OPENJPEG_INC = '${BF_OPENJPEG}'
148 BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
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 ##
166 CC = 'gcc'
167 CXX = 'g++'
168 ##ifeq ($CPU),alpha)
169 ##   CFLAGS += -pipe -fPIC -funsigned-char -fno-strict-aliasing -mieee
170
171 CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing']
172
173 CPPFLAGS = ['-DXP_UNIX']
174 CXXFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing']
175 REL_CFLAGS = ['-O2']
176 REL_CCFLAGS = ['-O2']
177 ##BF_DEPEND = True
178 ##
179 ##AR = ar
180 ##ARFLAGS = ruv
181 ##ARFLAGSQUIET = ru
182 ##
183 C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement']
184
185 CC_WARN = ['-Wall']
186
187 ##FIX_STUBS_WARNINGS = -Wno-unused
188
189 LLIBS = ['util', 'c', 'm', 'dl', 'pthread', 'stdc++']
190 ##LOPTS = --dynamic
191 ##DYNLDFLAGS = -shared $(LDFLAGS)
192
193 BF_PROFILE = False
194 BF_PROFILE_CCFLAGS = ['-pg','-g']
195 BF_PROFILE_LINKFLAGS = ['-pg']
196
197 BF_DEBUG = False
198 BF_DEBUG_CCFLAGS = ['-g']
199
200 BF_BUILDDIR = '../build/linux2'
201 BF_INSTALLDIR='../install/linux2'
202 BF_DOCDIR='../install/doc'
203
204
205 #Link against pthread
206 PLATFORM_LINKFLAGS = ['-pthread']
207