Initial contribution of the Adaptation Documentation.
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License
"Eclipse Public License v1.0" which accompanies this distribution,
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
Nokia Corporation - initial contribution.
Contributors:
-->
<!DOCTYPE concept
PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="GUID-FE76E172-6B94-47CC-9551-6DD62C04368D" xml:lang="en"><title>Analysis
of OSS</title><shortdesc>This section explains the tools and tips for effective analysis
of Linux OSS.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
<section id="GUID-533D0116-B744-4DAD-8E4B-4957E911D6C5"> <title>Installing
Linux packages in Linux</title> <ul>
<li><p>Get the latest stable release of OSS from the Internet. Usually OSS
come a in compressed format like <filepath>.tar</filepath>, <filepath>.gz</filepath>,
or <filepath>bz2</filepath>.</p></li>
<li><p>Run the configure script using the following command: <codeph>./configure</codeph>.
It will look for dependency and creates makefiles.</p></li>
<li><p>Compile the code using make tool.</p></li>
<li><p>Copy the files to the target path using the command make install. </p></li>
</ul></section>
<section id="GUID-6A79BF94-03C7-4974-B998-2D91483E08AB"><title>Directory analysis </title><p>OSS
creates the following three subdirectories in the installation directory: <filepath>include</filepath>, <filepath>lib</filepath>,
and <filepath>bin</filepath>. These directories contain valuable information
required for porting, as explained below:</p><ul>
<li><p><b><filepath>include</filepath></b> – This directory contains the user
include files that need to be exported to the proper export directory in Symbian
platform. </p></li>
<li><p><b><filepath>lib</filepath></b> – This directory gives an idea of the
size of the library. It contains libraries built as a result of OSS compilation.
Each of these requires an individual MMP file. </p><note>Symbian platform
compilers produce much smaller-sized libraries than what there are in Linux.</note><table id="GUID-EE2394CB-19F0-4E68-936C-A42AE6AF30EE">
<tgroup cols="2"><colspec colname="col1"/><colspec colname="col2"/>
<tbody>
<row>
<entry><p><b>Linux</b></p></entry>
<entry><p><b>Symbian platform</b></p></entry>
</row>
<row>
<entry><p>.SO extension for dynamic libraries</p></entry>
<entry><p>.DLL extension for dynamic libraries</p></entry>
</row>
<row>
<entry><p>.A extension for static libraries</p></entry>
<entry><p>.LIB extension for static libraries</p></entry>
</row>
</tbody>
</tgroup>
</table></li>
<li><p><b><filepath>bin</filepath></b> – This directory contains the executable
built during the compilation of OSS. </p></li>
<li><p><b><filepath>man</filepath></b> – This directory contains the man pages
of OSS. </p></li>
</ul></section>
<section id="GUID-2CFCDC34-B64D-41E7-B432-EF169EAE6392"><title>Tips and tools</title><p>Tools
like <codeph>nm</codeph>, <codeph>ldd</codeph>, and <codeph>dumpbin</codeph> are
useful in OSS porting:</p><ul>
<li><p><b><codeph>ldd</codeph></b> – A Linux tool that can be used to find
the dependency library list and overall size of the library, obtained by adding
the size of all the dependent libraries. In many cases, to build library 'X'
another library 'Y' is needed.</p></li>
<li><p><b><codeph>nm</codeph></b> – Another Linux tool that prints the symbol
table in alphabetical order from one or more object files.</p></li>
<li><p><b><codeph>dumpbin</codeph></b> – A Windows-based tool that can be
used if Windows port is available for OSS. It gets the list of exported symbols. </p></li>
</ul><p>The following command can be used to install the software in the user
directory: </p><codeblock xml:space="preserve"> ./configure --prefix=$HOME/<foo></codeblock><p>The
following commands can be used to decompress the file:</p><codeblock xml:space="preserve">tar -xvjf archivefile.tar.bz2
tar -zxvf archivefile.tar.bz2</codeblock><p>At the end of installing the OSS
in Linux, it is good to update the environment variables <codeph>PKG_CONFIG_PATH</codeph> and <codeph>LD_LIBRARY_PATH</codeph>.
One of the many ways to initialize environment variables is to add them in
the <filepath>.bash_rc</filepath> file.</p><p>Makefile gives subtle information
about the project. <codeph>SOURCES</codeph> in Makefile gives an idea about
the source files of the OSS. These files have to be listed in <codeph>SOURCE</codeph> in
the MMP file.</p><p><codeph>-D<Foo></codeph> in Makefile gives the list
of preprocessor declarations. These preprocessor declarations can be done
using <codeph>MACRO</codeph> in the MMP file. </p></section>
</conbody></concept>