post 2.33 release commit of the modified SCons files for Os X.
authorJean-Luc Peurière <jlp@nerim.net>
Sat, 8 May 2004 01:34:39 +0000 (01:34 +0000)
committerJean-Luc Peurière <jlp@nerim.net>
Sat, 8 May 2004 01:34:39 +0000 (01:34 +0000)
Sconstruct modified so that Blender build on 10.3 without any additionnal
download than source + darwin libs.
defaults settings correct for 10.3.

fixed bug # 1260 : added MT_NDEBUG flag at top-level.

SConstruct
extern/qhull/SConscript
extern/solid/SConscript
source/blender/ftfont/SConscript

index de6b485412ccfb11cb98f4a5558faf54f6eff4a7..36eacaa9c2944216df18f4dcbdfa898aaed247f7 100644 (file)
@@ -105,43 +105,51 @@ if sys.platform == 'linux2' or sys.platform == 'linux-i386':
     openal_include = ['/usr/include']
 
 elif sys.platform == 'darwin':
-    use_international = 'false'
-    use_gameengine = 'false'
-    use_openal = 'false'
+    use_international = 'true'
+    use_gameengine = 'true'
+    use_openal = 'true'
     use_fmod = 'false'
     use_quicktime = 'true'
     use_precomp = 'true'
-    use_sumo = 'false'
+    use_sumo = 'true'
     use_ode = 'false'
     use_buildinfo = 'false'
     build_blender_dynamic = 'true'
     build_blender_static = 'false'
     build_blender_player = 'false'
     build_blender_plugin = 'false'
-    # TODO: replace darwin-6.8-powerpc with the actual directiory on the
+    # TODO: replace darwin-6.1-powerpc with the actual directiory on the
     #       build machine
-    darwin_precomp = '#../lib/darwin-6.8-powerpc'
-    extra_flags = ['-pipe', '-fPIC', '-funsigned-char']
+    # darwin-6.1 is the name of cvs precomp folder
+    # a symbolic link named darwin-X.Y-powerpc must be manually done
+    #for now. X-Y is darwin kernel rev number
+    darwin_precomp = '#../lib/darwin-6.1-powerpc/'
+    fink_path = '/sw/'
+    # TODO : try -mpowerpc -mpowerpc-gopt -mpowerpc-gfxopt optims
+    #           doing actual profiling
+    extra_flags = ['-pipe', '-fPIC', '-funsigned-char', '-ffast-math']
     cxxflags = []
-    defines = ['_THREAD_SAFE']
+    defines = ['_THREAD_SAFE', 'MT_NDEBUG']
     if use_quicktime == 'true':
         defines += ['WITH_QUICKTIME']
     warn_flags = ['-Wall', '-W']
-    release_flags = []
+    release_flags = ['-O3']
     debug_flags = ['-g']
     window_system = 'CARBON'
     # z library information
     z_lib = ['z']
     z_libpath = []
     z_include = []
+    # TODO : add a flag to allow each lib to be build from fink or precomp
+    #        without having to have to specify the path manually in config.opts.    
     # png library information
-    png_lib = ['png']
-    png_libpath = []
-    png_include = []
+    png_lib = ['libpng']
+    png_libpath = [darwin_precomp + 'png/lib']
+    png_include = [darwin_precomp + 'png/include']
     # jpeg library information
-    jpeg_lib = ['jpeg']
-    jpeg_libpath = []
-    jpeg_include = []
+    jpeg_lib = ['libjpeg']
+    jpeg_libpath = [darwin_precomp + 'jpeg/lib']
+    jpeg_include = [darwin_precomp + 'jpeg/include']
     # OpenGL library information
     opengl_lib = ['GL', 'GLU']
     opengl_static = []
@@ -152,44 +160,52 @@ elif sys.platform == 'darwin':
     sdl_cflags = sdl_env.Dictionary()['CCFLAGS']
     # Want to use precompiled libraries?
     if use_precomp == 'true':
-        sdl_include = [darwin_precomp + '/sdl/include']
-        sdl_libpath = [darwin_precomp + '/sdl/lib']
+        sdl_include = [darwin_precomp + 'sdl/include']
+        sdl_libpath = [darwin_precomp + 'sdl/lib']
         sdl_lib = ['libSDL.a']
-
     platform_libs = ['stdc++'] 
     extra_includes = ['/sw/include']
     platform_libpath = ['/System/Library/Frameworks/OpenGL.framework/Libraries']
     platform_linkflags = []
     # SOLID library information
-    solid_lib = []                                              # TODO
-    solid_libpath = []                                          # TODO
-    solid_include = ['#extern/solid']
-    qhull_lib = []                                              # TODO
-    qhull_libpath = []                                          # TODO
-    qhull_include = ['#extern/qhull/include']
+    solid_lib = ['libsolid']                                          
+    solid_libpath = [darwin_precomp + 'solid/lib']                                          
+    solid_include = [darwin_precomp + 'solid/include']
+    qhull_lib = ['libqhull']                                          
+    qhull_libpath = [darwin_precomp + 'qhull/lib']                                          
+    qhull_include = [darwin_precomp + 'qhull/include']
     # ODE library information
-    ode_lib = []                                                # TODO
-    ode_libpath = []                                            # TODO
-    ode_include = ['#extern/ode/dist/include/ode']
+    ode_lib = ['libode']                                             
+    ode_libpath = [darwin_precomp + 'ode/lib']                                          
+    ode_include = [darwin_precomp + 'ode/include/ode']
     # Python variables.
-    python_lib = ['python%d.%d' % sys.version_info[0:2]]
-    python_libpath = [sysconfig.get_python_lib (0, 1) + '/config']
-    python_include = [sysconfig.get_python_inc ()]
-    python_linkflags = Split (sysconfig.get_config_var('LINKFORSHARED'))
+    # TODO : fill vars differently if we are on 10.2 or 10.3
+    # python_lib = ['python%d.%d' % sys.version_info[0:2]]
+    # python_libpath = [sysconfig.get_python_lib (0, 1) + '/config']
+    # python_include = [sysconfig.get_python_inc ()]
+    # python_linkflags = Split (sysconfig.get_config_var('LINKFORSHARED'))
+    python_lib = []
+    python_libpath = ['/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/config']
+    python_include = ['/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3']
+    python_linkflags = ['-u', '__dummy', '-u', '_PyMac_Error', 
+                        '-framework', 'System',
+                        '-framework', 'Python',
+                        '-framework', 'CoreServices',
+                        '-framework', 'Foundation']
     # International stuff
     ftgl_lib = ['ftgl']
-    ftgl_libpath = [darwin_precomp + '/ftgl/lib']
-    ftgl_include = [darwin_precomp + '/ftgl/include']
-    freetype_lib = ['freetype']
-    freetype_libpath = [darwin_precomp + '/freetype/lib']
-    freetype_include = [darwin_precomp + '/freetype/include']
-    gettext_lib = []
-    gettext_libpath = []
-    gettext_include = []
+    ftgl_libpath = [darwin_precomp + 'ftgl/lib']
+    ftgl_include = [darwin_precomp + 'ftgl/include']
+    freetype_lib = ['libfreetype']
+    freetype_libpath = [darwin_precomp + 'freetype/lib']
+    freetype_include = [darwin_precomp + 'freetype/include']
+    gettext_lib = ['libintl']
+    gettext_libpath = [darwin_precomp + 'gettext/lib']
+    gettext_include = [darwin_precomp + 'gettext/include']
     # OpenAL library information
-    openal_lib = []
-    openal_libpath = []
-    openal_include = []
+    openal_lib = ['libopenal']
+    openal_libpath = [darwin_precomp + 'openal/lib']
+    openal_include = [darwin_precomp + 'openal/include']
 
 elif sys.platform == 'cygwin':
     use_international = 'false'
@@ -913,29 +929,29 @@ if user_options_dict['USE_QUICKTIME'] == 1:
     link_env.Append (LIBS=['blender_quicktime'])
 
 if user_options_dict['BUILD_GAMEENGINE'] == 1:
-       link_env.Append (LIBS=['KX_blenderhook',
-                                                  'KX_converter',
-                                                  'PHY_Dummy',
-                                                  'PHY_Physics',
-                                                  'KX_ketsji',
-                                                  'SCA_GameLogic',
-                                                  'RAS_rasterizer',
-                                                  'RAS_OpenGLRasterizer',
-                                                  'blender_expressions',
-                                                  'SG_SceneGraph',
-                                                  'blender_MT',
-                                                  'KX_blenderhook',
-                                                  'KX_network',
-                                                  'blender_kernel',
-                                                  'NG_network',
-                                                  'NG_loopbacknetwork'])
-       if user_options_dict['USE_PHYSICS'] == 'solid':
-               link_env.Append (LIBS=['PHY_Sumo', 'PHY_Physics', 'blender_MT', 'extern_solid', 'extern_qhull'])
-       else:
-               link_env.Append (LIBS=['PHY_Ode',
-                                                          'PHY_Physics'])
-               link_env.Append (LIBS=user_options_dict['ODE_LIBRARY'])
-               link_env.Append (LIBPATH=user_options_dict['ODE_LIBPATH'])
+    link_env.Append (LIBS=['KX_blenderhook',
+                           'KX_converter',
+                           'PHY_Dummy',
+                           'PHY_Physics',
+                           'KX_ketsji',
+                           'SCA_GameLogic',
+                           'RAS_rasterizer',
+                           'RAS_OpenGLRasterizer',
+                           'blender_expressions',
+                           'SG_SceneGraph',
+                           'blender_MT',
+                           'KX_blenderhook',
+                           'KX_network',
+                           'blender_kernel',
+                           'NG_network',
+                           'NG_loopbacknetwork'])
+    if user_options_dict['USE_PHYSICS'] == 'solid':
+        link_env.Append (LIBS=['PHY_Sumo', 'PHY_Physics', 'blender_MT', 'extern_solid', 'extern_qhull'])
+    else:
+        link_env.Append (LIBS=['PHY_Ode',
+                               'PHY_Physics'])
+        link_env.Append (LIBS=user_options_dict['ODE_LIBRARY'])
+        link_env.Append (LIBPATH=user_options_dict['ODE_LIBPATH'])
 
 link_env.Append (LIBS=['blender_python'])
 link_env.Append (LIBS=user_options_dict['PYTHON_LIBRARY'])
@@ -961,6 +977,12 @@ if sys.platform == 'darwin':
     link_env.Append (LINKFLAGS='Carbon')
     link_env.Append (LINKFLAGS='-framework')
     link_env.Append (LINKFLAGS='AGL')
+    link_env.Append (LINKFLAGS='-framework')
+    link_env.Append (LINKFLAGS='AudioUnit')
+    link_env.Append (LINKFLAGS='-framework')
+    link_env.Append (LINKFLAGS='AudioToolbox')
+    link_env.Append (LINKFLAGS='-framework')
+    link_env.Append (LINKFLAGS='CoreAudio')
     if user_options_dict['USE_QUICKTIME'] == 1:
         link_env.Append (LINKFLAGS='-framework')
         link_env.Append (LINKFLAGS='QuickTime')
index 1be051c4623e9e43354233f0638c3c03d2059fbb..d1bd0699e2bdace2d7dd6ace325893fb35cc0f9a 100644 (file)
@@ -12,6 +12,8 @@ elif sys.platform=='win32':
        qhull_env.Append (CCFLAGS = ['/O2'])
 elif sys.platform=='sunos':
        qhull_env.Append (CCFLAGS = ['Xc', '-v', '-fast'])
+elif sys.platform=='darwin':
+       qhull_env.Append (CCFLAGS = ['-O2', '-pipe', '-fPIC', '-funsigned-char', '-ffast-math'])
 else:
        qhull_env.Append (CCFLAGS = cflags)
 qhull_env.Append (CPPDEFINES = defines)
index 0ea99337c05ca4098a3e73af823678a151bd8217..e0397f67dc7ce5e9c17b1feab1c4d781ec3a0d6a 100644 (file)
@@ -15,8 +15,12 @@ if sys.platform=='win32':
        #cflags += ['/MT', '/W3', '/GX', '/O2', '/Op']
        cflags += ['/MT', '/W3', '/GX', '/Og', '/Ot', '/Ob1', '/Op', '/G6']
 elif sys.platform=='linux2' or sys.platform=='linux-i386':
-    defines += ['NDEBUG']
-    cflags += ['-O2']
+       defines += ['NDEBUG']
+       cflags += ['-O2']
+elif sys.platform=='darwin' :
+       defines += ['NDEBUG']
+       cflags += ['-O2',  '-pipe', '-fPIC', '-funsigned-char', '-ffast-math']
+
 else:
     print "################################################"
     print 
index bb73cc2cd73b882cd03cbf58afba5ef917e16ca7..81f5b2b603fcfe8f2c25af539527fa2947db8399 100644 (file)
@@ -8,9 +8,10 @@ source_files = ['intern/FTF_Api.cpp',
                 'intern/FTF_TTFont.cpp']
 
 include_paths = ['.',
-                 'intern',
-                 '../blenlib',
-                 '../makesdna']
+               'intern',
+               '../blenkernel',
+               '../blenlib',
+               '../makesdna']
                  
 ftf_env.Append(CPPPATH = extra_includes)
 ftf_env.Append(CPPPATH = include_paths)