1 |
<h1>BuildFile Examples</h1>
|
2 |
<p>
|
3 |
The Default Build is configured at the project level. The default can be
|
4 |
overridden or parameters passed to the default build rules through the
|
5 |
BuildFile.
|
6 |
|
7 |
<p>
|
8 |
Examples of different build files are shown below
|
9 |
<ol>
|
10 |
<li>The Binary Executable<p>
|
11 |
The binary building rules require explicit specification of the binary targets
|
12 |
e.g.
|
13 |
<p>
|
14 |
<pre>
|
15 |
<External ref=cmsim>
|
16 |
<External ref=X11>
|
17 |
<Use ref=CARF>
|
18 |
<bin file=example1.cpp>
|
19 |
You can write between bin tags some documentation to describe what the binary
|
20 |
does
|
21 |
</bin>
|
22 |
<bin file=example2.cpp name=mytestexe>
|
23 |
Here we call the final binary a different name from the default.
|
24 |
</bin>
|
25 |
</Use>
|
26 |
</External>
|
27 |
</External>
|
28 |
</pre>
|
29 |
This file will build two executables called (example1 and mytestexe) from files example1.cpp and example2.cpp respectively. Both are built in the context of
|
30 |
external libraries cmsim and X11 as well as a local package from the same
|
31 |
project called CARF <p>
|
32 |
<em><b>Note: Theres still much work to be done here</b></em><br>
|
33 |
<ul>
|
34 |
<li> Use tag not yet working.
|
35 |
<li> </External> tag does not remove the inclusion of the specified
|
36 |
external package as you might expect.
|
37 |
<li> Anything Outside of the bin tags will be included in the
|
38 |
GNUmakefile. This allows you the full functionality of gmake
|
39 |
to make up for any inadequacies. Hopefully as full scram
|
40 |
binary functionality is achieved this will be phased out
|
41 |
<p>
|
42 |
<li>The library BuildFile
|
43 |
The only time you might want to override this is to exclude some files from a
|
44 |
build or include external package headers or assign the module to a group.
|
45 |
<br>e.g.<p>
|
46 |
<pre>
|
47 |
<Group name=G3>
|
48 |
skip_files := FakeClusterizer.cc SigmaClusterizer.cc
|
49 |
</pre>
|
50 |
<li>Empty Group
|
51 |
Sometimes the default builds arn't wanted at all. Switch them off with
|
52 |
<p>
|
53 |
<pre>
|
54 |
<AssociateGroup>
|
55 |
none
|
56 |
</AssociateGroup>
|
57 |
</pre>
|