22.12.2012 Views

z/TPF Program Management - IBM

z/TPF Program Management - IBM

z/TPF Program Management - IBM

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

8 z/<strong>TPF</strong> <strong>Program</strong> <strong>Management</strong><br />

There are two ways to add additional options or to override the default options that<br />

are set by the Make<strong>TPF</strong> tools:<br />

v Update the maketpf configuration file (maketpf.cfg).<br />

Options that are stored in the configuration file are intended to be temporary<br />

because the configuration file is not stored or retained; it is part of the build<br />

space and can change from build to build. Specifying options in the configuration<br />

file is useful for testing new options before you formally update the makefile, for<br />

temporarily overriding debug levels, and so on. The following variables are<br />

supported in the configuration file:<br />

– ASMFLAGS_USER<br />

– CFLAGS_USER<br />

– CXXFLAGS_USER<br />

– PLIFLAGS_USER<br />

– LDFLAGS_USER.<br />

Options that are specified in the _USER variables apply to all assemblies,<br />

compiles, or links for any program. They take highest precedence and override<br />

the default options as well as any options that are specified in the makefile.<br />

v Update the makefile for the program.<br />

Options that are specified in the makefiles are intended for permanent changes<br />

to the default options because they are stored directly in the makefile. Options in<br />

the makefile can be specified at two levels: either applying to a specific source<br />

file, or applying to all source files of a given type (C, CXX, and so on). The<br />

following variables are supported in the makefile, where pgm is the<br />

case-sensitive program name specified by the primary target in the makefile<br />

(APP, EXE, and so on) and seg is the case-sensitive source file name, without<br />

the file extension, that is specified in the source file lists (C_SRC, ASM_SRC,<br />

and so on):<br />

– ASMFLAGS_pgm and ASMFLAGS_pgm_seg<br />

– CFLAGS_pgm and CFLAGS_pgm_seg<br />

– CXXFLAGS_pgm and CXXFLAGS_pgm_seg<br />

– PLIFLAGS_pgm and PLIFLAGS_pgm_seg<br />

– LDFLAGS_pgm<br />

Options that are specified in _pgm_seg take higher precedence over those<br />

specified in _pgm for source file _seg, and both take higher precedence over the<br />

default options that are set by the Make<strong>TPF</strong> tools.<br />

In the following example, MY12 is the name of the program in the APP statement of<br />

the makefile. mycfile1.c, mycfile2.c, and mycfile3.c are source files.<br />

APP := MY12<br />

C_SRC := mycfile1.c<br />

C_SRC += mcyfile2.c<br />

C_SRC += mycfile3.c<br />

CFLAGS_MY12 := -O0<br />

CFLAGS_MY12_mycfile2 := -O3<br />

In this example, the mycfile3.c and mycfile1.c source files would have -O0 as an<br />

override; however, the mycfile2.c source file would have -O3 as an override.<br />

Additional information:

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

Saved successfully!

Ooh no, something went wrong!