![](https://csdnimg.cn/release/download_crawler_static/5251661/bg9.jpg)
Chapter 4 Installation and calibration
Examples:
# Start configuring using the Qt-based GUI with alternate compilers
$ make xconfig CC=/my/favorite/c/compiler CXX=/my/favorite/c++/compiler
# Reconfiguring a previous build tree, changing the compilers on-the-fly.
$ make reconfig CC=/my/favorite/c/compiler CXX=/my/favorite/c++/compiler
# Rebuild all [and optionally install]
$ make [all [install]]
4.2 Cross-compilation support
To enable the cross-compilation simply add ARCH and CROSS_COMPILE variables as usual to
the standard command lines, e.g.
$ make -f $source_tree/makefile ARCH=arm CROSS_COMPILE=arm-linux-
Names of available architectures can be found under base/arch/*.
4.3 Installing the software
When the standard (or cross-) compilation has finished with no errors you may proceed to the
installation by typing the following commands:
$ cd $builddir
$ make install
Everything needed to use the RTAI distribution will be copied to the default installation
directory, or to the one specified during the configuration of the build tree. From now on, you
should be able to refer to the installation directory as the root of a complete standalone binary
RTAI distribution.
The RTAI programs can also be installed under a temporary staging tree by passing the
standard DESTDIR variable to "make" while installing. e.g.:
$ make install DESTDIR=/mnt/target
this command will create a standard RTAI hierarchy under /mnt/target, keeping the original
prefix information unmodified. If the installation directory selected at configuration time was
"/usr/realtime", then the command above will put the RTAI binary distribution under
/mnt/target/usr/realtime.
WARNING: running "make install" it is required to run several standard RTAI programs correctly.
RTAI 3.x enforces the actual split between the source distribution tree, the build tree where
RTAI is going to be compiled, and the final installation directory where RTAI programs can be
run. In any case, you should only rely on the installation directory contents to run RTAI
programs.
Note:You should also add to your PATH variables the bin directory of the RTAI installation. If you
did not modify the target dir it is /usr/realtime/bin. This is necessary to access directly some
files required to compile and run the programs.
4.4 Compiling parts of the tree
RTAI developers may want to recompile just single parts of the tree from times to times. The
automake-based build system allows it: just go to the proper directory level, then issue "make",
as usual. This process will recurse as needed.
RTAI User Manual 3.4 – October 2006 – rev 0.3 - pag 9