More environment improvements

This commit is contained in:
Ali Mashtizadeh 2014-10-09 21:14:58 -07:00
parent 9cdc13e0f5
commit 9c8f3c099b

View File

@ -13,6 +13,8 @@ opts.AddVariables(
("CXX", "C++ Compiler"),
("AS", "Assembler"),
("LINK", "Linker"),
("AR", "Archiver"),
("RANLIB", "Archiver Indexer"),
("BUILDTYPE", "Build type (RELEASE, DEBUG, or PERF)", "RELEASE"),
("VERBOSE", "Show full build information (0 or 1)", "0"),
("NUMCPUS", "Number of CPUs to use for build (0 means auto).", "0"),
@ -37,6 +39,10 @@ if os.environ.has_key('AS'):
env["AS"] = os.getenv('AS')
if os.environ.has_key('LD'):
env["LINK"] = os.getenv('LD')
if os.environ.has_key('AR'):
env["AR"] = os.getenv('AR')
if os.environ.has_key('RANLIB'):
env["RANLIB"] = os.getenv('RANLIB')
if os.environ.has_key('CFLAGS'):
env.Append(CCFLAGS = SCons.Util.CLVar(os.environ['CFLAGS']))
if os.environ.has_key('CPPFLAGS'):
@ -97,6 +103,10 @@ if env["VERBOSE"] == "0":
env["ARCOMSTR"] = "Creating library $TARGET"
env["RANLIBCOMSTR"] = "Indexing library $TARGET"
env["LINKCOMSTR"] = "Linking $TARGET"
env["ASCOMSTR"] = "Assembling $TARGET"
env["ASPPCOMSTR"] = "Assembling $TARGET"
env["ARCOMSTR"] = "Archiving $TARGET"
env["RANLIBCOMSTR"] = "Indexing $TARGET"
def GetNumCPUs(env):
if env["NUMCPUS"] != "0":