From 5ea846f215b5c7b0c16f718995c5cd763e86a422 Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Tue, 5 Jan 2010 00:12:16 +0100 Subject: SConsctruct: Import CCFLAGS and LINKFLAGS from os.environ. --- SConstruct | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'SConstruct') 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') -- cgit v1.2.3