diff options
| author | Remko Tronçon <git@el-tramo.be> | 2009-11-21 09:19:13 (GMT) |
|---|---|---|
| committer | Remko Tronçon <git@el-tramo.be> | 2009-11-21 09:19:45 (GMT) |
| commit | b9789d12ea23058e24db495340a3fdaead3cd73b (patch) | |
| tree | cd9cf870288dd810e931bfc57f16b7c1c243c517 | |
| parent | 2c8bfd7c49bd16bebbf0b89c01fce7817afab74f (diff) | |
| download | swift-b9789d12ea23058e24db495340a3fdaead3cd73b.zip swift-b9789d12ea23058e24db495340a3fdaead3cd73b.tar.bz2 | |
Added ccflags and ldflags config variables.
| -rw-r--r-- | SConstruct | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -3,12 +3,14 @@ sys.path.append(Dir("BuildTools/SCons").abspath) ################################################################################ # Build variables ################################################################################ vars = Variables("config.py") +vars.Add('ccflags', "Extra C(++) compiler flags") +vars.Add('ldflags', "Extra linker flags") vars.Add(EnumVariable("test", "Compile and run tests", "none", ["none", "all", "unit", "system"])) vars.Add(BoolVariable("optimize", "Compile with optimizations turned on", "no")) vars.Add(BoolVariable("debug", "Compile with debug information", "yes" if os.name != "nt" else "no")) vars.Add(BoolVariable("warnings", "Compile with warnings turned on", "yes" if os.name != "nt" else "no")) if os.name != "nt" : @@ -42,12 +44,14 @@ if env["PLATFORM"] == "darwin" : env.Tool("Nib", toolpath = ["#/BuildTools/SCons/Tools"]) env.Tool("AppBundle", toolpath = ["#/BuildTools/SCons/Tools"]) if env["PLATFORM"] == "win32" : env.Tool("WindowsBundle", toolpath = ["#/BuildTools/SCons/Tools"]) # Default compiler flags +env["CCFLAGS"] = env.get("ccflags", []) +env["LDFLAGS"] = env.get("ldflags", []) if env["optimize"] : env.Append(CCFLAGS = "-O2") if env["PLATFORM"] == "win32" : env.Append(CCFLAGS = ["GL"]) env.Append(LINKFLAGS = ["/INCREMENTAL:NO", "/LTCG"]) |
Swift