VirtualBox

source: kBuild/trunk/doc/kBuilddocs.c@ 803

Last change on this file since 803 was 785, checked in by bird, 18 years ago

copyright and email updates.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 11.8 KB
Line 
1/* $Id: kBuilddocs.c 785 2007-01-24 22:21:56Z bird $ */
2/** @file
3 * A kBuild Documentation file with the sole purpose of giving doxygen
4 * something to chew on.
5 */
6
7/*
8THIS IS MOSTLY OBSOLETE AND INCORRECT
9THIS IS MOSTLY OBSOLETE AND INCORRECT
10THIS IS MOSTLY OBSOLETE AND INCORRECT
11THIS IS MOSTLY OBSOLETE AND INCORRECT
12THIS IS MOSTLY OBSOLETE AND INCORRECT
13THIS IS MOSTLY OBSOLETE AND INCORRECT
14THIS IS MOSTLY OBSOLETE AND INCORRECT
15THIS IS MOSTLY OBSOLETE AND INCORRECT
16THIS IS MOSTLY OBSOLETE AND INCORRECT
17THIS IS MOSTLY OBSOLETE AND INCORRECT
18*/
19
20/** @mainpage kBuild
21 *
22 * @section kBuild_intro Introduction
23 *
24 * kBuild is a build system which intention is to simplify your makefiles
25 * and to hide cross platform detail for projects.
26 *
27 * kBuild is layered in three tiers, first comes the instructions given in the
28 * makefile, seconds comes the instructions given in a configuration (CFG),
29 * third comes the tool configuration. Now, let me explain by giving an
30 * example - the typical hello world program.
31 *
32 * In the makefile you tell kBuild that there is one program called 'hello'
33 * which shall be built by defining PROGRAMS=hello. This 'hello' target
34 * have one source file 'hello.c', thus hello.SRCS=hello.c. For enabling the
35 * compile time fireworks option WITH_FIREWORKS needs to be #defined, this is
36 * acomplished setting hello_DEFS=WITH_FIREWORKS. The fireworks requires the
37 * libfirecracker.a library, hello_LIBS=firecracker. hello_CFG=gcc.default
38 * tells kBuild that the 'hello' program target is to build using the
39 * configuration called 'gcc.default'.
40 *
41 * The configuration 'gcc.default' can be defined anywhere, but if it's not
42 * defined yet kBuild will load it from the file 'cfg.gcc.default.kMk'.
43 * The configuration contains definitions of how to build all kind of files
44 * and references to the tools to be used and such. The configuration will
45 * ask kBuild to load any tool configurations it needs. These configuration
46 * files are named on the form 'tool.[toolname].kMk'.
47 *
48 * The tool configuration contains callable macros and definitions for
49 * invoking the tool. This process involes setting up required environment
50 * variables, interpreting symblic flags, wrap setting up define and include
51 * arguments (_DEFS, _INCL), executing the tool, and cleaning up.
52 *
53 *
54 *
55 * @section kBuild_makeref Makefile Reference
56 *
57 * The make file must start with including a configuration file which sets up
58 * the inital kBuild environment with all it's standard variables. It's
59 * prefered that you keep one or more include files for a project which figures
60 * out stuff like the root location and includes the kBuild header.kmk file.
61 * For the main config file of a source tree the prefered name is kBuild.kMk.
62 *
63 * After having included the kBuild environment and any additions to it
64 * specific to the source tree (like predefined configurations) setup the main
65 * target clues. The main target clues are what kBuild uses to determin what to
66 * build and how those things are to be built. The clues are put into the
67 * variables PROGRAMS, DLLS, DRIVERS, LIBRARIES, OBJECTS, JARS, CLASSES and
68 * OTHERS. The variables and the attributes of their targets will be explained
69 * in detail later.
70 *
71 * Giving kBuild it's main clues, set the attributes of each of the targets.
72 *
73 * When all target attributes have been set include the kBuild main rules. Do
74 * this by specificly address the include: include $(PATH_KBUILD)/rules.kMk
75 *
76 * If there is need for any rules or your own, put them at the end of the
77 * makefile. Target rules may be used to generate files, or to do special task
78 * during custom passes, or make special targets specified in the OTHERS clue.
79 *
80 *
81 *
82 * @subsection kBuild_attributes Target Attributes
83 *
84 * Target attributes are use to define how to build a target. Some attributes
85 * have several specializations, like the .INCS attribute, a rule of thum is
86 * that the more specialized attributes is given higher precedence when
87 * ordering the result on a commandline or when used internally by kBuild.
88 * For instance, concidering the gcc C compiler, kBuild will pass .CINCS
89 * before .INCS.
90 *
91 * kBuild defines a wide range of target attributes. They might apply
92 * differently to different main targets. See in the section for the main in
93 * question for details on which attributes applicable to targets of that type.
94 *
95 * The attributes can be used on levels with different scope:
96 *
97 * - The broadest scope is gained when using the attribute unqualified,
98 * applying it to all targets in that makefile.
99 *
100 * - Qualifying the attribute with a target name, for instance like
101 * hello.CDEFS, applies that attribute to a target and all it's
102 * dependencies. The target name does not have to be a main target,
103 * allthough for only the main targets may be used without care to
104 * tool or platform specific suffixes or prefixes.
105 *
106 * - Qualifying the attribute with a target name and a immediate
107 * dependant make that attribute apply to that dependant when
108 * made for that specific main target.
109 *
110 *
111 * Possible target attributes:
112 * <dl>
113 * <dt>.FLAGS
114 * <dd>Flags to pass to all tools. The flags are passed unchanged.
115 *
116 * <dt>.CFLAGS
117 * <dd>Flags to pass to the compiler of C source files.
118 *
119 * <dt>.CXXFLAGS
120 * <dd>Flags to pass to the compiler of C++ source files.
121 *
122 * <dt>.AFLAGS
123 * <dd>Flags to pass to the compiler of assembly source files.
124 *
125 * <dt>.JFLAGS
126 * <dd>Flags to pass to the compiler of java source files.
127 *
128 * <dt>.RCFLAGS
129 * <dd>Flags to pass to the compiler of resource source files.
130 *
131 * <dt>.HLPFLAGS
132 * <dd>Flags to pass to the compiler of help source files.
133 *
134 * <dt>.IPFFLAGS
135 * <dd>Flags to pass to the compiler of book (OS/2 IPF) source files.
136 *
137 * <dt>.LFLAGS
138 * <dd>Flags to pass to the linker.
139 *
140 * <dt>.ARFLAGS
141 * <dd>Flags to pass to the librarian.
142 *
143 *
144 * <dt>.OPTS
145 * <dd>Symbolic options passed to compilers and linkers. kBuild defines
146 * (or will soon) a set of generic options used among all the tools
147 * which can be used for better cross tool interoperability.
148 *
149 * Note that allthough generic symbolic options are a nice idea, tools
150 * have different capabilities, so only a very small subset might be
151 * valid for all tools or all tools in a tools group. kBuild will
152 * detect illegal options and complain about it.
153 *
154 * <dt>.COPTS
155 * <dd>Symbolic options passed to the compiler of C source files.
156 *
157 * <dt>.CXXOPTS
158 * <dd>Symbolic options passed to the compiler of C++ source files.
159 *
160 * <dt>.AOPTS
161 * <dd>Symbolic options passed to the compiler of assmebly source files.
162 *
163 * <dt>.JOPTS
164 * <dd>Symbolic options passed to the compiler of java source files.
165 *
166 * <dt>.RCOPTS
167 * <dd>Symbolic options passed to the compiler of resource source files.
168 *
169 * <dt>.HLPOPTS
170 * <dd>Symbolic options passed to the compiler of help source files.
171 *
172 * <dt>.IPFOPTS
173 * <dd>Symbolic options passed to the compiler of book (OS/2 IPF) source files.
174 *
175 * <dt>.LOPTS
176 * <dd>Symbolic options passed to the linker.
177 *
178 * <dt>.AROPTS
179 * <dd>Symbolic options passed to the librarian.
180 *
181 *
182 * <dt>.DEFS
183 * <dd>Definitions to pass to compilers. The attribute contains a list
184 * of definitions with no -D or any other compiler option in front.
185 * If the definition have an value assigned use follow it by and
186 * equal sign and the value, no spaces before or after the equal sign.
187 *
188 * <dt>.CDEFS
189 * <dd>Definitions to pass to the compiler of C source files.
190 *
191 * <dt>.CXXDEFS
192 * <dd>Definitions to pass to the compiler of C++ source files.
193 *
194 * <dt>.ADEFS
195 * <dd>Definitions to pass to the compiler of assmbly source files.
196 *
197 * <dt>.RCDEFS
198 * <dd>Definitions to pass to the compiler of resource source files.
199 *
200 *
201 * <dt>.INCS
202 * <dd>Include path directives passed to compilers. The attribute contains
203 * a list of paths to directory which are to be searched for included
204 * files. The paths shall not be prefixed with any compiler options
205 * like -I, neither shall they be separated with ':' or ';'. Use space
206 * as separator between paths.
207 *
208 * <dt>.CINCS
209 * <dd>Include path directives to pass to the compiler of C source files.
210 *
211 * <dt>.CXXINCS
212 * <dd>Include path directives to pass to the compiler of C++ source files.
213 *
214 * <dt>.AINCS
215 * <dd>Include path directives to pass to the compiler of assmbly source files.
216 *
217 * <dt>.RCINCS
218 * <dd>Include path directives to pass to the compiler of resource source files.
219 *
220 *
221 * <dt>.INS
222 * <dd>For targets which are by default private defining this attribute
223 * cause that target to be installed.
224 *
225 * Note! This attribute is not automatically inherited by subtargets,
226 * i.e. use on makefile scope means it applies to main targets, while
227 * using it on a target scope means that specific target and nothing
228 * else.
229 *
230 * <dt>.PUB
231 * <dd>For targets which are by default private defining this attribute
232 * cause that target to be published.
233 * Note! Same as .INS note.
234 *
235 * <dt>.PRIVATE
236 * <dd>For targets which are by default published and/or installed
237 * defining this attribute will prevent the target from being
238 * installed and publish. This attribute overrides .INS and .PUB.
239 * Note! Same as .INS note.
240 *
241 *
242 * <dt>.INSDIR
243 * <dd>Which subdirectory under the installation root to put the target.
244 *
245 * <dt>.PUBDIR
246 * <dd>Which subdirectory under the publish root to put the target.
247 *
248 *
249 * <dt>.NAME
250 * <dd>Alternative name under which to publish and install the target.
251 * Note! Same as .INS note.
252 *
253 * <dt>.SUFF
254 * <dd>Suffix to append to the target name. Most subtargets have a default
255 * suffix and also some main targets do. This attribute set or
256 * overrides suffix of a target.
257 * Note! Same as .INS note.
258 * Note! Suffix differs from extension in that it includes any leading
259 * dot.
260 *
261 * <dt>.PREF
262 * <dd>Prefix to append to the target name. Some targets (libraries for
263 * instance) have a default prefix. This attribute sets or overrides
264 * the prefix.
265 * Note! Same as .INS note.
266 *
267 *
268 * <dt>.CFG
269 * <dd>The configuration to use when building the target. It is
270 * mandatory that this attribute is present.
271 *
272 * </dl>
273 *
274 *
275 *
276 * @subsection kBuild_makerefclues Main Target Clues
277 *
278 * The main target clues are what tells kBuild what to do. This section will
279 * detail with each of them in some detail.
280 *
281 *
282 * @subsubsection kBuild_PROGRAMS The PROGRAMS Clue
283 *
284 * The PROGRAMS clue gives kBuild a list of executable image targets to be made.
285 *
286 *
287 * @subsubsection kBuild_DLLS The DLLS Clue
288 *
289 * The DLLS clue gives kBuild a list of dynamic link library and shared object
290 * library targets to be made
291 *
292 *
293 * @subsubsection kBuild_DRIVERS The DRIVERS Clue
294 *
295 * The DRIVERS clue gives kBuild a list of driver module targets (OS kernel
296 * modules) to be made.
297 *
298 *
299 * @subsubsection kBuild_LIBRARIES The LIBRARIES Clue
300 *
301 * The LIBRARIES clue gives kBuild a list of object library targets to be made.
302 *
303 *
304 * @subsubsection kBuild_OBJECTS The OBJECTS Clue
305 *
306 * The OBJECTS clue gives kBuild a list of object module targets to be made.
307 *
308 *
309 * @subsubsection kBuild_JARS The JARS Clue
310 *
311 * The JARS clue gives kBuild a list of java archive targets to be made.
312 *
313 *
314 * @subsubsection kBuild_CLASSES The CLASSES Clue
315 *
316 * The CLASSES clue gives kBuild a list of java class targets to be made.
317 *
318 *
319 * @subsubsection kBuild_OTHERS The OTHERS Clue
320 *
321 * The OTHERS clue gives kBuild a list of other targets to be made.
322 *
323 *
324 *
325 */
326
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette