[Scons-users] placing object files to one common directory

Michael Lahnert michael.lahnert at ipvs.uni-stuttgart.de
Tue Apr 28 07:22:20 EDT 2015


Hi,

On Tue, 2015-04-28 at 11:31 +0200, Endre Bak wrote:
> " There isn't a good reason to copy objects around IMHO." Placing .o files 
> into the source directory is an ugly thing. And I don't want to copy objects 
> around, I want the compiler to place the .o files directly into the object 
> directory.
> 
> The VariantDir() function doesn't seem to be working at all:

This minimal example actually _is_ working:
env = Environment()
name = 'helloWorld'
srcs = 'helloworld.c
varDir = 'build/'
srcs = varDir + srcs

env.VariantDir("build", ".", duplicate=0)
env.Program(name, srcs)

If you want to Glob your sources together inside a separate source directory,
you may follow the attached slightly more sophisticated example.

Best regards,
Michael

-- 
Dipl.-Inf. Michael Lahnert
Simulation großer Systeme
Institut für Parallele und Verteilte Systeme, Universität Stuttgart
Universitätsstraße 38
70569 Stuttgart | Germany

Tel: +49 (0)711 685 88560
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sconsExample.zip
Type: application/zip
Size: 1214 bytes
Desc: not available
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20150428/29ee2dc2/attachment.zip>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20150428/29ee2dc2/attachment.pgp>


More information about the Scons-users mailing list