22.12.2012 Views

z/TPF Program Management - IBM

z/TPF Program Management - IBM

z/TPF Program Management - IBM

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

# Output files<br />

ROOTBINDIRS := $(foreach d,$(APPL_ROOT),$d/billing/linux/bin) # linux executables<br />

ROOTLSTDIRS := $(foreach d,$(APPL_ROOT),$d/billing/linux/lst) # listings<br />

ROOTOBJDIRS := $(foreach d,$(APPL_ROOT),$d/billing/linux/obj) # object files<br />

z/OS offline environment file: maketpf.env_billing_zos<br />

Set up a configuration file<br />

# Input files<br />

ROOTASMDIRS := $(foreach d,$(APPL_ROOT),$d/billing/zos/src) # asm source files<br />

ROOTCDIRS := $(foreach d,$(APPL_ROOT),$d/billing/zos/src) # C source files<br />

ROOTCXXDIRS := $(foreach d,$(APPL_ROOT),$d/billing/zos/src) # C++ source files<br />

ROOTINCDIRS := $(foreach d,$(APPL_ROOT),$d/billing/include) # include files<br />

ROOTMACDIRS := $(foreach d,$(APPL_ROOT),$d/billing/macro) # macro files<br />

ROOTCPYDIRS := $(foreach d,$(APPL_ROOT),$d/billing/zos/src) # copy files<br />

# Output files<br />

ROOTBINDIRS := $(foreach d,$(APPL_ROOT),$d/billing/zos/bin) # z/OS executables<br />

ROOTLSTDIRS := $(foreach d,$(APPL_ROOT),$d/billing/zos/lst) # listings<br />

ROOTOBJDIRS := $(foreach d,$(APPL_ROOT),$d/billing/zos/obj) # object files<br />

# Output Link PDS<br />

LINKPDS := $(subst *,LINK,$(word 1,$(APPL_ROOTPDS)))<br />

Note: For the z/OS offline programs, in addition to the directories, a LINK partition<br />

data set (PDS) is required as the repository for the executables. In this<br />

example, the syntax shown will replace an asterisk (*) with the string LINK. It<br />

chooses only the first string provided in the APPL_ROOTPDS variable, which<br />

also is defined in the configuration file.<br />

For our example, we have set up the billing applications so that each of the<br />

environment files is independent of one another, and all three refer to the macro<br />

and include directory. This was done so that each makefile would need to list only<br />

the environment file related to its type (real-time, Linux or z/OS). As an alternative,<br />

we could have created a fourth environment file named<br />

maketpf.env_billing_common that contained only the macro and include variable<br />

definitions, and removed those definitions from each of the other three files. Each<br />

makefile would have to reference both the common and corresponding<br />

program-type makefile. Both approaches work equally well. The approach that you<br />

use really depends on how you want to set up and manage your directory<br />

structures.<br />

Note: Environment files are intended to be set up with respect to either an<br />

application root directory or a z/<strong>TPF</strong> root directory. The environment files that<br />

are supplied by z/<strong>TPF</strong> are set up to reference the <strong>TPF</strong>_ROOT variable, while<br />

application environment files are expected to reference the APPL_ROOT<br />

variable.<br />

Use the configuration file to define the build space and to identify:<br />

v The root directory names where the application and z/<strong>TPF</strong> code reside. You can<br />

specify multiple root directory names and each will be concatenated. The files will<br />

be pulled on a topdown, first-found basis.<br />

v The z/<strong>TPF</strong> system or subsystem being built.<br />

v User overrides to compile, assemble, and link flags.<br />

v User overrides to process options, such as whether to keep clean listings.<br />

For the remainder of this information, we define the configuration file as shown in<br />

the following example and expect the file to reside under the name<br />

/home/joe/mywork/build/maketpf.cfg:<br />

Assemble, compile, and link (build) application programs 59

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!