Contents Previous Next Index

Appendix   B

Configuration Options


Configuration options provide a way to balance memory consumption and functionality by producing targets with different levels of functionality. You can change one or more configuration options, or accept the default configuration.

This appendix covers configuration options in the sections:

The sections have tables of configuration options. The tables list the options in alphabetical order.

B.1 Build Tools and Their Options

The following tables present configuration options that control the command names used by the build environment and their common command options. The tables do not contain lists of files and directory names that might be used by the commands (unless they are common and used by only one command). The configuration options that contain lists of files and directory names are in Section B.2 "File Lists and Locations" .

TABLE 10 C Compiler Command and Common Command Options  
Option
Type
Default Value on Windows 2000
Description
CC 
String 
cl 
Compiler command
CC_OUTPUT 
String 
-Fo 
Argument used with the C compiler to generate the compiled (.o) file, so that it appears in the right directory
CMDLINE_CFLAGS 
String 
““ 
Compiler arguments that are defined on the makefile command-line
 
Note: Do not set or change this configuration option within the makefiles.
EXTRA_CFLAGS 
String 
-DWIN32 -nologo -D_MT -MT -O2 -DUSE_KVM=1 -DGENERIC_IO_WAIT_TIME=10 -DROMIZING=1 -DMAXIMUMHEAPSIZE=500000 
-DENABLE_JAVA_DEBUGGER=0 -DINCLUDE_I18N -DUSE_DEBUG_COLLECTOR=0 
-DENABLEPROFILING=0 -DRELEASE=\dist" -DIMPL_VERSION="2.0" 
-DFULL_VERSION=":10.23.02-09:58" -DPLATFORMNAME="j2me" 
Additional arguments for the C compiler
EXTRA_INCLUDES 
String 
-I$(MIDP_DIR)/src/share/native/i18n -I$(MIDP_DIR)/src/<platform>/native/i18n -I$(MIDP_DIR)/src/<platform>/native -I$(MIDP_DIR)/src/<platform>/native/kvm -I$(MIDP_DIR)/src/share/native -I$(MIDP_DIR)/src/share/native/kvm -I$(MIDP_DIR)/src/share/native/crypto -I$(MIDP_DIR)/src/<platform>/native/xpm/include -I$(MIDP_DIR)/src/<platform>/native/png/include  
Additional directories that the C compiler should search for header files
GCC 
boolean 
false 
Whether to use the gcc compiler to compile native methods

If this value is false, the compiler specified by the CC option is used.
MAXIMUMHEAPSIZE 
String 
500000 
Amount of memory to be set aside for the heap, in bytes (such as 500000), kilobytes (such as 500k) or megabytes (such as 1M).
OBJ_DIR 
String 
obj$(g)$(ARCH_DIR) 
Directory to hold object files
OBJ_SUFFIX 
String 
obj 
Suffix of the object files generated by the C compiler

  

TABLE 11  –  Debugging Command (Extract Offsets) and Common Command Options  
Option
Type
Default Value on Windows 2000
Description
EXTRACT_OFFSETS_CMD 
String 
$(BINDIR)/extractOffsets $(g)$(EXE) 
Command that generates header files with offsets into the classes of the Java programming language
EXTRACT_OFFSETS_INCDIR 
String 
$(BUILD_DIR)/include 
Directory to search for header files used to build the extract offsets tool
EXTRACT_OBJ_DIR 
String 
extract_obj$(g)$(ARCH_DIR) 
Directory to hold object files
g 
String 
““ 
Suffix of debug-enabled object directory

  

TABLE 12  –  Commands and Common Command Options Related to the Java Programming Language  
Option
Type
Default Value on Windows 2000
Description
JAR 
String 
$(BOOTDIR)/bin/jar$(EXE) 
Command that runs the jar utility
JAVA 
String 
$(BOOTDIR)/bin/java$(EXE) 
Command that runs the Java programming language interpreter
JAVAC 
String 
$(BOOTDIR)/bin/javac$(EXE) 
Command that runs the compiler for the Java programming language
JAVADOC 
String 
$(BOOTDIR)/bin/javadoc$(EXE) 
Command that runs the Javadoc™ tool
JCC_CMD 
String 
$(JCC_DIR)/JavaCodeCompact.class 
Command that runs a compression utility on compiled Java application files
JCC_DIR 
String 
$(BUILD_DIR)/jcc_classes 
Directory that holds the output from running the JCC_CMD
PATHSEP 
String 
; 
Path separator for the
-classpath argument

 

TABLE 13  –  KVM and MIDP Related Commands and Common Command Options  
Option
Type
Default Value on Windows 2000
Description
CA_KEYSTORE 
String  
$(STORAGEDIR)/_main.ks 
Keystore that MIDP uses when it does secure communications
EXE 
String 
.exe 
Suffix to place at the end of executable programs
EX_SERVER_URL 
String 
http://localhost/ 
URL prefix to use for MIDlet-JAR-URL tag when creating the example MIDlets
 
The name of the JAR file will be appended to this string.
KDP_CMD 
String 
$(BINDIR)/kdp.jar 
Command for the KVM Debug Proxy
MIDP_CMD 
String 
midp 
Command to start the MIDP executable
PREVERIFY_CMD 
String 
$(BINDIR)/preverify$(EXE) 
Command to preverify class files
ROMJAVA 
String 
ROMjavaWin 
Name of the file that holds the results of converting the class files in classes.zip to an object-file format for linking with the KVM
VM 
String 
kvm 
The virtual machine used with this release of MIDP
VM_INCLUDES 
String 
-I$(KVM_DIR)/cldc/1.0.4/kvm/VmCommon/h -I$(KVM_DIR)/cldc/1.0.4/kvm/VmExtra/h -I$(EXTRACT_OFFSETS_INCDIR) -I$(KVM_DIR)/cldc/1.0.4/kvm/VmWin/h  
Directories to search for header files needed to build the virtual machine
VERIFYDIR 
String  
$(BUILD_DIR)/tmpclasses 
The temporary directory that holds the compiled files that will be processed by the preverifier

 

TABLE 14  –  Linking Command and Command Options  
Option
Type
Default Value on Windows 2000
Description
LD 
String 
link 
Linker command
LIBS 
String 
user32.lib  gdi32.lib kernel32.lib winmm.lib wsock32.lib imm32.lib 
Libraries to append at link stage
LINKER_OUTPUT 
String 
-out: 
Argument used with the linker to generate an executable so that it appears in the right directory

 

TABLE 15  –  Command to Create Zip Files  
Option
Type
Default Value on Windows 2000
Description
ZIP 
String 
zip 
Command used to create zip files
 
The command must be able to create ZIP files using the following command options:
-qr 
If your zip command uses different command options, you must edit the makefiles where the ZIP option appears.
UNZIP 
String 
unzip 
Command used to extract files from ZIP files
 
The command must be able to unpack zip files using the following options:
-q -u 
If your zip command uses different command options, you must edit the makefiles where the UNZIP option appears.

B.2 File Lists and Locations

The following tables present configuration options that set directory names and lists of files:

TABLE 16 Lists of Files  
Option
Type
Default Value on Windows 2000
Description
EXAMPLE_EXCLUDE_CLASSES 
String 
SCCS|HelloMIDlet|i18n 
Any class files to exclude from examples
EXAMPLE_INCLUDE_CLASSES 
String 
““ 
Any .class files to include from the examples
EXAMPLE_SOURCE_FILES 
String 
Any .java files found in the $(MIDP_DIR)/src/example/ directory, excluding files that match any of the patterns listed in $(EXAMPLE_EXLUDE_
CLASSES)
.
Example files to compile
EXTRA_CLASS_FILES 
String 
““ 
Any .class files to include from some other tree
 
If you give this option a value, you must also define the proper target(s) to build the classes in this list.
SSL_SOURCE_FILES 
String 
any .java files found in the $(MIDP_DIR)/src/share/classes/com/sun/midp/ssl directory, if the directory exists
The .java  files that define the secure socket layer code.
KVM_EXCLUDE_CLASSES 
String 
SCCS|j2se|io/palm|io/j2me|io/connections|io/ConnectionBase.java|io/NetworkConnectionBase.java|io/DateParser.java|java/lang/System.java|java/lang/Runtime.java|java/lang/Class.java 
Any class files to exclude from the KVM tree
KVM_DEF_SRC 
String 
cache.c class.c fields.c frame.c garbage.c global.c interpret.c loader.c native.c pool.c thread.c nativeCore.c loaderFile.c runtime_md.c events.c hashtable.c profiling.c StartJVM.c verifier.c verifierUtil.c log.c stackmap.c execute.c inflate.c jar.c kni.c async.c 
Default source files that make up the virtual machine
KVM_EXCLUDE_SRC 
String 
SCCS 
Any .c files to exclude from KVM tree
KVM_INCLUDE_CLASSES 
String 
““ 
Any .class  files to include from KVM tree
KVM_INCLUDE_SRC 
String 
““ 
Any .c  files to include from the KVM tree
MIDP_DEF_SRC 
String 
property.c configuration.c imageDecode.c pngDecode.c defaultLCDUI.c menus.c popup.c nativeGUI.c images.c text.c graphics.c commandState.c exitInternal.c main.c midpStartup.c SystemOutputStream.c ResourceInputStream.c JarReader.c storage.c RandomAccessStream.c storageFile.c socketProtocol.c socketProtocol_md.c datagramProtocol.c datagramProtocol_md.c commProtocol.c commProtocol_md.c phonesim.c staticGraphics.c midpEvents.c pushregistry.c midlet.c midlet_md.c audiornd.c mmatone.c mmaevt.c waveout.c vibrate.c pvibrate.c 
Default MIDP source files
 
Some options, such as ENABLE_SCREEN_CAPTURE, add to this list.
MIDP_EXCLUDE_CLASSES 
String 
SCCS|perfmon|KSImpl.java|j2se 
Any class files to exclude from the MIDP tree
MIDP_EXCLUDE_SRC 
String 
““ 
Any .c files to exclude from the MIDP tree
MIDP_INCLUDE_CLASSES 
String 
““ 
Any .class files to include from MIDP tree
MIDP_INCLUDE_SRC 
String 
““ 
Any .c files to include from the MIDP tree
MIDP_SOURCE_FILES 
String 
Any .java files found in the $(MIDP_DIR)/src/ directory, excluding files that match any of the patterns listed in $(MIDP_EXLUDE_CLASSES).
The .java files that are part of the MIDP Reference Implementation.
PLATFORM_DEF_SRC 
String 
dirent.c 
Default source files specific to the platform
PLATFORM_EXCLUDE_CLASSES 
String 
SCCS 
Any class files to exclude from the platform tree
PLATFORM_EXCLUDE_SRC  
String 
““ 
Any platform-specific .c files to exclude when building an executable bundle
PLATFORM_INCLUDE_CLASSES 
String 
““ 
Any platform-specific .class files to include when building an executable bundle
PLATFORM_INCLUDE_SRC  
String 
““ 
Any platform-specific .c files to include when building an executable bundle
TEST_DEF_SOURCE 
String 
any .java files found in the $(MIDP_DIR)/tests directory, if the directory exists.
Default source files for testing
TEST_EXCLUDE_CLASSES 
String 
SCCS 
Any class files to exclude from testing
TEST_INCLUDE_CLASSES 
String 
““ 
Any .class files to include from the tests

TABLE 17  –  Directory Names  
Option
Type
Default Value on Windows 2000
Description
ALT_BOOTDIR 
String 
Microsoft Windows 2000:
C:/JDK1.3 
Top-level directory of an alternate JDK to use to build the target
 
You should set this environment variable when you installed MIDP. See Installing MIDP for more information.
ARCH_DIR 
String 
““ 
Additional sub-directory to store object files
 
This configuration option is useful when you build binaries for the same platform but two different CPU architectures, such as Solaris™/X86 and Solaris/SPARC.
 
Note: This variable must start with a path separator.
BINDIR 
String 
$(BUILD_DIR)/bin$(ARCH_DIR) 
Directory to store executable files, such as MIDP_CMD
BUILD_DIR 
String 
 “.” 
The directory from which the build was started
CLASSBINDIR 
String 
$(BUILD_DIR)/classes 
 
KVM_DIR 
String 
$(MIDP_DIR)/../kvm 
Top-level directory of the KVM to use to build the target
LIBDIR 
String 
$(BUILD_DIR)/lib 
 
MIDP_DIR 
String 
midpInstallDir 
Top-level directory of MIDP
PLATFORM_CLASS_DIR 
String 
$(MIDP_DIR)/src/win32/classes 
Directory containing platform-specific classes
 
This value must not have a trailing path separator, and its last directory must be called classes.
PLATFORM_SRC_DIR 
String 
$(MIDP_DIR)/src/win32 
Directory containing platform-specific .c files
SHARE_SRC_DIR 
String 
$(MIDP_DIR)/src/share 
 
STORAGEDIR 
String  
$(BUILD_DIR)/appdb 
The directory of the keystore that MIDP uses for secure communications

B.3 Target Functionality

The following table contains the configuration options that affect the functionality present in the build target. (This table does not include any options for debugging. Those are listed in the next section, "Debugging.”)  

TABLE 18 Target Capabilities  
Option
Type
Default Value
Description
ENABLE_SCREEN_CAPTURE 
boolean 
false 
Whether to include the code that enables capturing of the contents of the emulator’s screen
INCLUDE_I18N 
boolean 
true 
Whether the implementation supports internationalization
 
Note: Setting this option to false reduces the build size by about 35K on Microsoft Windows 2000, and about 90K on UNIX®.
PLATFORM 
String 
  
Platform on which the executable will run
RELEASE_HTTPS 
boolean 
true 
Whether to include HTTPS functionality in the target for release
ROMIZING 
boolean 
true  
Whether to convert the class files in classes.zip to an object-file format for linking with the KVM
SOUND_SUPPORTED 
boolean 
false  
Whether to include calls to augment button pushes with sound cues

 

B.4 Debugging

The following table contains configuration options that affect the amount of debugging information included in the build target. 

TABLE 19 Debugging Capabilities  
Option
Type
Default Value on Windows 2000
Description
DEBUG 
boolean 
false 
Whether to create an object file with debugging symbols
 
When this option is set to true, the MIDP executable is renamed to midp_g, and you can attach to the application with an appropriate C debugger. For example, you can use the gdb debugger if you have compiled with gcc.
DEBUG_CFLAGS 
string 
-Zi -Od 
Additional flags for the C compiler if DEBUG is set to true
DEBUG_COLLECTOR 
boolean 
false 
Whether to use a version of the garbage collector with debugging hooks
 
(The value determines whether the build compiles the KVM file collector.c or collectorDebug.c.)
ENABLE_DEBUGGER 
boolean 
false 
Whether to compile all Java class files with debugging information to allow source-level debugging
 
When this option is set to true, you can connect to the application through the KVM debug proxy.
ENABLEPROFILING 
boolean 
false 
Whether to have the MIDP Reference Implementation executable print a message on exit giving VM statistics, such as memory usage
 
Note: This option has no effect unless the option INCLUDEDEBUGCODE is also true.
ENABLE_MALLOC_TRACE 
boolean 
false 
Whether to trace memory usage and print warnings for memory leaks or corruption
 
This option is valid only when USE_MIDP_MALLOC is true.
INCLUDEDEBUGCODE 
boolean 
false 
Whether to include extra code to allow tracing of the VM internals
 
If this option is set to true, the MIDP executable writes extra status text to the command window, such as stack traces when a method throws an exception.
 
Note: This slows the VM and slightly increases its size.
SRCPROFILING 
boolean 
false 
Whether to compile MIDP so that it is profiler enabled
 
This option is valid only when GCC is true.
USE_MIDP_MALLOC 
boolean 
false 
Use internal memory management for native heap allocations

 

 


Contents Previous Next Index Porting MIDP
MIDP Reference Implementation, Version 2.0 FCS