From b9789d12ea23058e24db495340a3fdaead3cd73b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Remko=20Tron=C3=A7on?= <git@el-tramo.be>
Date: Sat, 21 Nov 2009 10:19:13 +0100
Subject: Added ccflags and ldflags config variables.


diff --git a/SConstruct b/SConstruct
index 8a9c75a..728e3c5 100644
--- a/SConstruct
+++ b/SConstruct
@@ -6,6 +6,8 @@ sys.path.append(Dir("BuildTools/SCons").abspath)
 ################################################################################
 
 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"))
@@ -45,6 +47,8 @@ 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" :
-- 
cgit v0.10.2-6-g49f6