This is a somewhat abstract example of one way in which you can use Jam to build a project whose sources are spread over several subdirectories.

In this example, we introduce the "Jamrules" file, which generally contains site or project specific configuration, rules, and actions. In this case, the Jamrules only sets the ALL_LOCATE_TARGET variable, which specifies where to put generated files.

We also demonstrate the use of the SubDir and SubInclude rules to compile the contents of sub directories.

Note that there's a Jamfile for each directory in which sources reside. Each contains only a call to the Library rule specifying that a library should be made from the source files in that directory. The Jamfiles in the sub directories could of course be arbitrarily complex, but it is usually best to keep them as simple as possible.

Things to try: