Chapter 3.2 - The Makefile.am
Make gets its information what to do from the Makefile.am-file. In there, all files are listed that should be compiled. Here you define how many robots of your strategy should be created.
In the definition brotfrucht_confs you have to list all configuration files for the robots, that should be created with the Brotfrucht strategy. Have a look at the following definition:
brotfrucht_confs=\ Brotfrucht-Robot1-TeamOne.conf\ Brotfrucht-Robot2-TeamOne.conf\ Brotfrucht-Robot3-TeamOne.conf\ Brotfrucht-Robot4-TeamOne.conf\ Brotfrucht-Robot5-TeamOne.conf\ Brotfrucht-Robot1-TeamTwo.conf\ Brotfrucht-Robot2-TeamTwo.conf\ Brotfrucht-Robot3-TeamTwo.conf\ Brotfrucht-Robot4-TeamTwo.conf\ Brotfrucht-Robot5-TeamTwo.conf
You might guess that we create two teams with both five robots. They all must hve different names otherwise RealTimeBattle makes some troubles and you cannot launch them correctly.
If you want to add another (Brotfrucht) bot for team
one, just add
to the list. Notice, that all lines that are not the
last in such a definition have to be terminated by a
When adding your own strategy you have to add a similar definition:
[strategy-name]_confs=\ followed by some
"[strategy-name]-[robot-name]-[team-number].conf" definitions for each
robot (remember the final backslash in each line). The dividing dashes are
required for the configuration script so overtake this special synax! The number
of teams and robots is your own decision. It is just a maximum
number, of cause it's possible to let fight just three robots of a team.
The CLEANFILES/framework_DATA definition
These are some information for make, e.g. which files should be deleted when
calling make clean. Just add
in the end of the existing definitions.
In the definition robot_SCRIPTS, the target files for all robots are definied. In the order of appereance in the -confs-definition they are listed. Each line is terminated by a backslash again except the last one.
The last step in edition the Makefile.am is to add the paths to all source files. You must add all header (*.h) and source files (*.cpp) you have created.
As you see, all files have a relative path definition
bots/bfbasicstate.h) and again all lines
are terminated by a backslash except for the last one.
That was all you have to change for make. Just a little further step and your robot will fight!