Changes between Version 10 and Version 11 of BuildSystem
- Timestamp:
- Nov 27, 2009, 7:41:44 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
BuildSystem
v10 v11 42 42 `kernel`:: 43 43 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. 44 46 `clean`:: 45 This cleans all the compilation results47 This target cleans all the compilation results 46 48 47 49 The following targets are for informational purposes … … 64 66 }}} 65 67 66 == MutekHconfiguration files ==67 68 MutekH configuration files contain tokens defining the kernel we are currently building. They must contain:68 == Build configuration files == 69 70 MutekH build configuration files contain tokens defining the kernel we are currently building. They must contain: 69 71 70 72 * the license for the application, enforcing license compatibility between some kernel parts and your code, … … 73 75 * the used drivers 74 76 * 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 79 Syntax is `token` '''space''' `value`. Tokens begin with `CONFIG_`. Value may be unspecified thus defaults to `defined`. e.g. 77 80 {{{ 78 81 CONFIG_LICENSE_APP_LGPL … … 93 96 94 97 # 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. 98 CONFIG_COMPILE_DEBUG undefined 99 100 ... 101 }}} 102 103 Most common values are `defined` and `undefined` to enable and disables features, but some tokens may need numerical or string values. 104 105 A 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: 99 106 {{{ 100 107 # 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 112 To display the list of all available tokens, do 105 113 {{{ 106 114 $ make listallconfig … … 116 124 MutekH has a component-based architecture where each module declares its configuration tokens. 117 125 118 == The xxx.configfiles ==126 == The .config constraints files == 119 127 120 128 For each configuration token, one may use the following tags: … … 148 156 Example: 149 157 {{{ 158 %module Module name for documentation 159 150 160 %config CONFIG_SRL 151 161 desc MutekS API 152 provide CONFIG_MODULES=+libsrl: %CONFIGPATH162 provide CONFIG_MODULES=+libsrl:$(CONFIGPATH) 153 163 depend CONFIG_MUTEK_SCHEDULER 154 164 depend CONFIG_MWMR … … 163 173 * needing one of `CONFIG_SRL_SOCLIB` or `CONFIG_SRL_STD`, 164 174 * adding the directory containing the .conf as the "libsrl" module 175 176 Environment variable substitution takes place in both build and constraints configuration files. 165 177 166 178 == The directories Makefile syntax & rules == … … 175 187 `subdirs`:: 176 188 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. 177 191 178 192 Makefiles may contain optional flags that may be used for compilation: