Porting Illustrated: Effective Guide to OSS Porting using Open C |
At the end of this phase, Symbian port should have the bld.inf and MMP files.
An .mmp project definition file specifies the properties of a project in a platform and compiler-independent way. The MMP file is very similar to ‘Makefile’ of Linux. MMP file exists per .SO, .A, or .EXE .
The contents of a sample MMP file created for libjpeg are shown below:
TARGET libjpeg.dll TARGETTYPE DLL UID 0x1000008d 0x0xE0000100 CAPABILITY All -Tcb EpocAllowDllData USERINCLUDE . SYSTEMINCLUDE \epoc32\include\stdapis SYSTEMINCLUDE \epoc32\include SOURCEPATH . // LIBSOURCES SOURCE jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c SOURCE jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c SOURCE jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c SOURCE jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c SOURCE jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c SOURCE jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c SOURCE jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c SOURCE jquant2.c jutils.c jmemmgr.c // SYSDEPSOURCES SOURCE jmemansi.c LIBRARY euser.lib LIBRARY libc.lib MACRO HAVE_CONFIG_H MACRO __SYMBIAN32__
The following table gives a brief introduction to the MMP file keywords found in above file. See Symbian OS technical reference for more details.
Keyword |
Description |
TARGETTYPE |
Target type.Can be DLL, EXE, or LIB. Other types are also supported. For more information, seehttp://www.symbian.com/Developer. |
TARGET |
Name of the target. |
UID |
Unique identifier of the target. It is recommended to use test UIDs from the range 0xE0000000-0xEFFFFFFF which is targeted for development use only. For production quality code, UIDs must be requested from Symbian(https://www.symbiansigned.com/app/page) before the application can be sent for signing. |
CAPABILITY | Capability requirement of the target.
NOTE! Even if the example uses All-TCB capabilities, it is strongly recommended to use a more narrow set of capabilities to have the application successfully signed. For more information, see http://www.symbian.com/Developer. |
EpocAllowDllData |
Allow global static data in the target |
USERINCLUDE |
Local file include path. The compiler will look in this path for the files included with “ ”. For example#include "config.h" |
SYSTEMINCLUDE |
System file include path. The compiler will look in this path for the files included with < >. For example #include <stdio.h> |
SOURCEPATH |
Source path for the source files.s |
SOURCE |
Source file listing. |
LIBRARY |
Dependent DLL library file list. |
STATICLIBRARY |
Dependent static library file list. |
MACRO |
Preprocessor declarations. Makefile declares these preprocessor declarations using –D flag. |
bld.inf is a component definition file, used by bldmake to define the abld.bat and makefiles to be created. bld.inf can be loosely compared to configure script of Linux. There is one bld.inf for entire the OSS. If the project is divided into more than one module, each module can have an individual bld.inf file. Have a look at the contents of the sample MMP file below created for libjpeg.
PRJ_PLATFORMS default PRJ_MMPFILES jpeg.mmp PRJ_EXPORTS jpeglib.h \epoc32\include\jpeg-6b\jpeglib.h jconfig.h \epoc32\include\jpeg-6b\jconfig.h jmorecfg.h \epoc32\include\jpeg-6b\jmorecfg.h jerror.h \epoc32\include\jpeg-6b\jerror.h
The following table gives a brief introduction to the bld.inf keywords.
Keyword |
Description |
PRJ_PLATFORMS |
Platform to which makefiles will be created |
PRJ_MMPFILES |
MMP file list |
PRJ_EXPORTS |
List of public header files for target library users. This list can be prepared by looking at the include directory in Linux installation. |
©Nokia 2007 |