Setting Up Your Build Environment (MR2)

first | prev | next | last

This section describes how to prepare your Linux on i386 or Win32 on i386 build environment for building the JavaCall porting layer (Win32 only), PCSL, CLDC, and phoneME Feature client software.

This document contains the following sections:

To properly use this document, two kinds of variables are set:

Both kinds of variables are described in the following sections.


Setting Up the Linux on i386 Build Environment

To set up the Linux on i386 build environment to build phoneME Feature software for both Linux/i386 and Linux on ARM target platforms, set the optional build variables shown in Table1-1 and the required build variables as shown Table1-2.

Note: If you do not set the optional variables, you must provide an equivalent value when the variable is referred to in this document.
TABLE 1-1Optional Linux on i386 Build Platform Variables

Name

Description

MEHOME

The location where you install the phoneME Feature software. For example, MEHOME=/home/chocolate/phoneME_feature.

Note: /home/chocolate in this example can also be referred to by the convention InstallDir.

BUILD_OUTPUT_DIR

The location where executables and other build output for phoneME Feature components are written. For example, BUILD_OUTPUT_DIR=$MEHOME/build_output.

TABLE 1-2Required Linux on i386 Build Platform Variables

Name

Description

JDK_DIR

The directory that contains the JDK software release. For example, JDK_DIR=/usr/java/j2sdk1.4.2.

PATH

Software development tools used in the Linux on i386 and Linux on ARM build processes, such as JDK software, must be included in your PATH.

Setting Build Variables

  • Set your MEHOME environment variable to the location where you install the phoneME_feature directory.

    $ export MEHOME=InstallDir/phoneME_feature

    Note: InstallDir is the location where you download the phoneME Feature software zip file.

  • Create the directory build_output and set the BUILD_OUTPUT_DIR variable.

    $ mkdir $MEHOME/build_output
    $ export BUILD_OUTPUT_DIR=$MEHOME/build_output

  • Set the JDK_DIR variable.

    $ export JDK_DIR=/usr/java/j2sdk1.4.2

  • Add JDK_DIR to your PATH.

    $ export PATH=$JDK_DIR/bin:$PATH

    Acquiring and Installing Supporting Software

    Depending upon how your Linux on i386 build platform is set up, you might need to acquire the following additional software tools:

    To properly build phoneME Feature software on a Linux on i386 build platform, these tools need to be present in your build environment.

    Note: Instructions for installing supporting software are provided with the software packages.

    In addition, to cross-compile phoneME Feature software for the Linux on ARM (P2 board) target platform, you must acquire and install MontaVista CEE 3.1 ADK developer tools.

    Setting Variables for Supporting Software

    Once you acquire additional build support tools for your Linux on i386 build platform, set additional environment variables as shown in TABLE 1-3.

    TABLE 1-3Required Linux on i386 Supporting Software Variables

    Name

    Description

    GNU_TOOLS_DIR

    Points to the location of MontaVista software development tools, which are used to build for a Linux on ARM target platform. For example, GNU_TOOLS_DIR=/opt/montavista/cee/devkit/arm/v4t_le/armv4tl-hardhat-linux.

    Setting the GNU_TOOLS_DIR Variable

    When building for the Linux on ARM target platform, set the GNU_TOOLS_DIR variable on the make command-line, not as a system variable.

    For ease of use, set the path to the MontaVista tools to a system variable not called by the make files. Then, on the Linux on ARM make command line, you can assign this variable to GNU_TOOLS_DIR. For example,

    Then, on the make command line, to call the MontaVista development tools, you simply enter:

    An example of this variable method is provided here.


    Setting Up the Win32 on i386 Build Environment

    To set up your Win32 on i386 platform, you must take the following general steps:

    Setting Up Your Windows Work Environment

    To properly set up your Windows work environment, you must run the Windows batch file, vcvarsall.bat, using Windows shortnames (without spaces) as shown here:

    The vcvarsall.bat file sets several Windows variables, including LIB, INCLUDE, and others.

    Note: Your directory path to the vcvarsall.bat file might differ from that shown here. To find the shortnames for your directory path, type dir /x.

    If your compiler is Microsoft Visual Studio 2003, you might better set up your Windows work environment using the file VCVARS32.BAT. Run this Windows batch file as shown here:

    Note: The variable %MSVS% points to the location of your Microsoft Visual Studio package.

    Installing Cyg4Me

    Before you build phoneME Feature on a Win32 on i386 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 Win32 on i386 platform.

    2. Unzip the file.

      For example, you could unzip the file into C:\cyg4me.

    Setting Build Platform Environment Variables

    To set up the Win32/i386 build environment to build phoneME Feature software for the JavaCall porting layer on i386 target platform, set the optional build variables shown in Table1-4 and the required build variables as shown Table1-5.

    TABLE 1-4Optional Win32 on i386 Build Platform Variables

    Name

    Description

    MEHOME

    The location where you install the phoneME Feature software. For example, MEHOME=C:/home/chocolate/phoneME_feature.

    Note: /home/chocolate in this example can also be referred to by the convention InstallDir.

    BUILD_OUTPUT_DIR

    The location where executables and other build output for phoneME Feature components are stored. For example, BUILD_OUTPUT_DIR=%MEHOME%/build_output.

    TABLE 1-5Required Win32 on i386 Build Platform Variables

    Name

    Description

    JDK_DIR

    Directory that contains the JDK software release. For example, JDK_DIR=C:/java/j2sdk1.4.2.

    CYG4ME

    Location where you download and unzip Cyg4Me. For example, CYG4ME=C:\cyg4me.

    PATH

    Must be set to include Cyg4Me and other tools used in the Win32 on i386 build process.

    Setting Build Variables

  • Set your MEHOME environment variable to the location where you install the phoneME_feature directory.

    $ set MEHOME=C:/InstallDir/phoneME_feature

  • Create the directory build_output as a folder and set the BUILD_OUTPUT_DIR variable.

    $ set BUILD_OUTPUT_DIR=%MEHOME%/build_output

  • Set the JDK_DIR variable.

    $ set JDK_DIR=C:/java/j2sdk1.4.2

    Note: As shown in this command line, the JDK_DIR path must be set using Linux (forward) slashes.

  • Set the CYG4ME variable, as shown here:

    $ set CYG4ME=C:\cyg4me

  • Add Cyg4Me and JDK_DIR to your PATH environment variable. Make the bin directory of your Cyg4Me installation the first element of your PATH, as shown here.

    $ set PATH=%CYG4ME%\bin;%JDK_DIR%/bin;%PATH%

    Note: If you previously installed Cygwin on your Win32 on i386 platform, remove all PATH elements that point to those previous versions.

    
    
    
    first | prev | next | last