SUBDIRS
assignment in
the Imakefile
for the parent directory. If there is not already
a SUBDIRS
assignment (that is, this is the first subdirectory added),
also add the lines:
to the Imakefile
. When adding new top-level subdirectories, be sure
to add them to all relevant SUBDIRS
assignments (different platforms
use different subsets).
Imakefile
after the line
That conditional definition should look like
Add FOO_STUFF
to the SUBDIRS
list for whichever platforms are appropriate.
Next, choose a command-line flag for itomf to represent your subdirectory
set. In this example, we will use the letter F.
Add an appropriate line to the print_usage subroutine in itomf, for example:
Declare a variable to hold your flag option, after the line
It should look like:getopts()
. After the call to
getopts()
, check if it is set, and assign
variable to 1 or 0 to represent it being set or not, as in:
On each line invoking imake after the comment
add a cpp define referencing your build flag, as in
Finally, add this same text to the CONFIG_IMAKE_DEFINES
assignment in
config/NASD.tmpl
, so that future regenerations of the Makefiles will not
lose track of whether or not to conditionally compile your new collection.
![]() | ![]() | ![]() |
---|---|---|
Cheops overview | Adding modules | NASD Programmer's Documentation |