Rogue Wave is a cross-platform company and our products support a wide range of platforms and compilers. But in this diverse world you may find yourself wanting to compile for an environment that Rogue Wave has not explicitly supported.
The remainder of this topic discusses how to use a command line build for unsupported environments.
The script rwspm
is the main interface to the configuration and build model (CBM) for command line builds. Three arguments to rwspm
facilitate the building of libraries in unsupported environments. These arguments are:
NULL
flag to the -f
argument. The argument -fNULL
signals that the build is for an unsupported environment. When this argument is set, you will be asked a series of questions about compile and link parameters and other details of the compiler environment. Based on your answers, CBM will attempt to configure the build environment to your special requirements. The NULL
argument indicates that a platform file is not available.
-g
argument. This argument causes rwspm
to halt the build process following generation of the makefile and exporting of header files, allowing you to examine and edit the makefile as needed. You must then manually invoke make
to perform the build.
-G
argument. This argument restarts the build process following a library build performed manually with make
. It normally completes a build process first initiated by rwspm -g
. The -G
phase of the process continues through the installation of examples source and the creation and installation of examples makefiles.
Here is an example procedure for building a library for an unsupported environment. For details about the other arguments to rwspm
, see the topic on command line builds. The directory paths use forward slashes. For Windows and OS/2 platforms, substitute back slashes.
You can instruct CBM to add a custom suffix to the library name resulting from the build, which provides a means of identifying a custom build configuration in the library name. For example, by specifying the suffix "b" (for "Borland"), the library name tls0s.lib
would become tls0sb.lib
. To specify a custom suffix:
On Unix platforms, export UNIQUE_LIB=
<suffix> in your working shell before invoking rwspm
.
On Windows or OS/2 platforms, set the variable UNIQUE_LIB=
<suffix> in the current environment before invoking rwspm
.
Alternatively, you can also create a custom platform file containing the UNIQUE_LIB
setting. The suffix is then added to any build that specified that platform file in the -f option of rwspm. For more information of custom platform files, see the discussion of the -f
flag of rwspm
in the command line build topic.
Change your working directory to <spm_root>/scripts
.
You must be in this directory to invoke rwspm
for a command line build.
Invoke rwspm
, using the -g
and -fNULL
arguments, and specifying a build type code in the -t
argument that approximates the build configuration you need. For example:
rwspm -t4 -g -fNULL -w<workspace_path> -p<source_path>
Change to the directory containing the makefile (located in the buildloc
directory of the workspace) and edit the generated makefile as needed. If multiple makefiles are present, review and edit these as well.
Invoke make
on the primary makefile.
Note that you must invoke make
from the directory containing the makefile or errors may occur.
Again make <spm_root>/scripts
your working directory, and reinvoke rwspm
with the same arguments as before but with the -G
argument in place of -g
:
rwspm -t4 -G -fNULL -w<workspace_path> -p<source_path>