BlitzMax/User Guide/BMK

BMK is a command line tool that drives the BlitzMax compiler and provides other general 'housekeeping' operations.

The general syntax for BMK is:


 * bmk Operation Options Arguments

Where operation is one of makeapp, makemods, zapmod, unzampmod.

Makeapp
Makeapp builds an application from a single root source file. Building an application involves compiling source files and linking together the resultant object files.

Makeapp takes one argument: the root source file to be built.

The root source file is scanned by BMK for Import, Include and Incbin statements, and these files are themselves automatically built as well.

Unless the -a option is used, only source files that have been modified since the last makeapp operation are recompiled. This can vastly improve compile times.

Valid options for makeapp are:

Some examples of makeapp in action:

bmk makeapp myapp.bmx bmk makeapp -a -r -o myapp_release myapp.bmx

Note that the debug, release, single threaded and multithreaded options allow for 4 'types' of applications:


 * Debug, single threaded (this is the default)
 * Debug, multithreaded (use -h option)
 * Release, single threaded (use -r option)
 * Release, multithreaded (use -r and -h options)

Makemods
The makemods operation builds a set of modules.

Makemods takes one optional argument: a module filter. This can be a module scope name (to build a subset of modules) or a fully qualified module name (to build an individual module). If the module filter is omitted, than all module are built.

Valid options for makemods are:

Some examples of makemods in action:

bmk makemods mymods bmk makemods -a mymods.testmod

Zapmod
The Zapmod operation compresses a module into a single '.zap' file.

Zapmod takes 2 arguments - the module to zap, and the name of the output file.

For example:

bmk zapmod mymods.testmod testmod.zap

UnzapMod
Unzapmod installs a module previously zapped with 'Zapmod'.

Unzapmod takes 1 argument - the module zap file to unzap. Note that any matching existing module will be overwritten by this operation. For example:

bmk unzapmod testmod.zap