Create a single-segment BSO using a generic makefile
This task shows you how to create and build a generic makefile that you can use to assemble and link a BSO that has one assembler source file (as specified by the BEGIN macro) and one entry point, with the convention that the assembler source file has the same base name as the application name, but is in lowercase with a .asm file extension. The application name itself will be in uppercase. This enables one makefile to be used for all BAL applications that match that criteria.
To create a single-segment BSO using a generic makefile, follow
these steps:
- Create a new makefile (
/home/joe/mywork/billing/rt/src/generic_bso.mak) as shown in the following example:APP := $(shell echo $(TPF_PGM_NAME) | tr [:lower:] [:upper:] ) ASM_SRC := $(shell echo $(TPF_PGM_NAME) | tr [:upper:] [:lower:]).asm maketpf_env := billing maketpf_env += base_rt include maketpf.rulesThis makefile is very similar to the single-segment BSO makefile described in Create a single-segment BSO; however, the value of variable TPF_PGM_NAME is derived at build time as input to the maketpf command.
- 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/generic_bso.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.
The stringcd /home/joe/mywork/build maketpf billbillis supplied to thegeneric_bso.makfile to be used as the value of "TPF_PGM_NAME".