$!
$! MAKEVMS.COM
$! Original Author: UNKNOWN
$! Rewritten By: Robert Byer
$! Vice-President
$! A-Com Computing, Inc.
$! byer@mail.all-net.net
$!
$! Changes by Richard Levitte <richard@levitte.org>
$! Zoltan Arpadffy <zoli@polarhome.com>
$!
$! This procedure creates the SSL libraries of "[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB"
$! "[.xxx.EXE.SSL]LIBSSL.OLB"
$! The "xxx" denotes the machine architecture of ALPHA, IA64 or VAX.
$!
$! This procedures accepts two command line options listed below.
$!
$! Specify one of the following build options for P1.
$!
$! ALL Just build "everything".
$! CONFIG Just build the "[.CRYPTO._xxx]OPENSSLCONF.H" file.
$! BUILDINF Just build the "[.CRYPTO._xxx]BUILDINF.H" file.
$! SOFTLINKS Just fix the Unix soft links.
$! BUILDALL Same as ALL, except CONFIG, BUILDINF and SOFTILNKS aren't done.
$! CRYPTO Just build the "[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB" library.
$! CRYPTO/x Just build the x part of the
$! "[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB" library.
$! SSL Just build the "[.xxx.EXE.SSL]LIBSSL.OLB" library.
$! SSL_TASK Just build the "[.xxx.EXE.SSL]SSL_TASK.EXE" program.
$! TEST Just build the "[.xxx.EXE.TEST]" test programs for OpenSSL.
$! APPS Just build the "[.xxx.EXE.APPS]" application programs for OpenSSL.
$! ENGINES Just build the "[.xxx.EXE.ENGINES]" application programs for OpenSSL.
$!
$!
$! For 64 bit architectures (Alpha and IA64), specify the pointer size as P2.
$! For 32 bit architectures (VAX), P2 is ignored.
$! Currently supported values are:
$!
$! 32 To ge a library compiled with /POINTER_SIZE=32
$! 64 To ge a library compiled with /POINTER_SIZE=64
$!
$!
$! Specify DEBUG or NODEBUG as P3 to compile with or without debugging
$! information.
$!
$! Specify which compiler as P4 to try to compile under.
$!
$! VAXC For VAX C.
$! DECC For DEC C.
$! GNUC For GNU C.
$! LINK To only link the programs from existing object files.
$! (not yet implemented)
$!
$! If you don't specify a compiler, it will try to determine which
$! "C" compiler to use.
$!
$! P5, if defined, sets a TCP/IP library to use, through one of the following
$! keywords:
$!
$! UCX for UCX or UCX emulation
$! TCPIP for TCP/IP Services or TCP/IP Services emulation
$! (this is prefered over UCX)
$! SOCKETSHR for SOCKETSHR+NETLIB
$! NONE to avoid specifying which TCP/IP implementation to
$! use at build time (this works with DEC C). This is
$! the default.
$!
$! P6, if defined, sets a compiler thread NOT needed on OpenVMS 7.1 (and up)
$!
$!
$ DEF_ORIG = F$ENVIRONMENT( "DEFAULT")
$ ON ERROR THEN GOTO TIDY
$ ON CONTROL_C THEN GOTO TIDY
$!
$! Check if we're in a batch job, and make sure we get to
$! the directory this script is in
$!
$ IF F$MODE() .EQS. "BATCH"
$ THEN
$ COMNAME=F$ENVIRONMENT("PROCEDURE")
$ COMPATH=F$PARSE("A.;",COMNAME) - "A.;"
$ SET DEF 'COMPATH'
$ ENDIF
$!
$! Check What Architecture We Are Using.
$!
$ IF (F$GETSYI("CPU").LT.128)
$ THEN
$!
$! The Architecture Is VAX.
$!
$ ARCH = "VAX"
$!
$! Else...
$!
$ ELSE
$!
$! The Architecture Is Alpha, IA64 or whatever comes in the future.
$!
$ ARCH = F$EDIT( F$GETSYI( "ARCH_NAME"), "UPCASE")
$ IF (ARCH .EQS. "") THEN ARCH = "UNK"
$!
$! End The Architecture Check.
$!
$ ENDIF
$!
$! Get VMS version.
$!
$ VMS_VERSION = f$edit( f$getsyi( "VERSION"), "TRIM")
$!
$! Check To Make Sure We Have Valid Command Line Parameters.
$!
$ GOSUB CHECK_OPTIONS
$!
$! Check To See What We Are To Do.
$!
$ IF (BUILDCOMMAND.EQS."ALL")
$ THEN
$!
$! Start with building the OpenSSL configuration file.
$!
$ GOSUB CONFIG
$!
$! Create The "BUILDINF.H" Include File.
$!
$ GOSUB BUILDINF
$!
$! Fix The Unix Softlinks.
$!
$ GOSUB SOFTLINKS
$!
$ ENDIF
$!
$ IF (BUILDCOMMAND.EQS."ALL".OR.BUILDCOMMAND.EQS."BUILDALL")
$ THEN
$!
$! Build The [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library.
$!
$ GOSUB CRYPTO
$!
$! Build The [.xxx.EXE.SSL]LIBSSL.OLB Library.
$!
$ GOSUB SSL
$!
$! Build The [.xxx.EXE.SSL]SSL_TASK.EXE DECNet SSL Engine.
$!
$ GOSUB SSL_TASK
$!
$! Build The [.xxx.EXE.TEST] OpenSSL Test Utilities.
$!
$ GOSUB TEST
$!
$! Build The [.xxx.EXE.APPS] OpenSSL Application Utilities.
$!
$ GOSUB APPS
$!
$! Build The [.xxx.EXE.ENGINES] OpenSSL Shareable Engines.
$!
$ GOSUB ENGINES
$!
$! Else...
$!
$ ELSE
$!
$! Build Just What The User Wants Us To Build.
$!
$ GOSUB 'BUILDCOMMAND'
$!
$ ENDIF
$!
$! Time To EXIT.
$!
$ GOTO TIDY
$!
$! Rebuild The [.CRYPTO._xxx]OPENSSLCONF.H" file.
$!
$ CONFIG:
$!
$! Tell The User We Are Creating The [.CRYPTO._xxx]OPENSSLCONF.H File.
$!
$ WRITE SYS$OUTPUT "Creating [.CRYPTO._''ARCH']OPENSSLCONF.H Include File."
$!
$! First, make sure the directory exists.
$!
$ IF F$PARSE("SYS$DISK:[.CRYPTO._''ARCH']") .EQS. "" THEN -
CREATE/DIRECTORY SYS$DISK:[.CRYPTO._'ARCH']
$!
$! Different tar/UnZip versions/option may have named the file differently
$ IF F$SEARCH("[.crypto]opensslconf.h_in") .NES. ""
$ THEN
$ OPENSSLCONF_H_IN = "[.crypto]opensslconf.h_in"
$ ELSE
$ IF F$SEARCH( "[.crypto]opensslconf_h.in") .NES. ""
$ THEN
$ OPENSSLCONF_H_IN = "[.crypto]opensslconf_h.in"
$ ELSE
$ ! For ODS-5
$ IF F$SEARCH( "[.crypto]opensslconf.h.in") .NES. ""
$ THEN
$ OPENSSLCONF_H_IN = "[.crypto]opensslconf.h.in"
$ ELSE
$ WRITE SYS$ERROR "Couldn't find a [.crypto]opensslconf.h.in. Exiting!"
$ $STATUS = %X00018294 ! "%RMS-F-FNF, file not found".
$ GOTO TIDY
$ ENDIF
$ ENDIF
$ ENDIF
$!
$! Create The [.CRYPTO._xxx]OPENSSLCONF.H File.
$! Make sure it has the right format.
$!
$ OSCH_NAME = "SYS$DISK:[.CRYPTO._''ARCH']OPENSSLCONF.H"
$ CREATE /FDL=SYS$INPUT: 'OSCH_NAME'
RECORD
FORMAT stream_lf
$ OPEN /APPEND H_FILE 'OSCH_NAME'
$!
$! Write The [.CRYPTO._xxx]OPENSSLCONF.H File.
$!
$ WRITE H_FILE "/* This file was au