Difference between revisions of "build roms"

From WikiROMS
Jump to navigationJump to search
Line 3: Line 3:
An alternative way to compile and link ROMS is to use the <span class="red">build.sh</span> script located in the '''ROMS/Bin''' directory. Instead of editing the [[makefile]] often, the user may generate a build script for each of his/her applications. The build script uses environmental variables that overwrite the makefile targets defined with <span class="red">?=</span> syntax. This means that [[gmake | make]] will check whether an environment variable by that name is set in the script that calls make. The environmental variable take precedence and overwrites makefile default value. Its scope is local to the build script execution, allowing compiling different applications at the same time. There is not need to maintain separate makefiles, or frequently edit the makefile to run separated applications.
An alternative way to compile and link ROMS is to use the <span class="red">build.sh</span> script located in the '''ROMS/Bin''' directory. Instead of editing the [[makefile]] often, the user may generate a build script for each of his/her applications. The build script uses environmental variables that overwrite the makefile targets defined with <span class="red">?=</span> syntax. This means that [[gmake | make]] will check whether an environment variable by that name is set in the script that calls make. The environmental variable take precedence and overwrites makefile default value. Its scope is local to the build script execution, allowing compiling different applications at the same time. There is not need to maintain separate makefiles, or frequently edit the makefile to run separated applications.


   <div class="box">'''Usage:'''<br /><br /><span class="red" style="padding-left:2em">./build.sh [options]</span><br /><br />'''Options:'''<br /><br /><span class="red" style="padding-left:2em;padding-right:70px;">-j N</span>Compile in parallel using <span class="red">N</span> CPUs.  Omit argument to compile on all availabe CPUs.<br /><span class="red" style="padding-left:2em;padding-right:20px;">-noclean</span>Do not clean already compiled objects.</div>
   <div class="box">'''Usage:'''<br /><br /><span class="red" style="padding-left:2em">./build.sh [options]</span><br /><br />'''Options:'''<br /><br /><span class="red" style="padding-left:2em;padding-right:70px;">-j [N]</span>Compile in parallel using <span class="red">N</span> CPUs.  Omit argument to compile on all availabe CPUs.<br /><span class="red" style="padding-left:2em;padding-right:30px;">-noclean</span>Do not clean already compiled objects.<br /><br />'''Example:'''<br /><br /><span class="blue" style="padding-left:2em">./build.sh -j 2</span></div>

Revision as of 16:44, 14 June 2007

Build Script - build.sh

An alternative way to compile and link ROMS is to use the build.sh script located in the ROMS/Bin directory. Instead of editing the makefile often, the user may generate a build script for each of his/her applications. The build script uses environmental variables that overwrite the makefile targets defined with ?= syntax. This means that make will check whether an environment variable by that name is set in the script that calls make. The environmental variable take precedence and overwrites makefile default value. Its scope is local to the build script execution, allowing compiling different applications at the same time. There is not need to maintain separate makefiles, or frequently edit the makefile to run separated applications.

Usage:

./build.sh [options]

Options:

-j [N]Compile in parallel using N CPUs. Omit argument to compile on all availabe CPUs.
-nocleanDo not clean already compiled objects.

Example:

./build.sh -j 2