Building a PCSL Reference Port (MR1)This document contains instructions for building a PCSL reference port. It has the following sections:
The phoneME Feature software uses the PCSL libraries to build the phoneME Feature software. PCSL contains the following individual services:
Note: Although each PCSL service can be individually built, this guide describes how to build the full PCSL only. To build a default implementation of PCSL, you take the following general steps:
For more information on building individual PCSL services and other build options,
see the
Sun
Java Wireless Client Build Guide.
PCSL Environment VariablesNote: Make a note of the values you choose for these variables. When building the phoneME Feature software, you must set corresponding values. PCSL has three environment variables that can be set, as shown below:
Note: In order for the CLDC and phoneME Feature software build processes to find PCSL output, the variable PCSL_OUTPUT_DIR must be set as a system variable. Setting System Variables on a Linux Platform Note: This document assumes the use of the Bash shell on the Linux platform. If you are using some other shell, set the variables for the shell you are using. To set PCSL_PLATFORM, PCSL_OUTPUT_DIR, and GNU_TOOLS_DIR as Linux system variables, enter the following commands:
$ export PCSL_PLATFORM=linux_arm_gcc
Note: In the variables shown above, $HOME represents the location of your PCSL software. pcsl_output represents the location of the PCSL build output for your target platform (for example, linux_arm). Setting System Variables on a Windows Platform Note: This document assumes the use of Cyg4Me on the Windows platform. To set PCSL_PLATFORM and PCSL_OUTPUT_DIR as Windows system variables, enter the following commands:
$ set PCSL_PLATFORM=win32_i386_vc
Note: In the variables shown above, output represents the location of the PCSL build output for your target platform (for example, win32_i386).
Using PCSL
|
all
|
Builds libraries and public header files for services. Build results are in the $PCSL_OUTPUT_DIR/os_cpu subdirectory. |
doc |
Builds services API document generated by Doxygen. Output is in the $PCSL_OUTPUT_DIR/doc subdirectory. For more information, see Building PCSL Documentation.
|
For more information on PCSL build targets, see the Sun Java Wireless Client Build Guide.
PCSL software is used to build both CLDC and phoneME Feature software. To build CLDC for the Linux/ARM target platform, you must first build PCSL for the Linux/i386 platform. By following the procedures in this section, you can build a default PCSL software reference port that contains libraries, tools, tests, and documentation bundles for your target platform.
Note: The following procedures build more than just the lib and inc directories. However, these are all the only directories needed for software development. For a complete list of directories built on the Linux and Windows platforms, see the Sun Java Wireless Client Build Guide.
Building for a Linux/i386 Platform
$ cd InstallDir/pcsl
$ make GNU_TOOLS_DIR= PCSL_PLATFORM=linux_i386_gcc all
Note: In the command above, the GNU_TOOLS_DIR variable is intentionally left undefined. This lack of definition overrides the previously set variable and prevents the build from picking up the Monta Vista tools used by other Linux platform builds.
When the make command has successfully completed, the following directories exist:
$ cd InstallDir/pcsl
$ make all
When the make command successfully completes, the following directories exist:
Building on a Windows Platform
For example, if you installed the phoneME Feature software in C:\jwc1.1.3, use this command:
$ mount C:\jwc1.1.3\pcsl /jwc1.1.3/pcsl
$ cd InstallDir/pcsl
$ make all
When the make command has successfully completed, the following directories exist:
If you installed the Doxygen tool (from http://www.doxygen.org), you can create HTML documents from porting interfaces. To do this for PCSL, use the make doc build target. The documents are put in the directory $PCSL_OUTPUT_DIR/doc/doxygen/html.
Note: The build system assumes that the Doxygen executable is /usr/bin/doxygen. If your executable is in a different location, edit the Docs.gmk file in the directory InstallDir/pcsl/makefiles/share (where InstallDir is the location of your phoneME Feature software).
Set the DOXYGEN_CMD variable to the appropriate value.
Generating Doxygen Documentation
The following procedure for building Doxygen documentation is the same for both Linux and Windows build platforms.
$ cd InstallDir/pcsl
$ make doc
Viewing PCSL Documents
Use any browser to display the Doxygen output file at the following URL:
file:///$PCSL_OUTPUT_DIR/doc/doxygen/html/index.html