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

2.4.1.2 Compiling on Unix

The makefiles require GNU make, which is typically named `make' on most systems. If this is not the case then substitute `gmake', `gnumake' or whatever GNU make is called on your system.

It is NOT possible to make Crystal Space using any other makefile (unless by doing so manually).

First you need to configure the makefiles for your system. If you are using Linux, for example, you can do this as follows:

 
make linux USE_PLUGINS=yes

This indicates that we are going to compile for Linux and use dynamic linking (preferable). If you don't want to use the dynamic libraries you can set USE_PLUGINS=no. That will generate one big executable.

You can optionally invoke the `depend' target to make sure that all dependencies are correct. This is only important if you intend to make changes to the sources and want to be sure that all files will be recompiled that are in need of recompiling. You can, however, can safely omit this step if desired.

 
make depend

Then you need to do the following to actually build the entire project:

 
make -k all

If you selected USE_PLUGINS=yes then this will generate an executable and drivers (extension `*.so' on Linux and most Unix platforms) for the software renderer, a 2D driver, and some network drivers. If you selected USE_PLUGINS=no then only the executable is generated and the drivers are contained in that executable.

Optional: Only perform this step if you are developing a brand new plug-in module or changing the SCF identification of an existing one. If you selected USE_PLUGINS=yes then you may need to register the drivers with the SCF system. This generally only needs to be done once. The registration information is maintained in the file `scf.cfg'. However, typically this file is already up-to-date, so usually you can skip this step altogether. Only perform this step if the system is unable to locate the drivers or if you are actively developing a driver and changing registration information. The program to register plug-ins is called scfreg, and it was also compiled by `make -k all'. To run it, type:

 
./scfreg *.so

If all is well this should register all drivers so that Crystal Space will be able to load them dynamically. If your platform uses a file extension other than `*.so' for plug-in modules, then alter the command appropriately. This step is not needed when USE_PLUGINS=no is specified.

Now you can run the executable `walktest'.


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

This document was generated using texi2html