6 | | The build system take a configuration file, processes the dependancies, and compiles the desired kernel. |
7 | | |
8 | | Depending on the targeted architecture, the output file may be an ELF (.out), a plain binary file (.bin), an intel-hex file (.hex) or an object file (.o). |
9 | | |
10 | | The build system takes care of dependancies, file modifications, ... |
| 6 | The build system takes a build configuration file and compiles the desired kernel together with the application. |
| 7 | |
| 8 | The build system takes care of dependencies, file modifications, ... And is still simple to use for the beginner. |
| 9 | |
| 10 | Depending on the target architecture, the output file may be an ELF (.out), a plain binary file (.bin), an intel-hex file (.hex) or an object file (.o). |
| 125 | |
| 126 | Have a look to [source:trunk/mutekh/examples/hello] for examples of complete build configuration files. |
| 127 | |
| 128 | == Help display == |
| 129 | |
| 130 | To display the list of all available tokens: |
| 131 | {{{ |
| 132 | $ make CONF=path/to/config_file listconfig |
| 133 | $ make CONF=path/to/config_file listallconfig |
| 134 | }}} |
| 135 | |
| 136 | To display help about a specific token: |
| 137 | {{{ |
| 138 | $ make CONF=path/to/config_file showconfig TOKEN=CONFIG_PTHREAD |
| 139 | }}} |
| 140 | |
| 141 | The [http://www.mutekh.org/www/mutekh_api/ MutekH API reference manual] describes all available configuration tokens too. |
| 142 | |
| 143 | === Module declaration === |
112 | | To display the list of all available tokens, do |
113 | | {{{ |
114 | | $ make listallconfig |
115 | | }}} |
116 | | |
117 | | For a list of current available tokens depending on your configuration file, do |
118 | | {{{ |
119 | | $ make CONF=path/to/config_file listconfig |
120 | | }}} |
| 152 | === Advanced syntax === |
| 153 | |
| 154 | Basic configuration is really simple. Complex applications or multiple target architectures require maintaining multiple configuration files which can be difficult and annoying. The directives presented here can be used to make things easier. |
| 155 | |
| 156 | Build configuration files may contains some directives: |
| 157 | |
| 158 | `%section pattern [pattern ...]`:: |
| 159 | Start a section which will be conditionaly considered depending on the `BUILD` variable. `pattern` is a pattern matching expression which may contain text, hypens and wildcards (e.i. `text-text-*`). Wildcar match non-empty and non-hypens text. |
| 160 | `%common`:: |
| 161 | Revert to unconditional common file part, default at beginning of a file. |
| 162 | `%else`:: |
| 163 | Change current conditional state. |
| 164 | `%include filename`:: |
| 165 | Include a configuration file, the new file always begin in `%common` state. |
| 166 | `%types type [type ...]:: |
| 167 | Specify that the current section exhibits the given types. No more than one section can be in use with the same type. |
| 168 | `%requiretypes type [type ...]`:: |
| 169 | All specified types must have been defined. May be used in sections or common part. |
| 170 | `%set variable content`:: |
| 171 | Set a variable which can be expanded using {{{$(variable)}}} syntax. Environment is initially imported as variables. Moreover {{{$(CONFIGPATH)}}} and {{{$(CONFIGSECTION)}}} are predefined special variables. |
| 172 | `%warning text`:: |
| 173 | Produce a warning message |
| 174 | `%error text`:: |
| 175 | Produce an error message |
| 176 | |
| 177 | The `default` section name is in use when no section name is passed through the `BUILD` variable. |
| 178 | |
| 179 | Have a look to [source:trunk/mutekh/examples/hello/config] for an example of advanced build configuration file. |