
Arcom Embedded Linux Technical Manual Developing software for AEL
Fortunately, automake provides a variable called DESTDIR that is used as the base
folder for installation. DESTDIR is normally an empty string, but you can define it to
install into a temporary folder, as follows:
$ make install DESTDIR=/tmp/target-install
This causes the package to be installed with the standard path names but rooted in
/tmp/target-install. For example, binary packages will be installed in /tmp/target-
install/usr/bin/.
You can now remove from /tmp/target-install any files that you do not want to install on
the target, such as documentation and static libraries (*.a), and transfer it to the board:
$ cd /tmp/target-install
You may also want to use the strip command to remove unnecessary symbols from any
application binaries or libraries:
$ arm-linux-strip --strip-unneeded ./usr/bin/app
$ arm-linux-strip --strip-unneeded ./lib/libtmp.so
Custom build systems and cross compilation
There are projects that use build systems which differ from the system discussed
above. There is no simple recipe for building applications with non-standard or custom
build systems. You must consult build instructions, README files and similar
documentation, study the build system makefiles, and so on.
The RUTE Linux Tutorial (which is on the Development Kit CDROM and online)
contains sections about the use of make and makefiles.
You can normally edit the makefile to prefix all references to tools mentioned in Tools
available in the host environment
(page 36) with the correct cross compilation prefix. A
makefile often defines variables such as CC and CXX to contain the C and C++
compilers respectively. In general, setting environment variables to override these
before running make meets with some success:
$ CC=arm-linux-gcc CXX= arm-linux-g++ make
You must install to a temporary folder so as not to overwrite your build system’s native
libraries and binaries. A custom build system may not make use of the DESTDIR
variable. Consult any documentation you have and examine the makefile for install
targets or similar.
© 2006 Arcom Issue G 39
Comentarios a estos manuales