Skip to content
maketests.com 25 KiB
Newer Older
$!
$!  MAKETESTS.COM
$!  Written By:  Robert Byer
$!               Vice-President
$!               A-Com Computing, Inc.
$!               byer@mail.all-net.net
$!
$!  Changes by Richard Levitte <richard@levitte.org>
$!             Zoltan Arpadffy <arpadffy@polarhome.com>
$!
$!  This command files compiles and creates all the various different
$!  "test" programs for the different types of encryption for OpenSSL.
$!  It was written so it would try to determine what "C" compiler to
$!  use or you can specify which "C" compiler to use.
$!
$!  The test "executables" will be placed in a directory called
$!  [.xxx.EXE.TEST] where "xxx" denotes ALPHA, IA64, or VAX, depending
$!  on your machine architecture.
$!
$!  Specify DEBUG or NODEBUG P1 to compile with or without debugger
$!  information.
$!
$!  Specify which compiler at P2 to try to compile under.
$!
$!	   VAXC	 For VAX C.
$!	   DECC	 For DEC C.
$!	   GNUC	 For GNU C.
$!
$!  If you don't specify a compiler, it will try to determine which
$!  "C" compiler to use.
$!
$!  P3, if defined, sets a TCP/IP library to use, through one of the following
$!  keywords:
$!
$!	UCX		for UCX
$!	SOCKETSHR	for SOCKETSHR+NETLIB
$!
$!  P4, if defined, sets a compiler thread NOT needed on OpenVMS 7.1 (and up)
$!
$!
$!  P5, if defined, specifies the C pointer size.  Ignored on VAX.
$!      ("64=ARGV" gives more efficient code with HP C V7.3 or newer.)
$!      Supported values are:
$!
$!      ""       Compile with default (/NOPOINTER_SIZE)
$!      32       Compile with /POINTER_SIZE=32 (SHORT)
$!      64       Compile with /POINTER_SIZE=64[=ARGV] (LONG[=ARGV])
$!               (Automatically select ARGV if compiler supports it.)
$!      64=      Compile with /POINTER_SIZE=64 (LONG).
$!      64=ARGV  Compile with /POINTER_SIZE=64=ARGV (LONG=ARGV).
$!
$!  P6, if defined, specifies a directory where ZLIB files (zlib.h,
$!  libz.olb) may be found.  Optionally, a non-default object library
$!  name may be included ("dev:[dir]libz_64.olb", for example).
$!
$!
$! Announce/identify.
$!
$ proc = f$environment( "procedure")
$ write sys$output "@@@ "+ -
   f$parse( proc, , , "name")+ f$parse( proc, , , "type")
$!
$! Define A TCP/IP Library That We Will Need To Link To.
$! (That is, If We Need To Link To One.)
$!
$ TCPIP_LIB = ""
$ ZLIB_LIB = ""
$!
$! Check Which Architecture We Are Using.
$!
$ if (f$getsyi( "cpu") .lt. 128)
$ then
$    ARCH = "VAX"
$ else
$    ARCH = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
$    if (ARCH .eqs. "") then ARCH = "UNK"
$ endif
$!
$ ARCHD = ARCH
$ LIB32 = "32"
$ OPT_FILE = ""
$ POINTER_SIZE = ""
$!
$! Check To Make Sure We Have Valid Command Line Parameters.
$!
$ GOSUB CHECK_OPTIONS
$!
$! Define The OBJ and EXE Directories.
$!
$ OBJ_DIR := SYS$DISK:[-.'ARCHD'.OBJ.TEST]
$ EXE_DIR := SYS$DISK:[-.'ARCHD'.EXE.TEST]
$!
$! Specify the destination directory in any /MAP option.
$!
$ if (LINKMAP .eqs. "MAP")
$ then
$   LINKMAP = LINKMAP+ "=''EXE_DIR'"
$ endif
$!
$! Add the location prefix to the linker options file name.
$!
$ if (OPT_FILE .nes. "")
$ then
$   OPT_FILE = EXE_DIR+ OPT_FILE
$ endif
$!
$! Initialise logical names and such
$!
$ GOSUB INITIALISE
$!
$! Tell The User What Kind of Machine We Run On.
$!
$ WRITE SYS$OUTPUT "Host system architecture: ''ARCHD'"
$!
$! Define The CRYPTO-LIB We Are To Use.
$!
$ CRYPTO_LIB := SYS$DISK:[-.'ARCHD'.EXE.CRYPTO]SSL_LIBCRYPTO'LIB32'.OLB
$!
$! Define The SSL We Are To Use.
$!
$ SSL_LIB := SYS$DISK:[-.'ARCHD'.EXE.SSL]SSL_LIBSSL'LIB32'.OLB
$!
$! Create the OBJ and EXE Directories, if needed.
$!
$ IF (F$PARSE(OBJ_DIR).EQS."") THEN -
   CREATE /DIRECTORY 'OBJ_DIR'
$ IF (F$PARSE(EXE_DIR).EQS."") THEN -
   CREATE /DIRECTORY 'EXE_DIR'
$!
$! Check To See If We Have The Proper Libraries.
$!
$ GOSUB LIB_CHECK
$!
$! Check To See If We Have A Linker Option File.
$!
$ GOSUB CHECK_OPT_FILE
$!
$! Define The TEST Files.
$! NOTE: Some might think this list ugly.  However, it's made this way to
$! reflect the EXE variable in Makefile as closely as possible,
$! thereby making it fairly easy to verify that the lists are the same.
$!
$ TEST_FILES = "BNTEST,ECTEST,ECDSATEST,ECDHTEST,IDEATEST,"+ -
	       "MD2TEST,MD4TEST,MD5TEST,HMACTEST,WP_TEST,"+ -
	       "RC2TEST,RC4TEST,RC5TEST,"+ -
	       "DESTEST,SHATEST,SHA1TEST,SHA256T,SHA512T,"+ -
	       "MDC2TEST,RMDTEST,"+ -
	       "RANDTEST,DHTEST,ENGINETEST,"+ -
	       "BFTEST,CASTTEST,SSLTEST,EXPTEST,DSATEST,RSA_TEST,"+ -
	       "EVP_TEST,IGETEST,JPAKETEST,SRPTEST,"+ -
	       "ASN1TEST,HEARTBEAT_TEST,CONSTANT_TIME_TEST"
$! Should we add MTTEST,PQ_TEST,LH_TEST,DIVTEST,TABTEST as well?
$!
$! Additional directory information.
$ T_D_BNTEST     := [-.crypto.bn]
$ T_D_ECTEST     := [-.crypto.ec]
$ T_D_ECDSATEST  := [-.crypto.ecdsa]
$ T_D_ECDHTEST   := [-.crypto.ecdh]
$ T_D_IDEATEST   := [-.crypto.idea]
$ T_D_MD2TEST    := [-.crypto.md2]
$ T_D_MD4TEST    := [-.crypto.md4]
$ T_D_MD5TEST    := [-.crypto.md5]
$ T_D_HMACTEST   := [-.crypto.hmac]
$ T_D_WP_TEST    := [-.crypto.whrlpool]
$ T_D_RC2TEST    := [-.crypto.rc2]
$ T_D_RC4TEST    := [-.crypto.rc4]
$ T_D_RC5TEST    := [-.crypto.rc5]
$ T_D_DESTEST    := [-.crypto.des]
$ T_D_SHATEST    := [-.crypto.sha]
$ T_D_SHA1TEST   := [-.crypto.sha]
$ T_D_SHA256T    := [-.crypto.sha]
$ T_D_SHA512T    := [-.crypto.sha]
$ T_D_MDC2TEST   := [-.crypto.mdc2]
$ T_D_RMDTEST    := [-.crypto.ripemd]
$ T_D_RANDTEST   := [-.crypto.rand]
$ T_D_DHTEST     := [-.crypto.dh]
$ T_D_ENGINETEST := [-.crypto.engine]
$ T_D_BFTEST     := [-.crypto.bf]
$ T_D_CASTTEST   := [-.crypto.cast]
$ T_D_SSLTEST    := [-.ssl]
$ T_D_EXPTEST    := [-.crypto.bn]
$ T_D_DSATEST    := [-.crypto.dsa]
$ T_D_RSA_TEST   := [-.crypto.rsa]
$ T_D_EVP_TEST   := [-.crypto.evp]
$ T_D_IGETEST    := [-.test]
$ T_D_JPAKETEST  := [-.crypto.jpake]
$ T_D_SRPTEST    := [-.crypto.srp]
$ T_D_ASN1TEST   := [-.test]
$ T_D_HEARTBEAT_TEST := [-.ssl]
$ T_D_CONSTANT_TIME_TEST := [-.crypto]
$!
$ TCPIP_PROGRAMS = ",,"
$ IF COMPILER .EQS. "VAXC" THEN -
     TCPIP_PROGRAMS = ",SSLTEST,"
$!
$! Define A File Counter And Set It To "0".
$!
$ FILE_COUNTER = 0
$!
$! Top Of The File Loop.
Loading
Loading full blame…