Compilation with makefiles
This page is meant for people which want to use command-line tools for building their projects. Such building tools are based on the 'makefile' tools: a powerful approach, but also intimidating for novice users. Therefore, use this method if you are an experienced programmer.




How to configure
The makefile system of Chrono::Engine is based on a set of .mak files. Only few modifications are needed before you start compiling. This configuration is needed only once.
1.b - Check that you have the 'makefile' tool
If you want to use the command-line makefiles, make sure you have at least one of the following command-line tools: That is: if you are using the Microsoft compiler, you need also to install the Microsoft Platform SDK for using the nmake tool, otherwise, if you are using the MingW compiler, simply use the mingw32-make tool which is already contained in the GCC distribution.

2.b - Edit makefile variables
Use a plain ASCII editor (such as the Notepad or VI) to edit the configuration file ChronoEngine/makes/config.mak.
If you read the instructions contained in that file, it won't be difficult to match your system's configuration: it is simply a matter of changing some variables such as the place where you unzipped your SDK on hard disk, the compiler you are using, and such.
The most important variables to set is CH_CHRONODIR. (Note that, if you followed the steps of the Windows installer during the installation of the Chrono::Engine SDK, these CH_CHRONODIR and CH_IRRLICHTDIR variables have been automatically written for you).
After you modified this file, save it.
That's all!






How to compile
Now that you have installed and configured your CHRONO::ENGINE SDK, you may want to check it by compiling some source code.
In fact, we suggest you to start with the compilation of a simple .cpp example, already shipped whith the SDK.
Read the following steps to learn how to compile a demo and how to compile other projects of yours.


3.b - Test the installation: compile a demo
To test the correctness of your SDK installation, you may compile one of the examples in ChronoEngine\demos\...
Open a console (a 'shell') and set the current directory as the directory where there's the source code of the demo you wish to compile. For example, if you unzipped your code in C:\ChronoEngine, type:
cd C:\ChronoEngine\demos\core
Now, supposing you have the Microsoft 'nmake' tool, type this command to start the compilation:
nmake -f makefile build=RELEASE

Note that if you are using the GNU 'make' tool coming with MingW distribution, you shoud type instead:
mingw32-make -f makefile build=RELEASE

The 'build' parameter is optional. It could also be build=DEBUG if you prefer to compile in debug mode.

If everything is ok, you should see the compiler textual message in the shell, and after few seconds you should obtain the executable.

The compiled executable can be found into ChronoEngine\bin\[your compiler].





Some notes about compilation with makefiles.



Back to the installation guide