[Scons-users] Storing object files in different directory
dimech.christopher at gmail.com
Sat Oct 11 12:33:42 EDT 2014
This SConscript scheme looks similar like recursive
makefiles, which is not much to my liking.
On 11 October 2014 17:12, Dirk Bächle <tshortik at gmx.de> wrote:
> Hi Christopher,
> On 11.10.2014 17:02, Christopher Dimech wrote:
>> The problem I have is that I have two source directories,
>> lib and utils. The directory utils is where the main program
>> resides, lib is where the other fortran files exist. Where should
>> the SConscript file reside?
>> in general it makes sense to have an SConscript in each folder where
> your input files are, and a "module" (=program/library/...) gets built.
> This makes it easier to reference filenames within each "module", because
> these names are interpreted relative to the location of the current
> SConscript file.
> So, in your case I'd have an SConscript in "lib":
> env.Libary('mylib', Glob('*.f'))
> and another one in "utils":
> env.Program('botoh.x', Glob('*.f'))
> . For being able to build both of these "modules" into a Variant dir, I'd
> then add another "SConscript" at top-level:
> and finally call this SConscript from the top-level SConstruct with the
> "variant_dir=" option as:
> env = Environment(...)
> SConscript('SConscript', variant_dir='build')
> Best regards,
> Scons-users mailing list
> Scons-users at scons.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Scons-users