summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2010-01-05 00:12:16 +0100
committerJon Bergli Heier <snakebite@jvnv.net>2010-01-05 00:12:41 +0100
commit5ea846f215b5c7b0c16f718995c5cd763e86a422 (patch)
tree93765cb01d8453374922c52d897111e007ddabd2
parent8a31fb62fe129d6ae60810a78a9e201ed5bb6c73 (diff)
SConsctruct: Import CCFLAGS and LINKFLAGS from os.environ.
-rw-r--r--SConstruct8
1 files changed, 8 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct
index c16e2a9..3178382 100644
--- a/SConstruct
+++ b/SConstruct
@@ -1,3 +1,5 @@
+import os
+
env = Environment()
conf = Configure(env)
@@ -11,6 +13,12 @@ for lib, h in (('glib-2.0', None), ('sqlite3', 'sqlite3.h'), ('gtk-x11-2.0', Non
Exit(1)
env = conf.Finish()
+if 'CCFLAGS' in os.environ:
+ env.Append(CCFLAGS = os.environ['CCFLAGS'].split())
+
+if 'LINKFLAGS' in os.environ:
+ env.Append(LINKFLAGS = os.environ['LINKFLAGS'].split())
+
env.Append(CCFLAGS = ['-std=gnu99', '-g', '-Wall'])
env.Append(LINKFLAGS = ['-Wl,--export-dynamic'])
env.ParseConfig('pkg-config --cflags --libs glib-2.0')