.; RSX-11M Executive Extensions Library build command file.
.; By
.;	Bob Denny
.;	 9-FEB-82
.;
.; 9-Feb-82 Added hacks for AST handling
.;
.; Note: EXIT.MAC has been moved to the "standard" library.
.; Some of these directives will not build on earlier versions
.; of RSX-11M (or IAS or RSTS/E).
.;
.; 21-Oct-82 (RBD) New V4.0 library and build procedure.
.;
.; 11-Jun-84 (RBD) New '11M/M+ and P/OS combined library.  Now has
.;		   conditional code in a few modules (e.g., WIMP).
;
; Build the RSX-11M/M+ or P/OS Executive C Extensions Library CX.OLB.
;
.ENABLE SUBSTITUTION
.SETS $C ""
.IF <CLI> NE "MCR" .SETS $C "MCR "
.IFNINS LBR '$C'INS $LBR/INC=20000
;
; This library may be built for RSX-11M, RSX-11M+, Micro-RSX or P/OS.
; Most system services are common to all of the above systems, but
; several services are specific to one or more operating systems.
; In order for this library to build without errors, you must specify
; which system you are running under:
;
;     CODE      SYSTEM
;     -------------------------
;	1	RSX-11M
;	2	RSX-11M PLUS
;	3	Micro-RSX
;	4	P/OS (Professional 350) Native Toolkit
;	5	P/OS Host Developer's Toolkit (VMS or RSX)
;
.SETF HTKIT
.SETS LIBDIR "LB:[1,1]"
.SETS LIBNAM "CX"
.SETS ASMNAM "MAC"
.ASKN [1:5:1] SYSCOD Enter code for your system
.IF SYSCOD <> 5 .GOTO LAB1
.SETT HTKIT
.SETS LIBDIR "LB:[1,5]"
.SETS ASMNAM "PMA"
.SETS LIBNAM "PCX"
;	NOTE:	The extensions library will be generated for P/OS and
;		placed in your host toolkit library directory 'LIBDIR'.
;		In addition, to avoid confusion, it will be named
;		'LIBNAM'.OLB.
;
.LAB1:
.OPEN SYS.MAC
.IF SYSCOD = 1 .DATA RSX=0
.IF SYSCOD = 2 .DATA RSXMPL=0
.IF SYSCOD = 3 .DATA MICRSX=0
.IF SYSCOD = 4 .DATA POS=0
.IF SYSCOD = 5 .DATA POS=0
.CLOSE
.SETS LDEV "NL:"
.ASK LISTS Do you want listings
.IFT LISTS .SETS LDEV "SY:"
'$C'ASN 'LDEV'=LS:
;
; We need to delete all (old) object files now.
.ASK OK Is this OK
.IFF OK .EXIT
'$C'PIP *.OBJ;*/DE/NM
.ASK DOB Delete objects when done
;
; Assemble the CX library modules
;
.IFNINS 'ASMNAM' '$C'INS $'ASMNAM'
.IF <EXSTAT> <> 1 .GOTO ERROR
'$C' 'ASMNAM' @CXMAC
'$C'PIP SYS.MAC;*/DE/NM
.IF <EXSTAT> NE 1 .GOTO ERROR
;
; Merge the objects into a single file and
; create the 'LIBNAM' library locally.
;
'$C'PIP 'LIBNAM'.OB=*.OBJ
.IF <EXSTAT> NE 1 .GOTO ERROR
'$C'LBR 'LIBNAM'/CR:45.='LIBNAM'.OB
.IF <EXSTAT> NE 1 .GOTO ERROR
.IFT DOB '$C'PIP *.OBJ;*/DE/NM,'LIBNAM'.OB;*
.IF <EXSTAT> NE 1 .GOTO ERROR
;
;
.ASK OK Move 'LIBNAM'.OLB into 'LIBDIR'
.IFT OK '$C'PIP LB:[1,1]/FO/CO/NV='LIBNAM'.OLB
.IF <EXSTAT> NE 1 .GOTO ERROR
.IFT OK '$C'PIP 'LIBNAM'.OLB;*/DE
'$C'ASN =LS:
;
; Build Complete. Don''t forget to copy the ".H"
; files into LB:[1,1], LB:[ZZDECUSC] (P/OS native toolkit)
; or your LIBUIC.
;
.DISABLE DISPLAY
.EXIT
.ERROR:
;
; An error has occurred.  Fix the problem and
; try again.
;
.DISABLE DISPLAY
.EXIT
