$!----------------------------------------------------------------------------- $! BUILD_ONE.COM $! $! P1 == LINK or BUILD or empty (builds) $! P2 == program name $! $! 30-MAY-98 MGD initial re-development $!----------------------------------------------------------------------------- $! $ APPLICATION = P2 $ IF APPLICATION .EQS. "" $ THEN $ WRITE SYS$OUTPUT "Usage: @BUILD_MISC BUILD|LINK " $ EXIT $ ENDIF $! $ ON CONTROLY THEN EXIT 44 $! $ WRITE SYS$OUTPUT "" $ WRITE SYS$OUTPUT "Building ""''APPLICATION'""" +- " for ""''F$GETSYI("ARCH_NAME")'"" architecture" $! $ ARCH_NAME = F$EDIT(F$GETSYI("ARCH_NAME"),"UPCASE") $ IF ARCH_NAME .EQS. "ALPHA" THEN ARCH_NAME = "AXP" $! $ DEFINES = "/DEFINE=(__VMS_VER=70000000,__CRTL_VER=70000000)" $ INCLUDES = " /INCLUDE=([SRC.MISC])" $! $ LINK_OPTIONS = F$SEARCH("''APPLICATION'_''ARCH_NAME'.OPT") $ IF LINK_OPTIONS .NES. "" - THEN LINK_OPTIONS = "," + F$ELEMENT(0,";",LINK_OPTIONS) + "/OPTIONS" $! $ IF F$SEARCH("OBJ_''ARCH_NAME'.DIR") .EQS. "" - THEN CREATE /DIR [.OBJ_'ARCH_NAME'] $ OBJECT_DIR = "[.OBJ_''ARCH_NAME']" $! $ IF F$EDIT(F$GETSYI("ARCH_NAME"),"UPCASE") .EQS. "VAX" $ THEN $ CC_OPTIONS = "/DECC /NOOPT /STAND=VAXC 'DEFINES' 'INCLUDES' /OBJECT=''OBJECT_DIR'" $ ELSE $ CC_OPTIONS = "/DECC /NOOPT /STAND=VAXC 'DEFINES' 'INCLUDES' /OBJECT=''OBJECT_DIR'" $ ENDIF $! $ IF P1 .EQS. "" .OR. P1 .EQS. "BUILD" .OR. P1 .EQS. "COMPILE" $ THEN $ SET NOON $ SET VERIFY $ CC 'CC_OPTIONS' 'APPLICATION' $! 'F$VERIFY(0) $ SET ON $ ENDIF $! $ IF P1 .EQS. "" .OR. P1 .EQS. "BUILD" .OR. P1 .EQS. "LINK" $ THEN $ CGILIB_OLB = "[SRC.MISC.OBJ_''ARCH_NAME']CGILIB.OLB" $ SET NOON $ SET VERIFY $ LINK /EXECUTABLE=WASD_EXE:'APPLICATION'.EXE - 'OBJECT_DIR''APPLICATION','CGILIB_OLB'/LIBRARY'LINK_OPTIONS' $! 'F$VERIFY(0) $ SET ON $ ENDIF $ PURGE /NOLOG 'OBJECT_DIR' $! $!-----------------------------------------------------------------------------