title: How can I reference cousin objects in scons?
body: <p>How can I get objects that are built under separate SConscripts in my program correctly? I have a directory structure that looks similar to this:</p>
  <pre><code>SConstruct
  |
  |---- moduleA
  |     |
  |     ----Sconscript
  |     ----src
  |         |-- sourceA1.cpp
  |         |-- sourceA2.cpp
  |     ----build
  |         |-- sourceA1.o
  |         |-- sourceA2.o
  |    
  |---- moduleB
  |     |
  |     ----Sconscript
  |     ----src
  |         |-- sourceB1.cpp
  |         |-- sourceB2.cpp
  |     ----build
  |         |-- sourceB1.o
  |         |-- sourceB2.o
  | 
  |---- Program
        |
        ----SConscript
        ----src
            | -- main.cpp
  </code></pre>
  <p>moduleA's SConscript might look like this (moduleB is similar):</p>
  <pre><code>moduleEnv = env.Clone()
  srcFiles = [ 'src/sourceA1.cpp', 'src/sourceA2.cpp' ]
  
  obj = moduleEnv.Object(srcFiles)
  
  </code></pre>
  <p>In my Program, I need to use the object files to build. I don't want to use a bunch of hard coded paths to do this. Is there any way that the SConscript for the program can reference the objects of the modules?</p>
  <p>Program's SConscript</p>
  <pre><code>progEnv = env.Clone()
  
  objectsList = [ Objects from the modules ] # Is this possible, or is the a better way?
  
  prog = progEnv.Program('myprogram', [ objectList, 'src/main.cpp'])
  </code></pre>