[Scons-users] Storing object files in different directory

Christopher Dimech dimech.christopher at gmail.com
Sun Oct 12 12:46:08 EDT 2014


I have noticed that the SConstruct file does not
like indents when writing commands

On 12 October 2014 17:35, Christopher Dimech <dimech.christopher at gmail.com>
wrote:

> There is one thing remaining on this, the .mod file is being created
> at the location of the SConstruct file, i.e. in vik/endian.mod. I want
> to have it created in vik/build/lib. Any way to do this this with .mod
> files. The .mod files is what differs when using fortran, as modules
> create both a .o file as well as a .mod file.
>
>
> On 12 October 2014 17:24, Gary Oberbrunner <garyo at oberbrunner.com> wrote:
>
>> Glad you got it working!
>>
>> On Sun, Oct 12, 2014 at 12:14 PM, Christopher Dimech
>> <dimech.christopher at gmail.com> wrote:
>> > 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
>> >
>> > _______________________________________________
>> > Scons-users mailing list
>> > Scons-users at scons.org
>> > https://pairlist4.pair.net/mailman/listinfo/scons-users
>> >
>>
>>
>>
>> --
>> Gary
>> _______________________________________________
>> Scons-users mailing list
>> Scons-users at scons.org
>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>
>
>
>
> --
> Christopher Dimech
>



-- 
Christopher Dimech
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20141012/00e60de7/attachment.html>


More information about the Scons-users mailing list