SWITCH BASIC
! RMAKLB.CMD	Run by ATPK
!
! Build the RT11 C library on RSTS/E
!
! Note that the command file builds two libraries:
!
!	CLIB.OBJ	EIS support (default for RSTS)
!	CLIBN.OBJ	No EIS support
!
! File assignments
! SR:	[5,4]	Common library source files
!	[5,5]	Common I/O library source files
! OB:	[5,5]	Object files temp
! OU:	[5,2]	Library output
! LS:	NL:	Listings
!
! Note: this command file deletes all *.OB currently in OB:
! Note that file assignments are repeated to build the EIS library
!
$ALLOW WARNING ERRORS
ASSIGN SY:[5,5]	OB
ASSIGN NL:	LS
!
$ALLOW FATAL ERRORS
PIP OB:*.OB<0>/RE
PIP OB:*.OB/DE
$ALLOW WARNING ERRORS
!
ASSIGN SY:[5,4]SR
MACRO
$@[5,4]RCLBAS
^Z
!
ASSIGN SY:[5,5]SR
MACRO
$@[5,5]RILBAS
^Z
!
! Note: RSTS supports only three assignments, thus we must now ...
!
DEASSIGN LS
ASSIGN SY:[5,2]OU
!
! SUPORT, ATOF, and DTOA do not go into the library
!
PIP OU:SUPORT.OBJ<40>=OB:SUPORT.OB
PIP OU:RTATOF.OBJ<40>=OB:ATOF.OB
PIP OU:RTDTOA.OBJ<40>=OB:DTOA.OB
PIP OB:SUPORT.OB<0>/RE
PIP OB:ATOF.OB<0>/RE
PIP OB:DTOA.OB<0>/RE
PIP OB:SUPORT.OB,OB:ATOF.OB,OB:DTOA.OB/DE
!
! Merge other object files and build the library
!
PIP OB:OTS.TMP=OB:*.OB
PIP OB:*.OB<0>/RE
PIP OB:*.OB/DE
$ ALLOW FATAL ERRORS
LIBR OU:CLIBN<40>=OB:OTS.TMP
$ ALLOW WARNING ERRORS
PIP OB:OTS.TMP<0>/RE
PIP OB:OTS.TMP/DE
!
! Build the EIS library
!
DEASSIGN OU
ASSIGN SY:[5,4]	SR
ASSIGN NL:	LS
MACRO
$@[5,4]RCLEIS
^Z
!
ASSIGN SY:[5,5]SR
MACRO
$@[5,5]RILEIS
^Z
!
! Note: RSTS supports only three assignments, thus we must now ...
!
DEASSIGN LS
ASSIGN SY:[5,2]OU
!
! SUPORT, ATOF and DTOA do not go into the library
!
! Note:  As suport, atof, and dtoa are identical for both libraries,
! just delete them.
!
PIP OB:SUPORT.OB<0>/RE
PIP OB:ATOF.OB<0>/RE
PIP OB:DTOA.OB<0>/RE
PIP OB:SUPORT.OB,OB:ATOF.OB,OB:DTOA.OB/DE
!
! Merge other object files and build the library
!
PIP OB:OTS.TMP=OB:*.OB
$ ALLOW FATAL ERRORS
LIBR OU:CLIB<40>=OB:OTS.TMP
$ ALLOW WARNING ERRORS
PIP OB:*.OB<0>/RE
PIP OB:*.OB/DE
PIP OB:OTS.TMP<0>/RE
PIP OB:OTS.TMP/DE
!
! Library build complete
!
