More robust way of building on 10.6 for a 10.5+ target.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6314 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Soren Jorvang 2010-10-24 20:07:12 +00:00
parent ab53c84dcf
commit 78ab1c0f3f
4 changed files with 14 additions and 23 deletions

View File

@ -489,7 +489,7 @@ Ftp::Response Ftp::GetResponse()
if (In >> Code)
{
// Extract the separator
char Sep;
char Sep = 0;
In.get(Sep);
// The '-' character means a multiline response

View File

@ -260,7 +260,7 @@ void Http::Response::FromString(const std::string& Data)
}
// Extract the status code from the first line
int StatusCode;
int StatusCode = 0;
if (In >> StatusCode)
{
myStatus = static_cast<Status>(StatusCode);

View File

@ -122,28 +122,27 @@ rev = utils.GenerateRevFile(env['flavor'], '.', None)
# OS X specifics
if sys.platform == 'darwin':
ccld = ['-arch', 'x86_64', '-arch', 'i386', '-mmacosx-version-min=10.5']
ccld += ['--sysroot=/Developer/SDKs/MacOSX10.5.sdk']
env['CCFLAGS'] += ccld
env['CCFLAGS'] += ['-msse3']
env['CC'] = "gcc-4.2 -ObjC"
env['CXX'] = "g++-4.2 -ObjC++"
#env['FRAMEWORKPATH'] += [
# '/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks',
# '/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks']
env['FRAMEWORKS'] += ['AppKit', 'CoreFoundation', 'CoreServices']
env['FRAMEWORKS'] += ['AudioUnit', 'CoreAudio']
env['FRAMEWORKS'] += ['IOBluetooth', 'IOKit', 'OpenGL']
env['LIBPATH'] += ['/Developer/SDKs/MacOSX10.5.sdk/usr/lib']
env['LIBS'] = ['gcc_s.10.5', 'iconv', 'SDL']
env['LIBS'] = ['iconv', 'SDL']
env['LINKFLAGS'] += ccld
env['LINKFLAGS'] += ['-Wl,-search_paths_first', '-Wl,-Z']
env['LINKFLAGS'] += [
'-F/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks',
'-F/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks']
env['LINKFLAGS'] += ['-Wl,-search_paths_first']
if platform.mac_ver()[0] < '10.6.0':
env['HAVE_OPENCL'] = 0
else:
env['CCFLAGS'] += ['-Wextra-tokens', '-Wnewline-eof']
env['CCFLAGS'] += ['-iframework/Developer/SDKs/MacOSX10.5.sdk' +
'/System/Library/Frameworks']
env['CCFLAGS'] += ['-iframework/Developer/SDKs/MacOSX10.6.sdk' +
'/System/Library/Frameworks']
env['CPPDEFINES'] += [('HAVE_OPENCL', 1)]
env['HAVE_OPENCL'] = 1
env['FRAMEWORKSFLAGS'] = ['-weak_framework', 'OpenCL']

View File

@ -26,20 +26,12 @@
#define HAVE_OPENCL 1
#endif
// The latest (last?) release of Xcode for Leopard does not include the 10.6
// SDK, so we can only build with OpenCL on a Snow Leopard system where we link
// the OpenCL framework weakly so that the application will also run on 10.5.
#ifdef __APPLE__
#import <Foundation/NSObjCRuntime.h>
#ifdef NSFoundationVersionNumber10_5 // First defined in the 10.6 SDK
#include <OpenCL/opencl.h>
#define HAVE_OPENCL 1
#endif
#endif
#if defined(HAVE_OPENCL) && HAVE_OPENCL
#ifndef __APPLE__
#ifdef __APPLE__
#define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
#include <OpenCL/cl.h>
#else
#include <CL/cl.h>
#endif