PPI: Add missing TargetDgramWriter doku
[senf.git] / senfscons / Mainpage.dox
index 9b915dc..85ea790 100644 (file)
@@ -33,12 +33,74 @@ namespace senfscons {
     href="http://www.stack.nl/~dimitri/doxygen/">Doxygen</a>. This infrastructure uses quite a bit
     of pre- and postprocessing (which is integrated with the provided Doxygen builder) to fix some
     doxygen problems and generate a (IMHO) more readable layout.
+    
+    \autotoc
 
-    \section layout The Project Layout
+    \section senfutil_overview Building Projects using SENF
 
-    A Project using the SENFSCons infrastructure will always use a consistent directory layout. The
-    top-level directory will contain one subdirectory for every module. The main target will often
-    be considered to be just another module using the facilities provided by library modules.
+    When building projects using senf, SENFSCons has a very simple helper module \ref senfutil to
+    make the building of libraries utilizing senf simpler:
+    \code
+    import sys
+    sys.path.extend(('senf/senfscons','/usr/lib/senf/senfscons'))
+    import os.path, glob, senfutil
+
+    env = Environment()
+
+    senfutil.SetupForSENF( env )
+
+    env.Append(
+
+        LIBS            = [ ],
+        CXXFLAGS        = [ '-Wall', '-Woverloaded-virtual' ],
+        LINKFLAGS       = [ ],
+
+        CXXFLAGS_debug  = [ ],
+        LINKFLAGS_debug = [ ],
+        LOGLEVELS_debug = [ 'senf::log::Debug||VERBOSE' ],
+
+        CXXFLAGS_final  = [ '-O3' ],
+        LINKFLAGS_final = [ ],
+        LOGLEVELS_final = [ ],
+
+        SENF_BUILDOPTS  = [ ],
+
+    )
+
+    env.Default(
+        env.Program( target = 'udpforward',
+                     source = glob.glob('*.cc') )
+    )
+
+    env.Clean(DEFAULT_TARGETS, [ 'udpforward.log', 'udpforward.pid' ])
+    \endcode
+
+    This example builds a simple binary from a number of source files (all '.cc' files). It links
+    against the SENF library and automatically sets all the correct compiler options using
+    <tt>senfutil.SetupForSENF( env )</tt>.
+
+    This script automatically uses a SENF installation either symlinked or imported into the current
+    project in directory 'senf' or, if this directory does not exist, a globaly installed SENF. A
+    locally installed SENF is automatically recompiled if needed. Parallel building is also
+    supported.
+
+    This script automatically supports the \c final and \c LOGLEVELS command line parameters. The
+    LOGLEVELS parameter uses a much more readable syntax than SENF_LOG_CONF:
+    <pre>
+    $ scons -j2 final=1 \
+          LOGLEVELS='senf::log::Debug||IMPORTANT myapp::Transactions|mytrans::Area|VERBOSE'
+    </pre>
+
+    \section senfscons_intro Introduction to the SENFSCons build system
+
+    Here we give an overview on how SENF itself is built. The SENFSCons system aims to be quite
+    flexible at separates SENF specific tasks from generic tasks to facilitate reuse.
+
+    \subsection senfscons_layout The Project Layout
+
+    The SENFSCons infrastructure will always use a consistent directory layout. The top-level
+    directory will contain one subdirectory for every module. The main target will often be
+    considered to be just another module using the facilities provided by library modules.
 
     The top-level project directory must contain the SENFSCons module in 'senfscons'.
 
@@ -50,7 +112,7 @@ namespace senfscons {
     cross-link the different module documentations. The unit-tests as well are run on a per-module
     basis.
 
-    \section Standard Build Configuration
+    \subsection senfscons_buildconf Standard Build Configuration
 
     When the \c SConsctruct and \c SConscript files are build using the default SENFSCons helpers,
     by default all libraries and binaries are built. Some additional targets are