S60 Open C
Porting Illustrated: Effective Guide to OSS Porting using Open C

Porting Illustrated: Effective Guide to OSS Porting using Open C

Table of Contents

Analysis of OSS
Installing Linux packages in Linux
Directory analysis
Tips and tools

 


Analysis of OSS

This section explains the tools and tips for effective analysis of Linux OSS.

 


Installing Linux packages in Linux

  • Get the latest stable release of OSS from the Internet. Usually OSS come a in compressed format like .tar, .gz, or bz2.
  • Run the configure script using the following command: ./configure. It will look for dependency and creates makefiles.
  • Compile the code using make tool.
  • Copy the files to the target path using the command make install.

 


Directory analysis

OSS creates the following three subdirectories in the installation directory: include, lib, and bin. These directories contain valuable information required for porting, as explained below:

  • include – This directory contains the user include files that need to be exported to the proper export directory in Symbian OS.
  • lib – 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.

    NOTE: Symbian OS compilers produce much smaller-sized libraries than what there are in Linux.

    Linux Symbian OS

    .SO extension for dynamic libraries

    .DLL extension for dynamic libraries

    .A extension for static libraries

    .LIB extension for static libraries

  • bin – This directory contains the executable built during the compilation of OSS.
  • man – This directory contains the man pages of OSS.

 


Tips and tools

Tools like nm, ldd, and dumpbin are useful in OSS porting:

  • ldd – 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.
  • nm – Another Linux tool that prints the symbol table in alphabetical order from one or more object files.
  • dumpbin – A Windows-based tool that can be used if Windows port is available for OSS. It gets the list of exported symbols.

The following command can be used to install the software in the user directory:

 ./configure --prefix=$HOME/<foo>

The following commands can be used to decompress the file:

tar -xvjf archivefile.tar.bz2 
tar -zxvf archivefile.tar.bz2

At the end of installing the OSS in Linux, it is good to update the environment variables PKG_CONFIG_PATH and LD_LIBRARY_PATH. One of the many ways to initialize environment variables is to add them in the .bash_rc file.

Makefile gives subtle information about the project. SOURCES in Makefile gives an idea about the source files of the OSS. These files have to be listed in SOURCE in the MMP file.

-D<Foo> in Makefile gives the list of preprocessor declarations. These preprocessor declarations can be done using MACRO in the MMP file.

Give feedback of this section


©Nokia 2007

Back to top


This material, including documentation and any related computer programs, is protected by copyright controlled by Nokia. All rights are reserved. Copying, including reproducing, storing, adapting or translating, any or all of this material requires the prior written consent of Nokia. This material also contains confidential information, which may not be disclosed to others without the prior written consent of Nokia.

Nokia is a registered trademark of Nokia Corporation. S60 and logo is a trademark of Nokia Corporation. Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. Other company and product names mentioned herein may be trademarks or tradenames of their respective owners.