C/C++ ビルダーは、Construction Variablesと呼ばれる特定の引数のセットを認識します。
これらの変数は、環境で設定するか、質問のようにビルダーを呼び出すときに設定できます。多くの場合、環境に設定する方が簡単なので、ビルダーへの呼び出しが簡単になり、必要な場合にのみ変数を変更します。
次に例を示します。
env = Environment()
# Notice that CPPPATH, CPPDEFINES, LIBS, and LIBPATH dont include the
# compiler flags -I, -D, -l, and -L respectively, SCons will add those
# in a platform independent manner
env.Append(CCFLAGS=['-g', '-O2'])
env.Append(CPPPATH=['some/include/path'])
env.Append(CPPDEFINES=['YOUR_DEFINE'])
env.Append(LIBS=['pthread'])
env.Append(LIBPATH=['some/lib/path'])
# All of these builder calls use the construction
# variables set on the environment above
env.Object('hello.c')
env.Object('goodbye.c')
env.Program('main.cc')
特定の変数をオーバーライドする場合は、次のようにします。
env.Object('hello.c', CPPDEFINES='HELLO')
または、特定の変数に追加する場合は、1 回の呼び出しで次のように実行できます。
env.Object('hello.c', CPPDEFINES=[env['CPPDEFINES'], 'HELLO'])