[Scons-users] Per target env variables
Hua Yanghao
huayanghao at gmail.com
Thu Sep 6 16:29:44 EDT 2018
On Thu, Sep 6, 2018 at 2:09 AM Jonathon Reinhart
<jonathon.reinhart at gmail.com> wrote:
>
> env.Program('hello', 'hello.c',
> CFLAGS = env.get('CFLAGS', []) + ['-Os'],
> )
This can even be applied to a per-object basis already, this is what I do:
obj1 = Object(f, CFLAGS = old_cflags + flags1)
...
objN = Object(f, CFLAGS = old_cflags + flagsN)
This way you can customize for each different object a different set
of compilation flags.
More information about the Scons-users
mailing list