Set up a configuration file
Use the configuration file to define the build space and to identify:
- The root directory names where the application and z/TPF code reside. You can specify multiple root directory names and each will be concatenated. The files will be pulled on a topdown, first-found basis.
- The z/TPF system or subsystem being built.
- User overrides to compile, assemble, and link flags.
- User overrides to process options, such as whether to keep clean listings.
For the remainder of this information, we define the configuration file
as shown in the following example and expect the file to reside under the
name
/home/joe/mywork/build/maketpf.cfg:
APPL_ROOT := /home/joe/mywork
APPL_ROOT += /home/project1
APPL_ROOT += /usrtpf/z11/app
TPF_ROOT := /home/joe/mywork
TPF_ROOT += /tpf/z11
TPF_BSS_NAME := BSS
The previous example identifies the following:
- That the z/TPF source code can be found by searching the user working
directory structure (
/home/joe/mywork) first, and the z/TPF production directory (/tpf/z11) second.Note: Even though we are building an application, a user layer is added to the list of z/TPF root directory names because updates to the control files may be needed and they are found under the z/TPF directory structure, not the application directory structure. - That the application source code can be found by searching the user working
directory structure (
/home/joe/mywork) first, a project level directory (/home/project1) second, and the application production directory (/usrtpf/z11/app) last. - That the z/TPF system that the application will be built for is a basic subsystem with the default name BSS.
To provide the benefit of keeping all output files generated by maketpf
for a particular configuration file in a common directory, use the default
name (maketpf.cfg) and place the file in a directory named build under the first APPL_ROOT directory listed; and then run all maketpf
commands from that same build directory.
If you are going to build the same code against different systems, consider
creating, for each system, a build/system-name directory
containing the config file (maketpf.cfg) for the system-name system. You would then run all maketpf commands from the build/system-name directory.
If you prefer a name other than
maketpf.cfg, the full path and
file name of the configuration file can be defined in an environment variable
named TPF_CFG. For example, to use a configuration file named bss.cfg in your build directory, you would enter the following command at the
command prompt:
export TPF_CFG=/home/joe/mywork/build/bss.cfg If
the TPF_CFG variable is set, the MakeTPF tools will always use the file defined
by it instead of a file named maketpf.cfg in the current directory.