2008-11-07 19:21:52 +00:00
|
|
|
#
|
|
|
|
# Note : if you want to alter this file
|
|
|
|
# copy it as a whole in the upper folder
|
|
|
|
# as user-config.py
|
|
|
|
# dont create a new file with only some
|
|
|
|
# vars changed.
|
|
|
|
|
|
|
|
import commands
|
|
|
|
|
|
|
|
# IMPORTANT NOTE : OFFICIAL BUILDS SHOULD BE DONE WITH SDKs
|
|
|
|
USE_SDK=True
|
|
|
|
|
|
|
|
BF_PYTHON_VERSION = '2.3'
|
|
|
|
|
|
|
|
cmd = 'uname -p'
|
|
|
|
MAC_PROC=commands.getoutput(cmd)
|
|
|
|
cmd = 'uname -r'
|
|
|
|
cmd_res=commands.getoutput(cmd)
|
|
|
|
if cmd_res[0]=='7':
|
|
|
|
MAC_CUR_VER='10.3'
|
|
|
|
elif cmd_res[0]=='8':
|
|
|
|
MAC_CUR_VER='10.4'
|
|
|
|
else:
|
|
|
|
MAC_CUR_VER='10.5'
|
|
|
|
|
|
|
|
if MAC_PROC == 'powerpc':
|
|
|
|
LCGDIR = '#../lib/darwin-6.1-powerpc'
|
|
|
|
else :
|
|
|
|
LCGDIR = '#../lib/darwin-8.x.i386'
|
2006-08-22 13:04:07 +00:00
|
|
|
LIBDIR = '${LCGDIR}'
|
|
|
|
|
2008-11-07 19:21:52 +00:00
|
|
|
if MAC_PROC== 'powerpc' and BF_PYTHON_VERSION == '2.3':
|
|
|
|
MAC_MIN_VERS = '10.3'
|
|
|
|
MACOSX_SDK='/Developer/SDKs/MacOSX10.3.9.sdk'
|
|
|
|
else:
|
|
|
|
MAC_MIN_VERS = '10.4'
|
|
|
|
MACOSX_SDK='/Developer/SDKs/MacOSX10.4u.sdk'
|
|
|
|
|
|
|
|
|
2007-05-19 22:57:28 +00:00
|
|
|
# enable ffmpeg support
|
2008-11-07 19:21:52 +00:00
|
|
|
WITH_BF_FFMPEG = True # -DWITH_FFMPEG
|
|
|
|
BF_FFMPEG = "#extern/ffmpeg"
|
2007-05-19 22:57:28 +00:00
|
|
|
BF_FFMPEG_INC = '${BF_FFMPEG}/include'
|
2008-11-07 19:21:52 +00:00
|
|
|
if USE_SDK==True:
|
|
|
|
BF_FFMPEG_EXTRA = '-isysroot '+MACOSX_SDK+' -mmacosx-version-min='+MAC_MIN_VERS
|
|
|
|
#BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
|
|
|
|
#BF_FFMPEG_LIB = 'avformat.a avcodec.a avutil.a'
|
2007-05-19 22:57:28 +00:00
|
|
|
|
2008-11-07 19:21:52 +00:00
|
|
|
WITH_BF_VERSE = False
|
2007-05-19 22:57:28 +00:00
|
|
|
BF_VERSE = "#extern/verse/dist"
|
|
|
|
BF_VERSE_LIBPATH = "${BF_BUILDDIR}/extern/verse/dist"
|
|
|
|
BF_VERSE_INCLUDE = BF_VERSE
|
|
|
|
BF_VERSE_LIBS = "libverse"
|
|
|
|
|
2008-11-07 19:21:52 +00:00
|
|
|
# python.org libs install in /library we want to use that for 2.5
|
|
|
|
#
|
|
|
|
# if you want py2.5 on leopard without installing
|
|
|
|
# change value to BF_PYTHON = '/Library/Frameworks/Python.framework/Versions/'
|
|
|
|
# BEWARE: in that case it will work only on leopard
|
|
|
|
|
2007-05-19 22:57:28 +00:00
|
|
|
if BF_PYTHON_VERSION=='2.3':
|
|
|
|
BF_PYTHON = '/System/Library/Frameworks/Python.framework/Versions/'
|
|
|
|
else:
|
|
|
|
BF_PYTHON = '/Library/Frameworks/Python.framework/Versions/'
|
2006-08-22 13:04:07 +00:00
|
|
|
|
2006-02-05 16:25:38 +00:00
|
|
|
BF_PYTHON_INC = '${BF_PYTHON}${BF_PYTHON_VERSION}/include/python${BF_PYTHON_VERSION}'
|
|
|
|
BF_PYTHON_BINARY = '${BF_PYTHON}${BF_PYTHON_VERSION}/bin/python${BF_PYTHON_VERSION}'
|
2006-02-04 14:15:10 +00:00
|
|
|
BF_PYTHON_LIB = ''
|
2006-02-05 16:25:38 +00:00
|
|
|
BF_PYTHON_LIBPATH = '${BF_PYTHON}${BF_PYTHON_VERSION}/lib/python${BF_PYTHON_VERSION}/config'
|
2008-11-07 19:21:52 +00:00
|
|
|
BF_PYTHON_LINKFLAGS = '-u _PyMac_Error -framework System -framework Python'
|
|
|
|
if MAC_CUR_VER=='10.3' or MAC_CUR_VER=='10.4':
|
|
|
|
BF_PYTHON_LINKFLAGS ='-u __dummy '+BF_PYTHON_LINKFLAGS
|
|
|
|
|
|
|
|
BF_QUIET = '1'
|
|
|
|
WITH_BF_OPENMP = '0'
|
|
|
|
|
|
|
|
# Note : should be true, but openal simply dont work on intel
|
|
|
|
if MAC_PROC == 'i386':
|
|
|
|
WITH_BF_OPENAL = False
|
|
|
|
else:
|
|
|
|
WITH_BF_OPENAL = True
|
2007-05-19 22:57:28 +00:00
|
|
|
#different lib must be used following version of gcc
|
|
|
|
# for gcc 3.3
|
|
|
|
#BF_OPENAL = LIBDIR + '/openal'
|
2008-11-07 19:21:52 +00:00
|
|
|
# for gcc 3.4 and ulterior
|
|
|
|
if MAC_PROC == 'powerpc':
|
|
|
|
BF_OPENAL = '#../lib/darwin-8.0.0-powerpc/openal'
|
|
|
|
else :
|
|
|
|
BF_OPENAL = LIBDIR + '/openal'
|
2007-05-19 22:57:28 +00:00
|
|
|
|
2008-11-07 19:21:52 +00:00
|
|
|
WITH_BF_STATICOPENAL = False
|
2006-02-05 16:25:38 +00:00
|
|
|
BF_OPENAL_INC = '${BF_OPENAL}/include'
|
2006-02-04 14:15:10 +00:00
|
|
|
BF_OPENAL_LIB = 'openal'
|
2006-02-05 16:25:38 +00:00
|
|
|
BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
|
2008-11-07 19:21:52 +00:00
|
|
|
# Warning, this static lib configuration is untested! users of this OS please confirm.
|
|
|
|
BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a'
|
|
|
|
|
|
|
|
# Warning, this static lib configuration is untested! users of this OS please confirm.
|
|
|
|
BF_CXX = '/usr'
|
|
|
|
WITH_BF_STATICCXX = False
|
|
|
|
BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
|
2006-02-04 14:15:10 +00:00
|
|
|
|
2008-11-07 19:21:52 +00:00
|
|
|
WITH_BF_SDL = True
|
2006-08-22 13:04:07 +00:00
|
|
|
BF_SDL = LIBDIR + '/sdl' #$(shell sdl-config --prefix)
|
2006-02-05 16:25:38 +00:00
|
|
|
BF_SDL_INC = '${BF_SDL}/include' #$(shell $(BF_SDL)/bin/sdl-config --cflags)
|
2006-02-04 14:15:10 +00:00
|
|
|
BF_SDL_LIB = 'SDL' #BF_SDL #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer
|
2006-02-05 16:25:38 +00:00
|
|
|
BF_SDL_LIBPATH = '${BF_SDL}/lib'
|
2006-02-04 14:15:10 +00:00
|
|
|
|
2008-11-07 19:21:52 +00:00
|
|
|
WITH_BF_FMOD = False
|
2006-08-22 13:04:07 +00:00
|
|
|
BF_FMOD = LIBDIR + '/fmod'
|
2006-02-04 14:15:10 +00:00
|
|
|
|
2008-11-07 19:21:52 +00:00
|
|
|
WITH_BF_OPENEXR = True
|
|
|
|
WITH_BF_STATICOPENEXR = False
|
2007-08-19 18:48:42 +00:00
|
|
|
BF_OPENEXR = '${LCGDIR}/openexr'
|
|
|
|
BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/OpenEXR'
|
2007-05-19 22:57:28 +00:00
|
|
|
BF_OPENEXR_LIB = ' Iex Half IlmImf Imath IlmThread'
|
2007-08-30 18:59:33 +00:00
|
|
|
BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
|
2008-11-07 19:21:52 +00:00
|
|
|
# Warning, this static lib configuration is untested! users of this OS please confirm.
|
|
|
|
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'
|
2006-02-04 14:15:10 +00:00
|
|
|
|
2008-11-07 19:21:52 +00:00
|
|
|
WITH_BF_DDS = True
|
2006-02-04 14:15:10 +00:00
|
|
|
|
2008-11-07 19:21:52 +00:00
|
|
|
WITH_BF_JPEG = True
|
2006-08-22 13:04:07 +00:00
|
|
|
BF_JPEG = LIBDIR + '/jpeg'
|
2006-02-05 16:25:38 +00:00
|
|
|
BF_JPEG_INC = '${BF_JPEG}/include'
|
2006-02-04 14:15:10 +00:00
|
|
|
BF_JPEG_LIB = 'jpeg'
|
2006-02-05 16:25:38 +00:00
|
|
|
BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
|
2006-02-04 14:15:10 +00:00
|
|
|
|
2008-11-07 19:21:52 +00:00
|
|
|
WITH_BF_PNG = True
|
2006-08-22 13:04:07 +00:00
|
|
|
BF_PNG = LIBDIR + '/png'
|
2006-02-05 16:25:38 +00:00
|
|
|
BF_PNG_INC = '${BF_PNG}/include'
|
2006-02-04 14:15:10 +00:00
|
|
|
BF_PNG_LIB = 'png'
|
2006-02-05 16:25:38 +00:00
|
|
|
BF_PNG_LIBPATH = '${BF_PNG}/lib'
|
2006-02-04 14:15:10 +00:00
|
|
|
|
2006-08-22 13:04:07 +00:00
|
|
|
BF_TIFF = LIBDIR + '/tiff'
|
2006-02-05 16:25:38 +00:00
|
|
|
BF_TIFF_INC = '${BF_TIFF}/include'
|
2006-02-04 14:15:10 +00:00
|
|
|
|
2008-11-07 19:21:52 +00:00
|
|
|
WITH_BF_ZLIB = True
|
2006-02-04 14:15:10 +00:00
|
|
|
BF_ZLIB = '/usr'
|
2006-02-05 16:25:38 +00:00
|
|
|
BF_ZLIB_INC = '${BF_ZLIB}/include'
|
2006-02-04 14:15:10 +00:00
|
|
|
BF_ZLIB_LIB = 'z'
|
|
|
|
|
2008-11-07 19:21:52 +00:00
|
|
|
WITH_BF_INTERNATIONAL = True
|
2006-02-05 12:27:49 +00:00
|
|
|
|
2006-08-22 13:04:07 +00:00
|
|
|
BF_GETTEXT = LIBDIR + '/gettext'
|
2006-02-05 16:25:38 +00:00
|
|
|
BF_GETTEXT_INC = '${BF_GETTEXT}/include'
|
2006-02-04 14:15:10 +00:00
|
|
|
BF_GETTEXT_LIB = 'intl'
|
2006-02-05 16:25:38 +00:00
|
|
|
BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
|
2006-02-04 14:15:10 +00:00
|
|
|
|
2008-11-07 19:21:52 +00:00
|
|
|
WITH_BF_FTGL = True
|
2006-02-04 14:15:10 +00:00
|
|
|
BF_FTGL = '#extern/bFTGL'
|
2006-02-05 16:25:38 +00:00
|
|
|
BF_FTGL_INC = '${BF_FTGL}/include'
|
2006-02-04 14:15:10 +00:00
|
|
|
BF_FTGL_LIB = 'extern_ftgl'
|
|
|
|
|
2008-11-07 19:21:52 +00:00
|
|
|
WITH_BF_GAMEENGINE=True
|
|
|
|
WITH_BF_PLAYER=True
|
2006-02-04 14:15:10 +00:00
|
|
|
|
2008-11-07 19:21:52 +00:00
|
|
|
WITH_BF_ODE = False
|
2006-08-22 13:04:07 +00:00
|
|
|
BF_ODE = LIBDIR + '/ode'
|
2006-02-05 16:25:38 +00:00
|
|
|
BF_ODE_INC = '${BF_ODE}/include'
|
|
|
|
BF_ODE_LIB = '${BF_ODE}/lib/libode.a'
|
2006-02-04 14:15:10 +00:00
|
|
|
|
2008-11-07 19:21:52 +00:00
|
|
|
WITH_BF_BULLET = True
|
2006-11-21 06:11:41 +00:00
|
|
|
BF_BULLET = '#extern/bullet2/src'
|
|
|
|
BF_BULLET_INC = '${BF_BULLET}'
|
2006-02-04 14:15:10 +00:00
|
|
|
BF_BULLET_LIB = 'extern_bullet'
|
|
|
|
|
|
|
|
BF_SOLID = '#extern/solid'
|
2006-02-05 16:25:38 +00:00
|
|
|
BF_SOLID_INC = '${BF_SOLID}'
|
2006-02-04 14:15:10 +00:00
|
|
|
BF_SOLID_LIB = 'extern_solid'
|
|
|
|
|
2008-11-07 19:21:52 +00:00
|
|
|
WITH_BF_YAFRAY = True
|
2006-10-18 05:45:47 +00:00
|
|
|
|
2008-11-07 19:21:52 +00:00
|
|
|
#WITH_BF_NSPR = True
|
2006-08-22 13:04:07 +00:00
|
|
|
#BF_NSPR = $(LIBDIR)/nspr
|
2006-02-04 14:15:10 +00:00
|
|
|
#BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr
|
|
|
|
#BF_NSPR_LIB =
|
|
|
|
|
|
|
|
# Uncomment the following line to use Mozilla inplace of netscape
|
|
|
|
#CPPFLAGS += -DMOZ_NOT_NET
|
|
|
|
# Location of MOZILLA/Netscape header files...
|
2006-08-22 13:04:07 +00:00
|
|
|
#BF_MOZILLA = $(LIBDIR)/mozilla
|
2006-02-04 14:15:10 +00:00
|
|
|
#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
|
|
|
|
#BF_MOZILLA_LIB =
|
|
|
|
# Will fall back to look in BF_MOZILLA_INC/nspr and BF_MOZILLA_LIB
|
|
|
|
# if this is not set.
|
|
|
|
#
|
|
|
|
# Be paranoid regarding library creation (do not update archives)
|
2008-11-07 19:21:52 +00:00
|
|
|
#BF_PARANOID = True
|
2006-02-04 14:15:10 +00:00
|
|
|
|
|
|
|
# enable freetype2 support for text objects
|
2006-08-22 13:04:07 +00:00
|
|
|
BF_FREETYPE = LIBDIR + '/freetype'
|
2006-02-05 16:25:38 +00:00
|
|
|
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
|
2006-02-04 14:15:10 +00:00
|
|
|
BF_FREETYPE_LIB = 'freetype'
|
2006-02-05 16:25:38 +00:00
|
|
|
BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
|
2006-02-04 14:15:10 +00:00
|
|
|
|
2008-11-07 19:21:52 +00:00
|
|
|
WITH_BF_QUICKTIME = True # -DWITH_QUICKTIME
|
2006-02-04 14:15:10 +00:00
|
|
|
|
2008-11-07 19:21:52 +00:00
|
|
|
WITH_BF_ICONV = True
|
2006-11-09 15:45:19 +00:00
|
|
|
BF_ICONV = LIBDIR + "/iconv"
|
|
|
|
BF_ICONV_INC = '${BF_ICONV}/include'
|
|
|
|
BF_ICONV_LIB = 'iconv'
|
2008-11-07 19:21:52 +00:00
|
|
|
#BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
|
2006-11-09 15:45:19 +00:00
|
|
|
|
2006-02-04 14:15:10 +00:00
|
|
|
# Mesa Libs should go here if your using them as well....
|
2008-11-07 19:21:52 +00:00
|
|
|
WITH_BF_STATICOPENGL = True
|
2006-02-04 14:15:10 +00:00
|
|
|
BF_OPENGL_LIB = 'GL GLU'
|
|
|
|
BF_OPENGL_LIBPATH = '/System/Library/Frameworks/OpenGL.framework/Libraries'
|
|
|
|
BF_OPENGL_LINKFLAGS = '-framework OpenGL'
|
|
|
|
|
2008-11-07 19:21:52 +00:00
|
|
|
CFLAGS = ['-pipe','-fPIC','-funsigned-char']
|
2006-02-04 14:15:10 +00:00
|
|
|
|
2007-05-19 22:57:28 +00:00
|
|
|
CPPFLAGS = ['-fpascal-strings']
|
2008-11-07 19:21:52 +00:00
|
|
|
CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fpascal-strings']
|
|
|
|
CXXFLAGS = [ '-pipe','-fPIC','-funsigned-char', '-fpascal-strings']
|
2006-03-11 13:33:52 +00:00
|
|
|
PLATFORM_LINKFLAGS = '-fexceptions -framework CoreServices -framework Foundation -framework IOKit -framework AppKit -framework Carbon -framework AGL -framework AudioUnit -framework AudioToolbox -framework CoreAudio -framework QuickTime'
|
2008-11-07 19:21:52 +00:00
|
|
|
|
|
|
|
#note to build succesfully on 10.3.9 SDK you need to patch 10.3.9 by adding the SystemStubs.a lib from 10.4
|
|
|
|
LLIBS = 'stdc++ SystemStubs'
|
|
|
|
|
|
|
|
# some flags shuffling for different Os versions
|
|
|
|
if MAC_MIN_VERS == '10.3':
|
|
|
|
CFLAGS = ['-fuse-cxa-atexit']+CFLAGS
|
|
|
|
CXXFLAGS = ['-fuse-cxa-atexit']+CXXFLAGS
|
|
|
|
PLATFORM_LINKFLAGS = '-fuse-cxa-atexit '+PLATFORM_LINKFLAGS
|
|
|
|
LLIBS = LLIBS + ' crt3.o'
|
|
|
|
|
|
|
|
if USE_SDK==True:
|
|
|
|
SDK_FLAGS=['-isysroot', MACOSX_SDK,'-mmacosx-version-min='+MAC_MIN_VERS]
|
|
|
|
PLATFORM_LINKFLAGS = '-mmacosx-version-min='+MAC_MIN_VERS+ ' -Wl,-syslibroot,' + MACOSX_SDK+" "+PLATFORM_LINKFLAGS
|
|
|
|
CCFLAGS=SDK_FLAGS+CCFLAGS
|
|
|
|
CXXFLAGS=SDK_FLAGS+CXXFLAGS
|
|
|
|
|
|
|
|
# you can add -mssse3 if gcc >= 4.2
|
|
|
|
if MAC_PROC == 'i386':
|
|
|
|
REL_CFLAGS = ['-O2','-ftree-vectorize','-msse','-msse2','-msse3']
|
|
|
|
REL_CCFLAGS = ['-O2','-ftree-vectorize','-msse','-msse2','-msse3']
|
|
|
|
else:
|
|
|
|
CFLAGS = CFLAGS+['-fno-strict-aliasing']
|
|
|
|
CCFLAGS = CCFLAGS+['-fno-strict-aliasing']
|
|
|
|
CXXFLAGS = CXXFLAGS+['-fno-strict-aliasing']
|
|
|
|
|
|
|
|
REL_CFLAGS = ['-O2']
|
|
|
|
REL_CCFLAGS = ['-O2']
|
|
|
|
|
|
|
|
##BF_DEPEND = True
|
2006-02-04 14:15:10 +00:00
|
|
|
##
|
|
|
|
##AR = ar
|
|
|
|
##ARFLAGS = ruv
|
|
|
|
##ARFLAGSQUIET = ru
|
|
|
|
##
|
2006-03-13 12:00:01 +00:00
|
|
|
CC = 'gcc'
|
|
|
|
CXX = 'g++'
|
2008-11-07 19:21:52 +00:00
|
|
|
C_WARN = ['-Wdeclaration-after-statement']
|
2006-02-04 14:15:10 +00:00
|
|
|
|
2008-11-07 19:21:52 +00:00
|
|
|
CC_WARN = ['-Wall', '-Wno-long-double']
|
2006-02-04 14:15:10 +00:00
|
|
|
|
|
|
|
##FIX_STUBS_WARNINGS = -Wno-unused
|
|
|
|
|
|
|
|
##LOPTS = --dynamic
|
|
|
|
##DYNLDFLAGS = -shared $(LDFLAGS)
|
|
|
|
|
2008-11-07 19:21:52 +00:00
|
|
|
BF_PROFILE_CCFLAGS = ['-pg', '-g ']
|
|
|
|
BF_PROFILE = False
|
2006-02-04 14:15:10 +00:00
|
|
|
|
2008-11-07 19:21:52 +00:00
|
|
|
BF_DEBUG = False
|
|
|
|
BF_DEBUG_CCFLAGS = ['-g']
|
2006-02-04 14:15:10 +00:00
|
|
|
|
|
|
|
BF_BUILDDIR='../build/darwin'
|
|
|
|
BF_INSTALLDIR='../install/darwin'
|
2008-11-07 19:21:52 +00:00
|
|
|
BF_DOCDIR='../install/doc'
|