Differences

This shows you the differences between two versions of the page.

sep:software:sepscons [2009/02/13 02:27]
sjoerd
sep:software:sepscons [2015/05/27 02:06] (current)
Line 12: Line 12:
It is already said that there are many ways to get to the same result in SCons. The examples on this page are often straight forward and offer for much flexibility. It is already said that there are many ways to get to the same result in SCons. The examples on this page are often straight forward and offer for much flexibility.
-The main feature of SEPSCons is a initiation function, that configures a SCons construction environment for our SEP computing environment. After initiating a SEPSCons construction environment one can still change construction keys using the SCons functions ''env.Replace()'', ''env.Append()'' or ''env.Prepend()''.+The main feature of SEPSCons is an Environment initiation function wrapped around the SCons ''Environment'' function. This function configures a SCons construction environment for our SEP computing environment. After initiating a SEPSCons construction environment one can still change construction keys using the SCons functions ''env.Replace()'', ''env.Append()'' or ''env.Prepend()''.
-Very important for your research is the proper implementation of a directory tree to carefully organize the project. A common organization scheme would include a source folder (''/src''), a binary folder (''/bin'') and a result folder (''/fig''). These folders are implementing using SCons functionality. In addition to above three directories, separate module (''/mod'') and object (''/obj'') folders can avoid cluttering of intermediate files into the binary folder. To that objective SEPSCons initiated environments have a ''MODDIR''-key and the ''OBJDIR''-key. The module files are automatically placed in the module folder by the (fortran) compiler. Object files are placed in the object folder, when the alternative SEPSCons builder commands ''env.OProgram'' and ''env.OLibrary()'' are used (see below). These recursively declare Object build entries and than a Program respectively Library build entry.+Very important for your research is the proper implementation of a directory tree to carefully organize the project. SEPSCons handles these with with a class ''Folders''. This class is regularly used by other SEPSCons functions to evaluate where to build from and where to build to.
====== How to use SCons and SEPSCons ====== ====== How to use SCons and SEPSCons ======
Line 83: Line 83:
env.SProgram('driver.f90') env.SProgram('driver.f90')
</code> </code>
 +==== Build, Clean and Burn ==== 
 +Although the target of the above ''SConstruct'' file is ''~/bin/driver.x'', it is aliased under ''driver.x''. Thus running 
 +<code> 
 +>> scons driver.x 
 +</code> 
 +Would build the specific target. All intermediate files can be cleaned running scons with the clean flag: 
 +<code> 
 +>> scons -c driver.x 
 +</code> 
 +or 
 +<code> 
 +>> scons --clean driver.x 
 +</code> 
 +The final target file ''~/bin/driver.x'' was kept save from the clean because SProgram protected it with the SCons ''Noclean'' function. When the target needs to be burned, just run SCons with the burn flag: 
 +<code> 
 +>> scons --burn driver.x 
 +</code> 
 +This will enable clean mode and while the target is not protected by ''Noclean''. Effectively removing all the files created by the initial build.
====== FFTW and OPENMP ====== ====== FFTW and OPENMP ======
/web/html/data/attic/sep/software/sepscons.1234492071.txt.gz · Last modified: 2015/05/26 22:41 (external edit)
www.chimeric.de Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0