Game Development Reference
In-Depth Information
The MKB file for the "Hello World" project
Let's make a start on our "Hello World" project. Create a new directory to hold the
project files, and then create a file called Hello.mkb in this directory and enter the
following into it:
#
# Main MKB file for Hello project
#
# Modules used by this project
subprojects
{
iwgx
}
# The files that make up the project (source, data etc.)
files
{
[SourceCode]
(source)
Main.cpp
}
# Settings to configure the deployment process
deployments
{
name="Hello"
caption="Hello World"
}
The first section of Hello.mkb is the subprojects section, which lists all the
additional code modules used by our application. In this instance, a code module is
a library that can be added to our project either as a group of C or C++ source files
or, alternatively, as pre-compiled, linkable object files accompanying header files. In
the previous example, there is just one, iwgx , which is the Marmalade code module
responsible for rendering graphics.
All the higher level modules within Marmalade are referenced in this manner, and
you can also use this system to create your own modules to enable code re-use across
projects. To create a subproject module we use an MKF file, which amounts to a little
more than an MKB file with a different file extension! When we add an entry to the
subprojects list, the Marmalade makefile builder script will search for a suitable
MKF file that describes each subproject. We'll see detailed examples of how to do this
later in the topic.
 
Search WWH ::




Custom Search