GenBuild is a Symbian tool that allows you to build several programs for several targets using one command. It is useful when you are developing several components and want to build all of them with one shot. It is basically a wrapper of the well known bldmake and abld script.
Imagine that you are working with several other developers and each of them is developing a component. When you receive updates from them, you copy their code to your local hard disk and then build each component by executing "bldmake bldfiles" and "abld build" command. In other words you have to do it several times. GenBuild will make your life easier by allowing you to execute only one command.
At the end of this article, you will find an example how to compile all Series 60 SDK examples using GenBuild.
How to Use GenBuild?
GenBuild basically creates several scripts which you call to perform specific tasks. For example, GenBuild will create a script, called myprograms_build.cmd, to build your programs for all targets, like WINS or ARMI.
What you have to do to use GenBuild is to create a text file containing a list of your programs. For example, you have three programs, called program1, program2 and program3. Each of them is stored in a directory with the same name as the program name. Now create a text file, called myprograms.txt, and copy and paste the list below.
program1 program1
program2 program2
program3 program3
There are two columns in this list. The first column indicates the names of the programs or components. It is useful when you want to view the log file of your build process. The second column indicates the directories where the components are stored, relative to the current directory.
Now we are ready to run GenBuild. Type the following command to run it.
genbuild myprograms.txt
GenBuild will create several scripts, which you use to build your programs. The following command will build all of your programs for all the default targets, i.e. WINS, ARMI and ARM4.
myprograms_build.cmd
You can also build for a certain platform only, for example WINS, with the following command.
myprograms_pbuild.cmd wins
Unfortunately, you cannot specify the configuration, UDEB or UREL, in this script. It will compile for both UDEB and UREL. However, there are some other scripts that allows you to compile for one configuration only. The following commands show how to compile for ARMI UREL.
myprograms_bldfiles.cmd
myprograms_export.cmd armi
myprograms_makefile.cmd armi
myprograms_library.cmd armi
myprograms_resource.cmd armi
myprograms_target.cmd armi urel
myprograms_final.cmd armi
The table below shows the scripts generated by GenBuild and the equivalent standard build commands (see the abld syntax command at the end of this article to find out more about the equivalent command).
| GenBuild Commands | Symbian Commands |
| myprograms_bldfiles.cmd | bldmake bldfiles |
| myprograms_export.cmd | abld export |
| myprograms_makefile.cmd | abld makefile |
| myprograms_library.cmd | abld library |
| myprograms_resource.cmd | abld resource |
| myprograms_target.cmd | abld target |
| myprograms_final.cmd | abld final |
| myprograms_check.cmd | abld -check build |
| myprograms_what.cmd | abld -what build |
| myprograms_clean.cmd | abld clean |
| myprograms_reallyclean.cmd | abld reallyclean |
| myprograms_build.cmd | Combination of all above scripts |
| myprograms_pbuild.cmd | The alternative script to compile for a certain target |
You can also specify some options in GenBuild, like savespace or keepgoing. For example, the GenBuild list below will add -savespace option when compiling the programs.
<option savespace>
program1 program1
program2 program2
program3 program3
Another example the use of options is to add THUMB and WINSCW platform since by default GenBuild will only build for WINS, ARMI and ARM4 platforms.
<option winscw thumb>
program1 program1
program2 program2
program3 program3
How to Compile Series 60 Examples Using GenBuild?
To give you a better understanding of GenBuild, take a look at the following file, series60ex.txt, which builds all of Series 60 SDK 2.x examples. Create this file in \series60ex directory in your Series 60 SDK installation.
animation animation\gui\group
bmpmanip bmpmanip\group
btadvertiser btadvertiser\group
btdiscovery btdiscovery\group
bthci bthci\group
btobjectexchange btobjectexchange\group
btpointtopoint btpointtopoint\group
cipher cipher\group
clientserverasync clientserverasync\client\group
clientserversync clientserversync\client\group
dialer dialer\group
editor editor\group
errorui errorui\group
fetching fetching\group
focusevent focusevent\group
form form\group
graphics graphics\group
grid grid\group
guiengine guiengine\group
helloworldbasic helloworldbasic\group
helloworldplus helloworldplus\group
helpexample helpexample\group
language language\group
listbox listbox\group
menu menu\group
multiviews multiviews\group
note note\group
notification notification\group
popupfield popupfield\group
popuplist popuplist\group
progressbar progressbar\group
query query\group
scroller scroller\group
settinglist settinglist\group
shoppinglist shoppinglist\group
slider slider\group
sockets sockets\group
sound sound\group
spane spane\group
testframe testframe\group
You can build them using the command below
series60ex_build.cmd
or with the following commands to build for WINS only.
series60ex_pbuild.cmd wins
Further Reading
bldmake Command Syntax - The syntax of bldmake command from Symbian site.
abld Command Syntax Overview - The syntax of abld command from Symbian site.