Getting Started with phoneME Feature Software (MR2)

# Building a PCSL Reference Port first | prev | next | last This document contains instructions for building a PCSL reference port. It has the following sections: Building PCSL Software on a Linux/i386 Build Platform Building PCSL Software on a Win32/i386 Build Platform Building PCSL Documentation PCSL libraries are used to build CLDC and the phoneME Feature software client. PCSL contains several individual services, including File, Network, Memory and Print. Follow the procedures in this section to build a default PCSL reference port containing libraries, tools, tests, and documentation bundles for the following target platforms: Linux/i386 Linux/ARM Win32/i386 Note: Although each PCSL service can be individually built, this document describes how to build the full PCSL only. Note: This document is part of the MR2 development release version of phoneME Feature software. The instructions have not been verified or tested. The contents will continue to change as development moves forward. ### Building PCSL Software on a Linux/i386 Build Platform This section describes how to build PCSL on the Linux/i386 build platform, for both Linux/i386 and Linux/ARM target platforms, as shown in Table 3-1. Note: Make a note of the values you choose for these variables. When building the CLDC and phoneME Feature software client, you must set corresponding values. Setting PCSL Environment Variables on a Linux/i386 Build Platform
TABLE 3-1 PCSL Environment Variables for Linux/i386
Name | Description
--- | ---
`PCSL_PLATFORM` | Identifies the target operating system, the target CPU, and the compiler that the build system uses to create the PCSL library. Its value has the form os_cpu_compiler. For example, if you are building PCSL on a Linux/i386 build platform to run on a Linux/i386 target platform, the value of this variable is `linux_i386_gcc`; if building on a Linux/i386 build platform to run on a Linux/ARM target platform, the value of this variable is `linux_arm_gcc`.
`PCSL_OUTPUT_DIR` | Specifies the location where the build system puts PCSL output. For example, this could be `$BUILD_OUTPUT_DIR`/pcsl, with `$BUILD_OUTPUT_DIR` being the directory you defined for build output at the beginning of this guide. Note: In order for the CLDC and phoneME Feature software build processes to find PCSL output, `PCSL_OUTPUT_DIR` must be set as a system variable, not on the `make` command line.
`NETWORK_MODULE` | Defines the transport package used to communicate between PCSL and other components in phoneME Feature software. Must be set to `bsd/generic` to build the Linux/i386 target and to `bsd/qte` to build the Linux/ARM target.
When building on the Linux/i386 build platform, you can build only for the Linux/i386 target platform, only for the Linux/ARM target platform, or for both target platforms. If you build for both target platforms, either one can be built first. Setting a Build Variable for Both Target Platforms The following variable is set once, as a system variable, for building both Linux/i386 and Linux/ARM target platforms. `$ export PCSL_OUTPUT_DIR=$BUILD_OUTPUT_DIR/pcsl` Building for a Linux/i386 Target Platform Change to the PCSL directory. `$ cd $HOME/pcsl` Run the `make` command. Set the `PCSL_PLATFORM` and `NETWORK_MODULE` variables on the command line, as shown here. `$ make PCSL_PLATFORM=linux_i386_gcc NETWORK_MODULE=bsd/generic` The generated PCSL output is found under `$BUILD_OUTPUT_DIR/pcsl`. Building for a Linux/ARM Target Platform Change to the PCSL directory. `$ cd $HOME/pcsl` Run the `make` command. Set the `PCSL_PLATFORM`, `NETWORK_MODULE`, and `GNU_TOOLS_DIR` variables on the command line, as shown here. `$ make PCSL_PLATFORM=linux_arm_gcc NETWORK_MODULE=bsd/qte GNU_TOOLS_DIR=$MONTAVISTA` Note: In the above command line, the variable `$MONTAVISTA` is a shortcut for a much longer command string, as described here. The generated PCSL output is found under `$BUILD_OUTPUT_DIR/pcsl`. ### Building PCSL Software on a Win32/i386 Build Platform This section describes how to build PCSL on the Win32/i386 build platform, for both Win32/i386 and Javacall/i386 target platforms, as shown in Table 3-1. Note: Make a note of the values you choose for these variables. When building the CLDC and phoneME Feature software client, you must set corresponding values. Setting PCSL Environment Variables for a Win32/i386 Build Platform
TABLE 3-2 PCSL Environment Variables for Win32/i386
Name | Description
--- | ---
`PCSL_PLATFORM` | Identifies the target operating system, the target CPU, and the compiler that the build system uses to create the PCSL library. Its value has the form os_cpu_compiler. If building on a Win32/i386 build platform for a Win32/i386 target platform, the value of this variable is `win32_i386_vc`; if building on a Win32/i386 build platform for a JavaCall porting layer platform, the value of this variable is `javacall_i386_vc`. (The `vc` indicates the Microsoft Visual Studio compiler.)
`PCSL_OUTPUT_DIR` | Specifies the location where the build system puts PCSL output. For example, this could be `%BUILD_OUTPUT_DIR%`/pcsl, with `%BUILD_OUTPUT_DIR%` being the directory you defined for build output at the beginning of this guide. Note: In order for the CLDC and phoneME Feature software build processes to find PCSL output, `PCSL_OUTPUT_DIR` must be set as a system variable, not on the `make` command line.
`JAVACALL_OUTPUT_DIR` | If you are building a JavaCall implementation (on a Win32/i386 build platform only), this specifies the location of the JavaCall output. Note: If you have previously built JavaCall, this variable should already be set.
Building for a Win32/i386 Target Platform Mount the phoneME Feature software's PCSL directory. 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` Set environment variables for the Win32/i386 target platform. `$ set PCSL_PLATFORM=win32_i386_vc` `$ set PCSL_OUTPUT_DIR=%BUILD_OUTPUT_DIR%/pcsl` Change directory to the PCSL directory. `$ cd %HOME%/pcsl` Run the `make` command. `$` make The `make` command creates several directories, including `lib` and `inc`, in the following location: `%PCSL_OUTPUT_DIR%/win32_i386` Building for a Javacall/i386 Target Platform To build PCSL for the JavaCall platform, follow the steps shown here: Change directory to the PCSL directory. `$ cd %HOME%/pcsl` Note: If you have previously built the Javacall porting layer, the `JAVACALL_PLATFORM` and `JAVACALL_OUTPUT_DIR` environment variables should already be set. If not, set them as shown here: `$ set JAVACALL_PLATFORM=javacall_i386_vc` `$ set JAVACALL_OUTPUT_DIR=%BUILD-OUTPUT_DIR%/javacall` Run the `make` command. `$` make The `make` command creates several directories, including `lib` and `inc`, in the following location: `%PCSL_OUTPUT_DIR%/javacall_i386` ### Building PCSL Documentation To build Doxygen API documentation in HTML format from PCSL porting interfaces, you must install the Doxygen tool. It can be acquired from: `http://www.doxygen.org` To build documentation for PCSL, use the build target `make doc`. The generated HTML documents are put in the directory `$PCSL_OUTPUT_DIR/doc/doxygen/html`. Generating Doxygen Documentation The following procedure for building Doxygen documentation is the same for both Linux and Windows build platforms. Change to the PCSL directory: `$ cd $HOME/pcsl` Run the `make doc` command: `$ make doc` Note: The build system assumes that the Doxygen executable is in the directory `/usr/bin/doxygen`. If your executable is installed in a different location, use the `DOXYGEN_CMD` variable to define the new location. For example: `$ make DOXYGEN_CMD=doxygen_dir doc` where doxygen_dir is the location of your Doxygen executable. 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`
first | prev | next | last