diff options
author | Josep Torra <n770galaxy@gmail.com> | 2012-03-10 12:21:48 +0100 |
---|---|---|
committer | Andoni Morales Alastruey <ylatuya@gmail.com> | 2012-03-20 17:19:14 +0100 |
commit | c44d7759994fe21640dc20581f4d229af1cf4e67 (patch) | |
tree | c6cf9f165d52bff40f30a621fa7ac2c2aa648597 /config | |
parent | c573f94060db2219a65a28fc469d0398723bded7 (diff) |
In OSX build the multiple architectures in different directories. Add support for building in Power PC OSX 10.5 Leopard.
Diffstat (limited to 'config')
-rw-r--r-- | config/darwin.config | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/config/darwin.config b/config/darwin.config index b437a499..a252acfd 100644 --- a/config/darwin.config +++ b/config/darwin.config @@ -3,10 +3,30 @@ from cerbero.config import Architecture if target_arch == Architecture.X86_64: build='x86_64-apple-darwinx' -else: + prefix=prefix or os.path.expanduser('~/cerbero/dist/osx_x86_64') + sources=sources or os.path.expanduser('~/cerbero/sources/osx_x86_64') + cache_file='osx_x86_64' + osx_sdk_version='10.6' +elif target_arch == Architecture.X86: build='i386-apple-darwinx' + prefix=prefix or os.path.expanduser('~/cerbero/dist/osx_i386') + sources=sources or os.path.expanduser('~/cerbero/sources/osx_i386') + cache_file='osx_i386' + osx_sdk_version='10.6' +elif target_arch == Architecture.PPC: + build='powerpc-apple-darwinx' + prefix=prefix or os.path.expanduser('~/cerbero/dist/osx_ppc') + sources=sources or os.path.expanduser('~/cerbero/sources/osx_ppc') + cache_file='osx_ppc' + osx_sdk_version='10.5' + # autotools in OSX 10.5 (Leopard) are a bit oldy/broken. + # Bootstraping the system with macports seems to be enough to build. + # sudo port install git automake libtool gtk-doc + # The following enviorenment variables are needed in order to use the macports + # libtoolize and libtool. + os.environ['LIBTOOLIZE'] = "glibtoolize" + os.environ['LIBTOOL'] = "glibtool" -osx_sdk_version='10.6' sdk_root = '/Developer/SDKs/MacOSX%s.sdk' % osx_sdk_version sdk='-mmacosx-version-min=%s -isysroot %s' % (osx_sdk_version, sdk_root) @@ -19,10 +39,14 @@ if target_arch == Architecture.X86_64: os.environ['CFLAGS'] += ' -arch x86_64 -m64' os.environ['LDFLAGS'] += ' -arch x86_64 -m64' os.environ['CCASFLAGS'] += ' -arch x86_64 -m64' -else: +elif target_arch == Architecture.X86: os.environ['CFLAGS'] += ' -arch i386 -m32' os.environ['LDFLAGS'] += ' -arch i386 -m32' os.environ['CCASFLAGS'] += ' -arch i386 -m32' +if target_arch == Architecture.PPC: + os.environ['CFLAGS'] += ' -arch ppc' + os.environ['LDFLAGS'] += ' -arch ppc' + os.environ['CCASFLAGS'] += ' -arch ppc' os.environ['CFLAGS'] += ' -I%s -I%s' % (os.path.join(prefix, 'include'), os.path.join(sdk_root, 'usr', 'X11', 'include')) os.environ['CXXFLAGS'] += os.environ['CFLAGS'] |