summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2010-05-25 16:13:28 (GMT)
committerKevin Smith <git@kismith.co.uk>2010-05-25 16:13:28 (GMT)
commitd23f3046f26b75e84245b3cb1aa50c14fb534b33 (patch)
tree3354ad245c44f03716378c6c965d2c2a1d59e086 /BuildTools/SCons/SConstruct
parentde03e428157ee60c5d8a13ef121127203f455b3f (diff)
downloadswift-contrib-d23f3046f26b75e84245b3cb1aa50c14fb534b33.zip
swift-contrib-d23f3046f26b75e84245b3cb1aa50c14fb534b33.tar.bz2
Add a mac105 option for building against OS X 10.5 frameworks.
Resolves: #387
Diffstat (limited to 'BuildTools/SCons/SConstruct')
-rw-r--r--BuildTools/SCons/SConstruct12
1 files changed, 12 insertions, 0 deletions
diff --git a/BuildTools/SCons/SConstruct b/BuildTools/SCons/SConstruct
index f210650..8b27722 100644
--- a/BuildTools/SCons/SConstruct
+++ b/BuildTools/SCons/SConstruct
@@ -22,6 +22,7 @@ if os.name == "posix" :
vars.Add(BoolVariable("valgrind", "Run tests with valgrind", "no"))
if os.name == "mac" or (os.name == "posix" and os.uname()[0] == "Darwin"):
vars.Add(BoolVariable("universal", "Create universal binaries", "no"))
+ vars.Add(BoolVariable("mac105", "Link against the 10.5 frameworks", "no"))
if os.name == "nt" :
vars.Add(PathVariable("vcredist", "MSVC redistributable dir", "", PathVariable.PathAccept))
if os.name == "nt" :
@@ -94,6 +95,17 @@ if env.get("universal", 0) :
"-arch", "i386",
"-arch", "ppc"])
+if env.get("mac105", 0) :
+ assert(env["PLATFORM"] == "darwin")
+ env.Append(CCFLAGS = [
+ "-isysroot", "/Developer/SDKs/MacOSX10.5.sdk",
+ "-arch", "i386"])
+ env.Append(LINKFLAGS = [
+ "-mmacosx-version-min=10.4",
+ "-Wl", "-syslibroot,/Developer/SDKs/MacOSX10.5.sdk",
+ "-arch", "i386"])
+
+
if env["warnings"] :
if env["PLATFORM"] == "win32" :
env.Append(CCFLAGS = ["/Wall"])