Changes between Version 10 and Version 11 of BuildSystem


Ignore:
Timestamp:
Nov 27, 2009, 7:41:44 PM (14 years ago)
Author:
becoulet
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BuildSystem

    v10 v11  
    4242 `kernel`::
    4343   This is the default target. It builds the kernel for the specified configuration file.
     44 `kernel-het`::
     45   This target builds multiple kernels for heterogeneous multiprocessors platforms.
    4446 `clean`::
    45    This cleans all the compilation results
     47   This target cleans all the compilation results
    4648
    4749The following targets are for informational purposes
     
    6466}}}
    6567
    66 == MutekH configuration files ==
    67 
    68 MutekH configuration files contain tokens defining the kernel we are currently building. They must contain:
     68== Build configuration files ==
     69
     70MutekH build configuration files contain tokens defining the kernel we are currently building. They must contain:
    6971
    7072 * the license for the application, enforcing license compatibility between some kernel parts and your code,
     
    7375 * the used drivers
    7476 * some global compilation switches (optimization, debugging, …)
    75 
    76 Syntax is `token` '''space''' `value`. Tokens begin with `CONFIG_`, `value` may be unspecified thus defaults to `defined`. e.g.
     77 * ...
     78
     79Syntax is `token` '''space''' `value`. Tokens begin with `CONFIG_`. Value may be unspecified thus defaults to `defined`. e.g.
    7780{{{
    7881CONFIG_LICENSE_APP_LGPL
     
    9396
    9497# Code compilation options
    95 CONFIG_COMPILE_DEBUG
    96 }}}
    97 
    98 A configuration file may declare a new module, telling the build system the directory where the configuration lies has a local Makefile and some more objects to build.
     98CONFIG_COMPILE_DEBUG undefined
     99
     100...
     101}}}
     102
     103Most common values are `defined` and `undefined` to enable and disables features, but some tokens may need numerical or string values.
     104
     105A build configuration file may declare a new module. Modules can be located anywhere outside of the main source tree. We must tell the build system the directory where the configuration lies. The path to the module directory is usually the same as its configuration file:
    99106{{{
    100107# New source code module to be compiled
    101 CONFIG_MODULES hello:%CONFIGPATH
    102 }}}
    103 
    104 For the list of all available tokens, do
     108# CONFIG_MODULES name:module_dir
     109  CONFIG_MODULES hello:$(CONFIGPATH)
     110}}}
     111
     112To display the list of all available tokens, do
    105113{{{
    106114$ make listallconfig
     
    116124MutekH has a component-based architecture where each module declares its configuration tokens.
    117125
    118 == The xxx.config files ==
     126== The .config constraints files ==
    119127
    120128For each configuration token, one may use the following tags:
     
    148156Example:
    149157{{{
     158%module Module name for documentation
     159
    150160%config CONFIG_SRL
    151161desc MutekS API
    152 provide CONFIG_MODULES=+libsrl:%CONFIGPATH
     162provide CONFIG_MODULES=+libsrl:$(CONFIGPATH)
    153163depend CONFIG_MUTEK_SCHEDULER
    154164depend CONFIG_MWMR
     
    163173 * needing one of `CONFIG_SRL_SOCLIB` or `CONFIG_SRL_STD`,
    164174 * adding the directory containing the .conf as the "libsrl" module
     175
     176Environment variable substitution takes place in both build and constraints configuration files.
    165177
    166178== The directories Makefile syntax & rules ==
     
    175187 `subdirs`::
    176188   A list of subdirectories where more files are to be processed. These directories must exist and contain a `Makefile`.
     189 `doc_headers`::
     190   A list of header files which must be parsed to generate the [http://www.mutekh.org/www/mutekh_api/ MutekH API reference manual], see [wiki:HeaderDoc header documentation] for details.
    177191
    178192Makefiles may contain optional flags that may be used for compilation: