[Scons-users] Storing object files in different directory
Christopher Dimech
dimech.christopher at gmail.com
Sun Oct 12 12:14:21 EDT 2014
Here is an SConstruct file that works with VariantDir
to create the object files in a build directory. Main program
is being built successfully.
path = ['/bin', '/usr/bin', '/home/cdim/Local/gcc-4.9.0/bin']
env = Environment(
ENV = {'PATH' : path},
tools=['default','gfortran'],
FORTRANFLAGS='-ffree-form -g',
LINK='gfortran',
LINKFLAGS='-g'
)
env.VariantDir (variant_dir = 'build/lib', src_dir = 'lib', duplicate = 0)
env.VariantDir (variant_dir = 'build/utils', src_dir = 'utils', duplicate = 0)
sources = ['build/lib/endian.f', 'build/utils/botoh.f']
# Constructs object files without the .mod
allobjs = env.Object (sources)
objs = filter(lambda o: str(o)[-4:] != '.mod', allobjs)
env.Program (target = 'bin/botoh.x', source = objs)
On 12 October 2014 13:19, Dirk Bächle <tshortik at gmx.de> wrote:
> On 12.10.2014 13:08, Christopher Dimech wrote:
>
>> Have been trying to use a single SConstruct file
>>
>> Here is the code, can't understand what is going wrong
>>
>> While waiting for the understanding to finally set in, you might want to
> fill some time by reading the UserGuide and by looking at real build
> examples...either at http://scons.org/wiki/SconsRecipes or
> http://www.scons.org/wiki/SconsProjects . ;)
>
>
> Dirk
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
--
Christopher Dimech
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20141012/b4868897/attachment.html>
More information about the Scons-users
mailing list