×
Namespaces

Variants
Actions
Revision as of 17:19, 27 June 2007 by Cdavies-nokia (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Quick and dirty porting of autoconf apps

From Nokia Developer Wiki
Jump to: navigation, search

Introduction

With the release of the OpenC plugin, it has become far easier to take an existing open source project to Symbian OS. Here's how to take an open source project developed using autotools, and turn it in to a Symbian project fast.

I'm going to be using libxml2 [1] as the example project, but these steps generally work for any project.

Task one: Build a bld.inf file for the project

The first task when porting software to Symbian OS is to write a bld.inf file. For libraries like libxml2, this will export all the appropriate headers to the \epo32\include tree, together with a customised config.h.

Start by opening the appropriate Makefile.am, and locate the list of headers that are exported. In libxml2, this is:

xmlinc_HEADERS = \
SAX.h \
entities.h \
encoding.h \
parser.h \
 
/* ... etc ... */

Copy and paste this in to your bld.inf file, under the heading PRJ_EXPORTS. Rewrite each line to export it to an appropriate subdirectory of \epoc32\include. In this instance, we'll be exporting to \epoc32\include\libxml as shown below:

PRJ_EXPORTS
..\include\libxml\SAX.h libxml\SAX.h
..\include\libxml\entities.h libxml\entities.h
..\include\libxml\encoding.h libxml\encoding.h
..\include\libxml\parser.h libxml\parser.h
 
/* ... etc ... */

Now, create a copy of config.h.in called config.h.symbian, and add an export to your project exports to ex as so:

..\config.h.symbian libxml\config.h
</ocde>
 
Now your exports are complete. From the command line, type bldmake bldfiles followed by abld export to export the headers.
 
== Task two: Building an MMP file ==
 
Create an empty MMP file for your project, and add a boilerplate header to it along these lines:
 
<code>
TARGET libxml2.dll
TARGETTYPE dll
UID 0x1000008d 0xDEADBEEF
VENDORID 0

Where 0xDEADBEEF would be replaced by a UID you've procured from Symbian Signed.

55 page views in the last 30 days.
×