X
optimize = Environment(CCFLAGS = '-O2')
debug = Environment(CCFLAGS = '-g')
o = optimize.Object('foo-opt', 'foo.c')
optimize.Program(o)
d = debug.Object('foo-debug', 'foo.c')
debug.Program(d)
% scons .
cc -c -g foo.c -o foo-debug.o
cc -o foo-debug foo-debug.o
cc -c -O2 foo.c -o foo-opt.o
cc -o foo-opt foo-opt.o
The &Environment; Constructor
X