[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.4.5.3 Building

Once you have obtained the latest Crystal Space source code package (see section 1.6 Where to Get Crystal Space) and have installed or prepared the supporting libraries (see section 2.4.5.1 Library Prerequisites), unpack the source code archive into a convenient directory as shown below. A description of the directory hierarchy which is created when you unpack the source code archive is available, 2.1 Directory Hierarchy. A description of the files specific to the MacOS/X port is also available, 8.1.1 MacOS/X.

 
gnutar xfz CS-package-name.tgz

The Crystal Space project consists of a number of components and example programs. The following commands are all issued from within the top level Crystal Space source code directory named `CS'.

To begin building Crystal Space, first configure the project for MacOS/X by typing the following command from within the root `CS' directory:

 
./configure

At configuration time, you can also specify where Crystal Space should be installed. By default, it is installed in `/usr/local/crystal', but you can specify another location if desired. This setting is remembered and automatically applied later when you install the project. For example:

 
./configure --prefix=/Library/CrystalSpace

For a full list of configuration options, type:

 
./configure --help

Once the project has been configured, you can begin building the Crystal Space demonstration programs. Alternately, if you are interested in building only certain components of the system, such as drivers or libraries, then can do that instead.

To see a list of all targets which can be built, type:

 
make help

The simplest way to build the entire package, including all applications, drivers, and plug-in modules is to invoke the makefile target `all':

 
make -k all

This can be a fairly time consuming operation. If you would like to be more selective and only build the necessary plug-in modules and a subset of the available applications, you can invoke their targets individually.

For example, to build all plug-in modules, you could invoke this command:

 
make -k plugins # Builds all plug-in modules.

Or, for example, you could build only the WalkTest application and the plug-in modules which it most commonly requires.

 
make walkall  # Builds WalkTest and most required plug-ins
make drivers  # Builds necessary video, audio, network drivers

For finer control over which applications and plugins are built, you can invoke their targets directly. For instance:

 
make walktest  # Builds walktest, the map exploration program
make blocks    # Builds blocks, the 3D-Tetris style game
make glosx2d   # Builds glosx2d, the MacOS/X OpenGL 2D driver
make gl3d      # Builds gl3d, the OpenGL renderer

All programs require at least some plug-in modules to be present, so be sure to build those as well by invoking the `plugins' makefile target as illustrated above, if you have not already invoked the `all' target.

Once you have built the project, you may want to install it as a software development kit (SDK). The installation phase installs everything needed to create your own programs using Crystal Space. Some resources, such as demonstration applications and certain data files are not installed since they are not required for development. Installing the SDK is optional. If you simply wish to run the example programs, then you need not invoke the installation phase.

By default, Crystal Space is installed in `/usr/local/crystal', however you can specify a different location when you configure the makefiles, as explained above. Installation can be performed with the following command:

 
make install

If you intended, but forgot, to change the installation location when you configured the makefiles, you can still override the default at installation time. For example:

 
make install INSTALL_DIR=/Library/CrystalSpace


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated using texi2html