Build Environment (MR1)

first-prev | next | last

This document contains the following sections:

The phoneME Feature software build environment must be set up on your build platform. The build platform is the machine where source code is installed, the compilers are run, and executable code is built. This executable code is then installed and run on a target platform.

The phoneME Feature software supports the following build platforms:

  • Linux/i386
  • Win32/i386

Note: Linux/i386 is not supported as a target platform.

The phoneME Feature software supports the following target platforms:

  • Linux/ARM (Texas Instruments P2SAMPLE64-V6 board)
  • Windows/i386 (which runs the phoneME Feature software in emulation mode)


Requirements for Building on a Linux Platform

To properly build executables for the Linux/ARM target platform, a Linux/i386 build platform must meet the following requirements:

  • Red Hat Linux distribution version 7.2 - 9.0
  • Java 2 Platform, Standard Edition (J2SE™) Development Kit (JDK™) version 1.4.2
  • GNU Make version 3.79.1 or later
  • GNU Cross Compiler (GCC) 3.4.6 or later
  • Doxygen version 1.4.1
  • Development Kit for the Java Card™ Platform 2.2.1

Requirements for Building on a Windows Platform

A Win32/i386 build-target platform must meet the following requirements:

  • Windows 2000 or Windows XP
  • JDK version 1.4.2
  • GNU Make version 3.79.1 or later
  • Microsoft Visual C++ (MSVC++) Professional Version 6.0 or higher (or Visual Studio .NET 2003 or later)
  • Doxygen version 1.4.4
  • Microsoft Processor Pack 5, version 6.15 or later
  • Cyg4Me version 1.1 (a version of Cygwin for building Java ME technology. Cyg4Me contains GNU Make.)
  • Development Kit for the Java Card Platform 2.2.1


make Targets and Options

The phoneME Feature software and its supporting components (PCSL and CLDC) are built using the makefiles and source files provided for each component, using only the component's default settings.

To build a component, set the environment variables and enter the make command:

$ make all

Preparing Your Build Environment

Preparing your environment requires you to set environment variables for your Linux and Windows build platforms. Other environment variables may be needed, specific to the component being built. These are described in the chapter for each component.

BuIld environment variables can be set in two ways:

  • As a system variable
  • On the command line, when you run make

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.

Setting Variables for a Linux Platform

To set a build environment variable as a system variable for a Linux platform, use the following format:

$ export VARIABLE=value

For example, to set MIDP_DIR as a system variable, type:

$ export MIDP_DIR=InstallDir/jwc/midp

Note: InstallDir is the location of your phoneME Feature software.

To set a build environment variable using the make command line for a Linux platform, use the following format:

$ make VARIABLE=value make_target

For example, to set MIDP_DIR on a make command line, type:

$ make MIDP_DIR=InstallDir/jwc/midp all

Setting Variables for a Windows Platform

Note: This document assumes the use of Cyg4Me on the Windows platform.

To set a build environment variable as a system variable for a Windows platform, use the following format:

$ set VARIABLE=value

For example, to set the MIDP_DIR as a system variable, type:

$ set MIDP_DIR=InstallDir/jwc/midp

To set a build environment variable on the make command line for a Windows platform, use the following format:

$ make VARIABLE=value make_target

For example, to set MIDP_DIR on a make command line, type:

$ make MIDP_DIR=InstallDir/jwc/midp all


Setting Up the Linux Build Environment

To set up the Linux/i386 build environment, you must do the following things:

  • Acquire Monta Vista Developer Tools
  • Set Linux platform environment variables

Acquiring Monta Vista Developer Tools

To build phoneME Feature software for the Linux/ARM (P2 board) target platform, you must acquire the MontaVista CEE 3.1 ADK developer tools.

Instructions for use of these tools are provided by MontaVista.

Setting Environment Variables

To properly set up the Linux/i386 build environment, you must set the environment variables shown in TABLE 2-1.

TABLE 2-1 Linux Platform Environment Variables

Name

Description

JDK_DIR

Directory that contains the JDK release.

For example, /usr/java/j2sdk1.4.2.

MIDP_DIR

Top-level MIDP directory, usually InstallDir/jwc/midp.

MIDP_OUTPUT_DIR

Location where output from phoneME Feature build is stored.

LD_LIBRARY_PATH

Directory that contains the libraries needed by the build and run the phoneME Feature software.

GNU_TOOLS_DIR

Build tools for the Linux/i386 platform, used to generate executables for the Linux/ARM target platform.


Setting Up the Windows Build Environment

To set up your Windows platform, you must take the following steps:

  • Install Cyg4Me
  • Set environment variable
  • Update your PATH environment variable

Installing Cyg4Me

Before you build phoneME Feature on a Windows platform, download and install Cyg4Me, version 1.1. Cyg4Me is a standardized version of Cygwin for building Java ME platform products on Windows. It provides the necessary UNIX® system tools, such as sh and gnumake.

  1. Download the Cyg4Me zip file cyg4me1_1_full.zip.

    This file contains all the executables and libraries needed to build on the Windows platform.

  2. Unpack the file into a directory.
  3. For example, you could unpack the file into C:\cyg4me.

  4. Ensure that the Cyg4Me bin directory is the only version of Cygwin on your path.
  5. See Updating Your PATH Environment Variable for instructions.

Setting Environment Variables

To build the phoneME Feature software on a Windows platform, you must set the environment variables shown in TABLE 2-2.


TABLE 2-2 Windows Platform Environment Variables

Name

Description

JDK_DIR

Directory that contains the JDK release.

For example, C:/java/j2sdk1.4.2.

MIDP_DIR

Top-level MIDP directory, usually InstallDir/jwc/midp.

MIDP_OUTPUT_DIR

Location where output from phoneME Feature build is stored.

Updating Your PATH Environment Variable

If you are using a Windows system, you must put Cyg4Me on your PATH environment variable.

  1. Make the bin directory of your Cyg4Me installation the first element of your PATH variable's value.
  2. For example, you could set your PATH in the command window where you build the Java ME platform products with this command:

    $ set PATH=C:\cyg4me\bin;%PATH%

  3. Remove all PATH elements that point to other versions of Cygwin.

    This is necessary because Cyg4Me contains binaries from a specific snapshot of Cygwin. It might not be compatible with other versions of Cygwin installed on the same PC.

    If you performed Step 1 in a command window, perform this step in the same window.

first-prev | next | last