Create a single-segment BSO
To create and build a BAL shared object (BSO) that has one assembler source file (as specified by the BEGIN macro), has one entry point, and calls a function in a C library, follow these steps:
- Create a new makefile (
/home/joe/mywork/billing/rt/src/bill.mak) as shown in the following example:APP := BILL maketpf_env := billing maketpf_env += base_rt LIBS := CRDT ASM_SRC := bill.asm include maketpf.rulesNotes:- Both the billing and base_rt environment files are listed because the base_rt environment file provided by z/TPF is almost always required to enable the application program to access macros and header files that are included in z/TPF.
- The first environment listed defines the owning environment and, therefore, the corresponding environment file defines the directory (under the first root directory listed) that is used for writing listings, objects, and executables. Both environments are used to define where the source files (including macros and header files) can be found.
- The billing application calls the creditCheck function that is provided in the CRDT C function library.
- Create a source segment named
/home/joe/mywork/billing/rt/src/bill.asm. - Update the user control file with an entry for the new program:
- Create a copy of the control file in your working directory:
cp /tpf/z11/local_mod/base/cntl/usr.cntl /home/joe/mywork/base/cntl/usr.cntl - Edit the file that you just copied and add a new entry for the
program named BILL. Enter the following information on one line.
BILL;APP;billing/rt/src/bill.mak;1;ALL;OBJ;TPF_SBALL;LOADONLINE;STUB;DEMAND;DEBUG; 50;PROGRAM;NOGRP;IBM_DEFT;BPAUTH;RESTRICT;MONTC;KEY0;NOCMB;TIMESLICE;;;;;;;;;;;;;
- Create a copy of the control file in your working directory:
- Enter the maketpf command to build the program. This assumes that
a file named
maketpf.cfgexists in the/home/joe/mywork/builddirectory.cd /home/joe/mywork/build maketpf bill