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.

Adding the line APP_EXPORT := LIST directs the Make<strong>TPF</strong> tools to use a file<br />

named CRDT.exp during link time.<br />

3. Create a source segment named /home/joe/mywork/billing/rt/src/crdt.asm.<br />

4. Create an export file named /home/joe/mywork/billing/rt/exp/CRDT.exp<br />

{<br />

global:<br />

CRDT_BSO;<br />

local:<br />

A123_BSO;<br />

};<br />

See “Create an export file” on page 69 for more information about creating<br />

export files.<br />

5. Update the user control file and add a new entry for the program named CRDT.<br />

Enter the following information on one line.<br />

CRDT;APP;billing/rt/src/crdt.mak;1;ALL;OBJ;<strong>TPF</strong>_SBALL;LOADONLINE;STUB;DEMAND;DEBUG;<br />

50;PROGRAM;NOGRP;<strong>IBM</strong>_DEFT;BPAUTH;RESTRICT;MONTC;KEY0;NOCMB;TIMESLICE;;;;;;;;;;;;;<br />

See “Control files” on page 103 for more information about the control file fields<br />

and values.<br />

Add stubs for BAL programs with transfer vectors<br />

Create a C shared object<br />

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

BSOs also can have multiple entry points when transfer vectors are used. No<br />

changes need to be made to the BSO makefiles that are already shown. The only<br />

additional step required is to add STUB entries to the control file for each of the<br />

transfer vector names.<br />

By convention, make the STUB entry in the control file refer to the parent BSO<br />

program makefile name if a unique makefile exists, or to the parent BSO name if a<br />

generic makefile was used to build the parent BSO. For example, if XVB1 is a<br />

transfer vector in the BSO named BILL, the STUB entry in the control file could be<br />

coded as either of the following:<br />

v XVB1;STUB;billing/rt/src/bill.mak;;ALL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br />

v XVB1;STUB;BILL;;ALL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br />

The value provided in the third column has no effect on the build of the program or<br />

the stub library; it is used only for reference.<br />

This task shows you how to create and build a new makefile for a C shared object<br />

(CSO). There are many variations on how to code CSOs. A CSO might have only<br />

one entry point, it might be a library that exports some or all of its functions, it might<br />

be a combination of the two, or it might be a main program.<br />

To create a CSO, follow these steps:<br />

1. Create a new makefile (/home/joe/mywork/billing/rt/src/bill.mak) as shown<br />

in the following example:<br />

APP := BILL<br />

C_SRC := billing1.c<br />

C_SRC += billing2.c<br />

maketpf_env := billing<br />

maketpf_env += base_rt<br />

include maketpf.rules

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

Saved successfully!

Ooh no, something went wrong!