[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This section describes one easy way to use the Crystal Space development kit for your application without having to place your application in the Crystal Space source code tree. Your application's source code can reside wherever you like.
For this to work you need to have a sufficiently Unix-like environment. The environments provided by the MingW and Cygwin compilers are usually okay, but you must use the `bash' shell.
The first thing you need to do is to go to the Crystal Space directory and type:
make cs-config |
This will create a script called `cs-config'. Copy that script unmodified to the directory where your project is located. Note that this script is platform dependent so you should not put it in your project's CVS repository. Everyone who uses your project will have to generate their own `cs-config' script by invoking `make cs-config' from within the Crystal Space project directory.
In the Crystal Space directory you will find the following file:
`scripts/cs-config/Makefile.template'.
Copy this file to the directory where your project is located and rename it to `Makefile'.
You need to edit this file for your own project. It is recommended that you change at least the following variables:
This will enable the makefile to compile an executable for you. If, in addition, you want to compile a plugin for Crystal Space, you have to change these variables:
If you do not wish to make an executable at all, delete, or comment out with a `#' sign the following lines:
If, on the other hand you wish to compile only an application executable, and not a plugin, do the following:
Note that the difference between compiling an executable and a plugin is the change of `$(DO.EXEC)' to `$(DO.PLUGIN)', and vice versa. Of course, an application must have a main routine and initialize Crystal Space.
If you installed Crystal Space (usually in `/usr/local/crystal'), then this is all you need to do. If not, then you must set the `CRYSTAL' environment variable to point to the location where Crystal Space resides. For instance, using the Bourne shell, you can do this with the following command:
export CRYSTAL=/home/cs_user/CS |
The following targets are supported by this makefile:
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |