#
# Top level Jamfile for the abstract multi-subdirectory example.
#
# This illustrates one way to use Jam to compile a project with several
# subdirectories.
#
#
# This call to SubDir sets the variable $(TOP) to the directory in which
# this Jamfile resides. We use this as an "anchor point" for other rules
# and variables, and to tell Jam where the Jamrules file for this project
# is.
#
SubDir TOP ;
#
# Tell Jam to look in sub directories "a", "b", and "c" for header files.
# The FSubDirPath utility rule (defined in the Jambase which is compiled
# into the Jam executable by default) creates a platform-appropriate
# path name from the arguments passed.
#
# Note that we use "+=" here rather than "=", so we're adding these
# directories to the search path rather than overriding any existing
# search path.
#
# Also note the use of square braces ('[' and ']'), which tells Jam to
# use the results of calling the FSubDirPath rule, as opposed to treating
# FSubDirPath as a (file) name.
#
HDRS += [ FSubDirPath TOP a ]
[ FSubDirPath TOP b ]
[ FSubDirPath TOP c ] ;
#
# The executable which we wish to build is called "abstract". It is
# built from the source file "abstract.c" and the libraries "a_lib",
# "b_lib" and "c_lib".
#
Main abstract : abstract.c ;
LinkLibraries abstract : a_lib b_lib c_lib ;
#
# The contents of the libraries are in these sub directories, so we tell
# Jam about them:
#
SubInclude TOP a ;
SubInclude TOP b ;
SubInclude TOP c ;
| # | Change | User | Description | Committed | |
|---|---|---|---|---|---|
| #1 | 4438 | Chris Comparini |
Sample jam projects. "rootless" documentation still needs work. |