1999-05-13 11:37:32 +00:00
|
|
|
$!
|
|
|
|
$! CRYPTO-LIB.COM
|
|
|
|
$! Written By: Robert Byer
|
|
|
|
$! Vice-President
|
|
|
|
$! A-Com Computing, Inc.
|
|
|
|
$! byer@mail.all-net.net
|
|
|
|
$!
|
|
|
|
$! Changes by Richard Levitte <richard@levitte.org>
|
2010-01-27 09:18:42 +00:00
|
|
|
$! Zoltan Arpadffy <arpadffy@polarhome.com>
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
|
|
|
$! This command files compiles and creates the "[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB"
|
2009-05-15 16:36:56 +00:00
|
|
|
$! library for OpenSSL. The "xxx" denotes the machine architecture, ALPHA,
|
|
|
|
$! IA64 or VAX.
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
|
|
|
$! It was re-written so it would try to determine what "C" compiler to use
|
|
|
|
$! or you can specify which "C" compiler to use.
|
|
|
|
$!
|
1999-11-12 02:21:49 +00:00
|
|
|
$! Specify the following as P1 to build just that part or ALL to just
|
|
|
|
$! build everything.
|
|
|
|
$!
|
2009-05-15 16:36:56 +00:00
|
|
|
$! LIBRARY To just compile the [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library.
|
|
|
|
$! APPS To just compile the [.xxx.EXE.CRYPTO]*.EXE
|
|
|
|
$! ALL To do both LIBRARY and APPS
|
1999-11-12 02:21:49 +00:00
|
|
|
$!
|
2002-10-31 16:46:52 +00:00
|
|
|
$! Specify DEBUG or NODEBUG as P2 to compile with or without debugger
|
1999-05-13 11:37:32 +00:00
|
|
|
$! information.
|
|
|
|
$!
|
2002-10-31 16:46:52 +00:00
|
|
|
$! Specify which compiler at P3 to try to compile under.
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
2009-05-15 16:36:56 +00:00
|
|
|
$! VAXC For VAX C.
|
|
|
|
$! DECC For DEC C.
|
|
|
|
$! GNUC For GNU C.
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
2009-05-15 16:36:56 +00:00
|
|
|
$! If you don't specify a compiler, it will try to determine which
|
1999-05-13 11:37:32 +00:00
|
|
|
$! "C" compiler to use.
|
|
|
|
$!
|
2002-10-31 16:46:52 +00:00
|
|
|
$! P4, if defined, sets a TCP/IP library to use, through one of the following
|
1999-05-13 11:37:32 +00:00
|
|
|
$! keywords:
|
|
|
|
$!
|
2009-05-15 16:36:56 +00:00
|
|
|
$! UCX For UCX
|
|
|
|
$! TCPIP For TCPIP (post UCX)
|
|
|
|
$! SOCKETSHR For SOCKETSHR+NETLIB
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
2002-10-31 16:46:52 +00:00
|
|
|
$! P5, if defined, sets a compiler thread NOT needed on OpenVMS 7.1 (and up)
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
2002-10-31 16:46:52 +00:00
|
|
|
$! P6, if defined, sets a choice of crypto methods to compile.
|
1999-05-13 11:37:32 +00:00
|
|
|
$! WARNING: this should only be done to recompile some part of an already
|
|
|
|
$! fully compiled library.
|
|
|
|
$!
|
2011-03-19 10:58:14 +00:00
|
|
|
$! P7, if defined, specifies the C pointer size. Ignored on VAX.
|
2011-03-25 16:20:35 +00:00
|
|
|
$! ("64=ARGV" gives more efficient code with HP C V7.3 or newer.)
|
2011-03-19 10:58:14 +00:00
|
|
|
$! Supported values are:
|
2010-12-14 19:19:04 +00:00
|
|
|
$!
|
2011-03-25 16:20:35 +00:00
|
|
|
$! "" Compile with default (/NOPOINTER_SIZE)
|
|
|
|
$! 32 Compile with /POINTER_SIZE=32 (SHORT)
|
2011-03-25 09:40:48 +00:00
|
|
|
$! 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).
|
2010-12-14 19:19:04 +00:00
|
|
|
$!
|
2011-03-19 10:58:14 +00:00
|
|
|
$! P8, 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")
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
|
|
|
$! Define A TCP/IP Library That We Will Need To Link To.
|
|
|
|
$! (That Is, If We Need To Link To One.)
|
|
|
|
$!
|
|
|
|
$ TCPIP_LIB = ""
|
2011-03-19 10:58:14 +00:00
|
|
|
$ ZLIB_LIB = ""
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
|
|
|
$! Check Which Architecture We Are Using.
|
|
|
|
$!
|
2009-05-15 16:36:56 +00:00
|
|
|
$ IF (F$GETSYI("CPU").LT.128)
|
1999-05-13 11:37:32 +00:00
|
|
|
$ THEN
|
|
|
|
$!
|
2009-05-15 16:36:56 +00:00
|
|
|
$! The Architecture Is VAX
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
2011-03-19 10:58:14 +00:00
|
|
|
$ ARCH = "VAX"
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
|
|
|
$! Else...
|
|
|
|
$!
|
|
|
|
$ ELSE
|
|
|
|
$!
|
2009-05-15 16:36:56 +00:00
|
|
|
$! The Architecture Is Alpha, IA64 or whatever comes in the future.
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
2009-05-15 16:36:56 +00:00
|
|
|
$ ARCH = F$EDIT( F$GETSYI( "ARCH_NAME"), "UPCASE")
|
|
|
|
$ IF (ARCH .EQS. "") THEN ARCH = "UNK"
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
|
|
|
$! End The Architecture Check.
|
|
|
|
$!
|
|
|
|
$ ENDIF
|
|
|
|
$!
|
2011-03-19 10:58:14 +00:00
|
|
|
$ ARCHD = ARCH
|
|
|
|
$ LIB32 = "32"
|
|
|
|
$ OPT_FILE = ""
|
|
|
|
$ POINTER_SIZE = ""
|
|
|
|
$!
|
1999-05-13 11:37:32 +00:00
|
|
|
$! Define The Different Encryption Types.
|
2009-05-15 16:36:56 +00:00
|
|
|
$! NOTE: Some might think this list ugly. However, it's made this way to
|
|
|
|
$! reflect the SDIRS variable in [-]Makefile.org as closely as possible,
|
|
|
|
$! thereby making it fairly easy to verify that the lists are the same.
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
2011-03-19 10:58:14 +00:00
|
|
|
$ ET_WHIRLPOOL = "WHRLPOOL"
|
|
|
|
$ IF ARCH .EQS. "VAX" THEN ET_WHIRLPOOL = ""
|
2003-11-29 09:19:12 +00:00
|
|
|
$ ENCRYPT_TYPES = "Basic,"+ -
|
|
|
|
"OBJECTS,"+ -
|
2011-03-19 10:58:14 +00:00
|
|
|
"MD2,MD4,MD5,SHA,MDC2,HMAC,RIPEMD,"+ET_WHIRLPOOL+","+ -
|
2008-12-26 23:52:06 +00:00
|
|
|
"DES,AES,RC2,RC4,RC5,IDEA,BF,CAST,CAMELLIA,SEED,MODES,"+ -
|
2006-04-10 11:39:49 +00:00
|
|
|
"BN,EC,RSA,DSA,ECDSA,DH,ECDH,DSO,ENGINE,"+ -
|
2003-11-29 09:19:12 +00:00
|
|
|
"BUFFER,BIO,STACK,LHASH,RAND,ERR,"+ -
|
2006-04-10 11:39:49 +00:00
|
|
|
"EVP,EVP_2,EVP_3,ASN1,ASN1_2,PEM,X509,X509V3,"+ -
|
2003-05-01 03:53:12 +00:00
|
|
|
"CONF,TXT_DB,PKCS7,PKCS12,COMP,OCSP,UI,KRB5,"+ -
|
2011-03-19 10:58:14 +00:00
|
|
|
"CMS,PQUEUE,TS,JPAKE,SRP,STORE,CMAC"
|
2009-05-15 16:36:56 +00:00
|
|
|
$!
|
2011-03-19 10:58:14 +00:00
|
|
|
$! Check To Make Sure We Have Valid Command Line Parameters.
|
2009-05-15 16:36:56 +00:00
|
|
|
$!
|
2011-03-19 10:58:14 +00:00
|
|
|
$ GOSUB CHECK_OPTIONS
|
2009-05-15 16:36:56 +00:00
|
|
|
$!
|
2011-03-19 10:58:14 +00:00
|
|
|
$! Define The OBJ and EXE Directories.
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
2011-03-19 10:58:14 +00:00
|
|
|
$ OBJ_DIR := SYS$DISK:[-.'ARCHD'.OBJ.CRYPTO]
|
|
|
|
$ EXE_DIR := SYS$DISK:[-.'ARCHD'.EXE.CRYPTO]
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
2011-03-19 10:58:14 +00:00
|
|
|
$! 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
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
|
|
|
$! Initialise logical names and such
|
|
|
|
$!
|
|
|
|
$ GOSUB INITIALISE
|
|
|
|
$!
|
|
|
|
$! Tell The User What Kind of Machine We Run On.
|
|
|
|
$!
|
2011-03-19 10:58:14 +00:00
|
|
|
$ WRITE SYS$OUTPUT "Host system architecture: ''ARCHD'"
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
|
|
|
$!
|
|
|
|
$! Check To See If The Architecture Specific OBJ Directory Exists.
|
|
|
|
$!
|
|
|
|
$ IF (F$PARSE(OBJ_DIR).EQS."")
|
|
|
|
$ THEN
|
|
|
|
$!
|
|
|
|
$! It Dosen't Exist, So Create It.
|
|
|
|
$!
|
|
|
|
$ CREATE/DIR 'OBJ_DIR'
|
|
|
|
$!
|
|
|
|
$! End The Architecture Specific OBJ Directory Check.
|
|
|
|
$!
|
|
|
|
$ ENDIF
|
|
|
|
$!
|
|
|
|
$! Check To See If The Architecture Specific Directory Exists.
|
|
|
|
$!
|
|
|
|
$ IF (F$PARSE(EXE_DIR).EQS."")
|
|
|
|
$ THEN
|
|
|
|
$!
|
|
|
|
$! It Dosen't Exist, So Create It.
|
|
|
|
$!
|
|
|
|
$ CREATE/DIRECTORY 'EXE_DIR'
|
|
|
|
$!
|
|
|
|
$! End The Architecture Specific Directory Check.
|
|
|
|
$!
|
|
|
|
$ ENDIF
|
|
|
|
$!
|
|
|
|
$! Define The Library Name.
|
|
|
|
$!
|
2011-03-19 10:58:14 +00:00
|
|
|
$ LIB_NAME := 'EXE_DIR'SSL_LIBCRYPTO'LIB32'.OLB
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
1999-11-12 02:21:49 +00:00
|
|
|
$! Define The CRYPTO-LIB We Are To Use.
|
|
|
|
$!
|
2011-03-19 10:58:14 +00:00
|
|
|
$ CRYPTO_LIB := 'EXE_DIR'SSL_LIBCRYPTO'LIB32'.OLB
|
1999-11-12 02:21:49 +00:00
|
|
|
$!
|
1999-05-13 11:37:32 +00:00
|
|
|
$! Check To See If We Already Have A "[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB" Library...
|
|
|
|
$!
|
|
|
|
$ IF (F$SEARCH(LIB_NAME).EQS."")
|
|
|
|
$ THEN
|
|
|
|
$!
|
|
|
|
$! Guess Not, Create The Library.
|
|
|
|
$!
|
|
|
|
$ LIBRARY/CREATE/OBJECT 'LIB_NAME'
|
|
|
|
$!
|
|
|
|
$! End The Library Check.
|
|
|
|
$!
|
|
|
|
$ ENDIF
|
|
|
|
$!
|
1999-11-12 02:21:49 +00:00
|
|
|
$! Build our options file for the application
|
|
|
|
$!
|
|
|
|
$ GOSUB CHECK_OPT_FILE
|
|
|
|
$!
|
1999-05-13 11:37:32 +00:00
|
|
|
$! Define The Different Encryption "library" Strings.
|
|
|
|
$!
|
1999-11-12 02:21:49 +00:00
|
|
|
$ APPS_DES = "DES/DES,CBC3_ENC"
|
|
|
|
$ APPS_PKCS7 = "ENC/ENC;DEC/DEC;SIGN/SIGN;VERIFY/VERIFY,EXAMPLE"
|
|
|
|
$
|
2011-10-30 11:46:07 +00:00
|
|
|
$ LIB_ = "cryptlib,mem,mem_clr,mem_dbg,cversion,ex_data,cpt_err,"+ -
|
|
|
|
"ebcdic,uid,o_time,o_str,o_dir,thr_id,lock,fips_ers,"+ -
|
|
|
|
"o_init,o_fips"
|
1999-05-13 11:37:32 +00:00
|
|
|
$ LIB_MD2 = "md2_dgst,md2_one"
|
2000-08-17 22:43:31 +00:00
|
|
|
$ LIB_MD4 = "md4_dgst,md4_one"
|
1999-05-13 11:37:32 +00:00
|
|
|
$ LIB_MD5 = "md5_dgst,md5_one"
|
2004-05-26 17:05:51 +00:00
|
|
|
$ LIB_SHA = "sha_dgst,sha1dgst,sha_one,sha1_one,sha256,sha512"
|
1999-05-13 11:37:32 +00:00
|
|
|
$ LIB_MDC2 = "mdc2dgst,mdc2_one"
|
2007-05-01 12:25:15 +00:00
|
|
|
$ LIB_HMAC = "hmac,hm_ameth,hm_pmeth"
|
1999-05-13 11:37:32 +00:00
|
|
|
$ LIB_RIPEMD = "rmd_dgst,rmd_one"
|
2005-11-29 12:46:17 +00:00
|
|
|
$ LIB_WHRLPOOL = "wp_dgst,wp_block"
|
1999-05-13 11:37:32 +00:00
|
|
|
$ LIB_DES = "set_key,ecb_enc,cbc_enc,"+ -
|
|
|
|
"ecb3_enc,cfb64enc,cfb64ede,cfb_enc,ofb64ede,"+ -
|
|
|
|
"enc_read,enc_writ,ofb64enc,"+ -
|
|
|
|
"ofb_enc,str2key,pcbc_enc,qud_cksm,rand_key,"+ -
|
2001-05-14 11:59:02 +00:00
|
|
|
"des_enc,fcrypt_b,"+ -
|
2002-03-04 18:07:59 +00:00
|
|
|
"fcrypt,xcbc_enc,rpc_enc,cbc_cksm,"+ -
|
2002-03-26 13:59:22 +00:00
|
|
|
"ede_cbcm_enc,des_old,des_old2,read2pwd"
|
1999-05-13 11:37:32 +00:00
|
|
|
$ LIB_RC2 = "rc2_ecb,rc2_skey,rc2_cbc,rc2cfb64,rc2ofb64"
|
|
|
|
$ LIB_RC4 = "rc4_skey,rc4_enc"
|
|
|
|
$ LIB_RC5 = "rc5_skey,rc5_ecb,rc5_enc,rc5cfb64,rc5ofb64"
|
|
|
|
$ LIB_IDEA = "i_cbc,i_cfb64,i_ofb64,i_ecb,i_skey"
|
|
|
|
$ LIB_BF = "bf_skey,bf_ecb,bf_enc,bf_cfb64,bf_ofb64"
|
|
|
|
$ LIB_CAST = "c_skey,c_ecb,c_enc,c_cfb64,c_ofb64"
|
2012-07-05 13:19:06 +00:00
|
|
|
$ LIB_CAMELLIA = "camellia,cmll_misc,cmll_ecb,cmll_cbc,cmll_ofb,"+ -
|
|
|
|
"cmll_cfb,cmll_ctr"
|
2008-12-26 23:52:06 +00:00
|
|
|
$ LIB_SEED = "seed,seed_ecb,seed_cbc,seed_cfb,seed_ofb"
|
2011-10-30 11:46:07 +00:00
|
|
|
$ LIB_MODES = "cbc128,ctr128,cts128,cfb128,ofb128,gcm128,"+ -
|
|
|
|
"ccm128,xts128"
|
1999-05-13 11:37:32 +00:00
|
|
|
$ LIB_BN_ASM = "[.asm]vms.mar,vms-helper"
|
2010-01-27 09:18:42 +00:00
|
|
|
$ IF F$TRNLNM("OPENSSL_NO_ASM") .OR. ARCH .NES. "VAX" THEN -
|
|
|
|
LIB_BN_ASM = "bn_asm"
|
2000-12-28 22:26:11 +00:00
|
|
|
$ LIB_BN = "bn_add,bn_div,bn_exp,bn_lib,bn_ctx,bn_mul,bn_mod,"+ -
|
1999-05-13 11:37:32 +00:00
|
|
|
"bn_print,bn_rand,bn_shift,bn_word,bn_blind,"+ -
|
2000-12-28 22:26:11 +00:00
|
|
|
"bn_kron,bn_sqrt,bn_gcd,bn_prime,bn_err,bn_sqr,"+LIB_BN_ASM+","+ -
|
2002-12-15 20:59:24 +00:00
|
|
|
"bn_recp,bn_mont,bn_mpi,bn_exp2,bn_gf2m,bn_nist,"+ -
|
2011-03-19 10:58:14 +00:00
|
|
|
"bn_depr,bn_const,bn_x931p"
|
2005-04-17 09:07:37 +00:00
|
|
|
$ LIB_EC = "ec_lib,ecp_smpl,ecp_mont,ecp_nist,ec_cvt,ec_mult,"+ -
|
2002-08-09 22:32:32 +00:00
|
|
|
"ec_err,ec_curve,ec_check,ec_print,ec_asn1,ec_key,"+ -
|
2011-03-20 10:23:27 +00:00
|
|
|
"ec2_smpl,ec2_mult,ec_ameth,ec_pmeth,eck_prn,"+ -
|
2011-10-30 11:46:07 +00:00
|
|
|
"ecp_nistp224,ecp_nistp256,ecp_nistp521,ecp_nistputil,"+ -
|
|
|
|
"ecp_oct,ec2_oct,ec_oct"
|
1999-05-13 11:37:32 +00:00
|
|
|
$ LIB_RSA = "rsa_eay,rsa_gen,rsa_lib,rsa_sign,rsa_saos,rsa_err,"+ -
|
2000-12-28 22:26:11 +00:00
|
|
|
"rsa_pk1,rsa_ssl,rsa_none,rsa_oaep,rsa_chk,rsa_null,"+ -
|
2006-04-10 11:39:49 +00:00
|
|
|
"rsa_pss,rsa_x931,rsa_asn1,rsa_depr,rsa_ameth,rsa_prn,"+ -
|
2011-03-23 00:10:16 +00:00
|
|
|
"rsa_pmeth,rsa_crpt,rsa_x931g"
|
2002-12-15 20:59:24 +00:00
|
|
|
$ LIB_DSA = "dsa_gen,dsa_key,dsa_lib,dsa_asn1,dsa_vrf,dsa_sign,"+ -
|
2006-04-13 09:59:52 +00:00
|
|
|
"dsa_err,dsa_ossl,dsa_depr,dsa_ameth,dsa_pmeth,dsa_prn"
|
2002-08-09 22:32:32 +00:00
|
|
|
$ LIB_ECDSA = "ecs_lib,ecs_asn1,ecs_ossl,ecs_sign,ecs_vrf,ecs_err"
|
2006-03-21 06:22:36 +00:00
|
|
|
$ LIB_DH = "dh_asn1,dh_gen,dh_key,dh_lib,dh_check,dh_err,dh_depr,"+ -
|
2012-07-05 13:19:06 +00:00
|
|
|
"dh_ameth,dh_pmeth,dh_prn,dh_rfc5114"
|
2002-08-09 22:32:32 +00:00
|
|
|
$ LIB_ECDH = "ech_lib,ech_ossl,ech_key,ech_err"
|
2000-09-15 22:16:41 +00:00
|
|
|
$ LIB_DSO = "dso_dl,dso_dlfcn,dso_err,dso_lib,dso_null,"+ -
|
2006-04-13 09:59:52 +00:00
|
|
|
"dso_openssl,dso_win32,dso_vms,dso_beos"
|
2001-09-27 16:07:36 +00:00
|
|
|
$ LIB_ENGINE = "eng_err,eng_lib,eng_list,eng_init,eng_ctrl,"+ -
|
|
|
|
"eng_table,eng_pkey,eng_fat,eng_all,"+ -
|
2003-05-01 03:57:46 +00:00
|
|
|
"tb_rsa,tb_dsa,tb_ecdsa,tb_dh,tb_ecdh,tb_rand,tb_store,"+ -
|
2006-06-03 02:17:49 +00:00
|
|
|
"tb_cipher,tb_digest,tb_pkmeth,tb_asnmth,"+ -
|
2010-11-22 22:04:41 +00:00
|
|
|
"eng_openssl,eng_dyn,eng_cnf,eng_cryptodev,"+ -
|
2011-10-30 11:46:07 +00:00
|
|
|
"eng_rsax,eng_rdrand"
|
2010-11-22 22:04:41 +00:00
|
|
|
$ LIB_AES = "aes_core,aes_misc,aes_ecb,aes_cbc,aes_cfb,aes_ofb,"+ -
|
2009-01-20 05:39:24 +00:00
|
|
|
"aes_ige,aes_wrap"
|
2011-01-10 20:55:21 +00:00
|
|
|
$ LIB_BUFFER = "buffer,buf_str,buf_err"
|
1999-05-13 11:37:32 +00:00
|
|
|
$ LIB_BIO = "bio_lib,bio_cb,bio_err,"+ -
|
|
|
|
"bss_mem,bss_null,bss_fd,"+ -
|
|
|
|
"bss_file,bss_sock,bss_conn,"+ -
|
|
|
|
"bf_null,bf_buff,b_print,b_dump,"+ -
|
On VMS, stdout may very well lead to a file that is written to in a
record-oriented fashion. That means that every write() will write a
separate record, which will be read separately by the programs trying
to read from it. This can be very confusing.
The solution is to put a BIO filter in the way that will buffer text
until a linefeed is reached, and then write everything a line at a
time, so every record written will be an actual line, not chunks of
lines and not (usually doesn't happen, but I've seen it once) several
lines in one record. Voila, BIO_f_linebuffer() is born.
Since we're so close to release time, I'm making this VMS-only for
now, just to make sure no code is needlessly broken by this. After
the release, this BIO method will be enabled on all other platforms as
well.
2000-09-20 13:55:50 +00:00
|
|
|
"b_sock,bss_acpt,bf_nbio,bss_rtcp,bss_bio,bss_log,"+ -
|
2005-06-01 16:24:15 +00:00
|
|
|
"bss_dgram,"+ -
|
On VMS, stdout may very well lead to a file that is written to in a
record-oriented fashion. That means that every write() will write a
separate record, which will be read separately by the programs trying
to read from it. This can be very confusing.
The solution is to put a BIO filter in the way that will buffer text
until a linefeed is reached, and then write everything a line at a
time, so every record written will be an actual line, not chunks of
lines and not (usually doesn't happen, but I've seen it once) several
lines in one record. Voila, BIO_f_linebuffer() is born.
Since we're so close to release time, I'm making this VMS-only for
now, just to make sure no code is needlessly broken by this. After
the release, this BIO method will be enabled on all other platforms as
well.
2000-09-20 13:55:50 +00:00
|
|
|
"bf_lbuf"
|
1999-05-13 11:37:32 +00:00
|
|
|
$ LIB_STACK = "stack"
|
|
|
|
$ LIB_LHASH = "lhash,lh_stats"
|
2001-01-08 21:32:46 +00:00
|
|
|
$ LIB_RAND = "md_rand,randfile,rand_lib,rand_err,rand_egd,"+ -
|
|
|
|
"rand_vms"
|
1999-05-13 11:37:32 +00:00
|
|
|
$ LIB_ERR = "err,err_all,err_prn"
|
2006-04-19 06:44:07 +00:00
|
|
|
$ LIB_OBJECTS = "o_names,obj_dat,obj_lib,obj_err,obj_xref"
|
2012-07-05 13:19:06 +00:00
|
|
|
$ LIB_EVP = "encode,digest,evp_enc,evp_key,evp_acnf,evp_cnf,"+ -
|
2008-12-25 22:04:42 +00:00
|
|
|
"e_des,e_bf,e_idea,e_des3,e_camellia,"+ -
|
|
|
|
"e_rc4,e_aes,names,e_seed,"+ -
|
2000-09-09 18:05:27 +00:00
|
|
|
"e_xcbc_d,e_rc2,e_cast,e_rc5"
|
2005-12-02 09:30:25 +00:00
|
|
|
$ LIB_EVP_2 = "m_null,m_md2,m_md4,m_md5,m_sha,m_sha1,m_wp," + -
|
2002-08-12 13:31:57 +00:00
|
|
|
"m_dss,m_dss1,m_mdc2,m_ripemd,m_ecdsa,"+ -
|
1999-05-13 11:37:32 +00:00
|
|
|
"p_open,p_seal,p_sign,p_verify,p_lib,p_enc,p_dec,"+ -
|
|
|
|
"bio_md,bio_b64,bio_enc,evp_err,e_null,"+ -
|
2000-02-23 19:41:09 +00:00
|
|
|
"c_all,c_allc,c_alld,evp_lib,bio_ok,"+-
|
|
|
|
"evp_pkey,evp_pbe,p5_crpt,p5_crpt2"
|
2011-10-30 14:43:53 +00:00
|
|
|
$ LIB_EVP_3 = "e_old,pmeth_lib,pmeth_fn,pmeth_gn,m_sigver,"+ -
|
2011-10-30 11:46:07 +00:00
|
|
|
"e_aes_cbc_hmac_sha1,e_rc4_hmac_md5"
|
1999-05-13 11:37:32 +00:00
|
|
|
$ LIB_ASN1 = "a_object,a_bitstr,a_utctm,a_gentm,a_time,a_int,a_octet,"+ -
|
2000-12-28 22:26:11 +00:00
|
|
|
"a_print,a_type,a_set,a_dup,a_d2i_fp,a_i2d_fp,"+ -
|
|
|
|
"a_enum,a_utf8,a_sign,a_digest,a_verify,a_mbstr,a_strex,"+ -
|
|
|
|
"x_algor,x_val,x_pubkey,x_sig,x_req,x_attrib,x_bignum,"+ -
|
2001-02-20 13:10:14 +00:00
|
|
|
"x_long,x_name,x_x509,x_x509a,x_crl,x_info,x_spki,nsseq,"+ -
|
2005-08-30 06:00:32 +00:00
|
|
|
"x_nx509,d2i_pu,d2i_pr,i2d_pu,i2d_pr"
|
2000-01-16 02:11:19 +00:00
|
|
|
$ LIB_ASN1_2 = "t_req,t_x509,t_x509a,t_crl,t_pkey,t_spki,t_bitst,"+ -
|
2001-02-20 13:10:14 +00:00
|
|
|
"tasn_new,tasn_fre,tasn_enc,tasn_dec,tasn_utl,tasn_typ,"+ -
|
2011-03-23 00:10:16 +00:00
|
|
|
"tasn_prn,tasn_scn,ameth_lib,"+ -
|
2000-12-28 22:26:11 +00:00
|
|
|
"f_int,f_string,n_pkey,"+ -
|
2008-04-18 06:04:03 +00:00
|
|
|
"f_enum,x_pkey,a_bool,x_exten,bio_asn1,bio_ndef,asn_mime,"+ -
|
2005-08-28 11:28:48 +00:00
|
|
|
"asn1_gen,asn1_par,asn1_lib,asn1_err,a_bytes,a_strnid,"+ -
|
2002-01-21 15:37:53 +00:00
|
|
|
"evp_asn1,asn_pack,p5_pbe,p5_pbev2,p8_pkey,asn_moid"
|
2001-07-27 07:47:51 +00:00
|
|
|
$ LIB_PEM = "pem_sign,pem_seal,pem_info,pem_lib,pem_all,pem_err,"+ -
|
2005-09-01 14:24:43 +00:00
|
|
|
"pem_x509,pem_xaux,pem_oth,pem_pk8,pem_pkey,pvkfmt"
|
1999-05-13 11:37:32 +00:00
|
|
|
$ LIB_X509 = "x509_def,x509_d2,x509_r2x,x509_cmp,"+ -
|
1999-11-12 02:21:49 +00:00
|
|
|
"x509_obj,x509_req,x509spki,x509_vfy,"+ -
|
2001-09-27 16:07:36 +00:00
|
|
|
"x509_set,x509cset,x509rset,x509_err,"+ -
|
2000-01-16 02:11:19 +00:00
|
|
|
"x509name,x509_v3,x509_ext,x509_att,"+ -
|
1999-05-13 11:37:32 +00:00
|
|
|
"x509type,x509_lu,x_all,x509_txt,"+ -
|
2004-09-08 08:13:34 +00:00
|
|
|
"x509_trs,by_file,by_dir,x509_vpm"
|
1999-05-13 11:37:32 +00:00
|
|
|
$ LIB_X509V3 = "v3_bcons,v3_bitst,v3_conf,v3_extku,v3_ia5,v3_lib,"+ -
|
|
|
|
"v3_prn,v3_utl,v3err,v3_genn,v3_alt,v3_skey,v3_akey,v3_pku,"+ -
|
2000-12-28 22:26:11 +00:00
|
|
|
"v3_int,v3_enum,v3_sxnet,v3_cpols,v3_crld,v3_purp,v3_info,"+ -
|
2004-12-28 10:22:00 +00:00
|
|
|
"v3_ocsp,v3_akeya,v3_pmaps,v3_pcons,v3_ncons,v3_pcia,v3_pci,"+ -
|
2006-12-24 09:27:23 +00:00
|
|
|
"pcy_cache,pcy_node,pcy_data,pcy_map,pcy_tree,pcy_lib,"+ -
|
|
|
|
"v3_asid,v3_addr"
|
2002-08-15 09:39:01 +00:00
|
|
|
$ LIB_CONF = "conf_err,conf_lib,conf_api,conf_def,conf_mod,conf_mall,conf_sap"
|
1999-05-13 11:37:32 +00:00
|
|
|
$ LIB_TXT_DB = "txt_db"
|
2000-12-28 22:26:11 +00:00
|
|
|
$ LIB_PKCS7 = "pk7_asn1,pk7_lib,pkcs7err,pk7_doit,pk7_smime,pk7_attr,"+ -
|
2006-12-24 20:25:51 +00:00
|
|
|
"pk7_mime,bio_pk7"
|
2000-12-28 22:26:11 +00:00
|
|
|
$ LIB_PKCS12 = "p12_add,p12_asn,p12_attr,p12_crpt,p12_crt,p12_decr,"+ -
|
|
|
|
"p12_init,p12_key,p12_kiss,p12_mutl,"+ -
|
2001-07-27 07:47:51 +00:00
|
|
|
"p12_utl,p12_npas,pk12err,p12_p8d,p12_p8e"
|
2002-08-15 09:39:01 +00:00
|
|
|
$ LIB_COMP = "comp_lib,comp_err,"+ -
|
1999-05-13 11:37:32 +00:00
|
|
|
"c_rle,c_zlib"
|
2001-02-19 16:06:34 +00:00
|
|
|
$ LIB_OCSP = "ocsp_asn,ocsp_ext,ocsp_ht,ocsp_lib,ocsp_cl,"+ -
|
2001-04-20 12:37:14 +00:00
|
|
|
"ocsp_srv,ocsp_prn,ocsp_vfy,ocsp_err"
|
2002-02-28 13:17:40 +00:00
|
|
|
$ LIB_UI_COMPAT = ",ui_compat"
|
|
|
|
$ LIB_UI = "ui_err,ui_lib,ui_openssl,ui_util"+LIB_UI_COMPAT
|
2001-10-04 07:34:45 +00:00
|
|
|
$ LIB_KRB5 = "krb5_asn"
|
2008-04-11 01:53:16 +00:00
|
|
|
$ LIB_CMS = "cms_lib,cms_asn1,cms_att,cms_io,cms_smime,cms_err,"+ -
|
2010-11-22 22:04:41 +00:00
|
|
|
"cms_sd,cms_dd,cms_cd,cms_env,cms_enc,cms_ess,"+ -
|
|
|
|
"cms_pwri"
|
2005-04-28 04:55:28 +00:00
|
|
|
$ LIB_PQUEUE = "pqueue"
|
2006-02-26 10:46:39 +00:00
|
|
|
$ LIB_TS = "ts_err,ts_req_utils,ts_req_print,ts_rsp_utils,ts_rsp_print,"+ -
|
|
|
|
"ts_rsp_sign,ts_rsp_verify,ts_verify_ctx,ts_lib,ts_conf,"+ -
|
|
|
|
"ts_asn1"
|
2008-12-16 10:54:28 +00:00
|
|
|
$ LIB_JPAKE = "jpake,jpake_err"
|
2011-03-19 10:58:14 +00:00
|
|
|
$ LIB_SRP = "srp_lib,srp_vfy"
|
2010-11-22 22:04:41 +00:00
|
|
|
$ LIB_STORE = "str_err,str_lib,str_meth,str_mem"
|
|
|
|
$ LIB_CMAC = "cmac,cm_ameth,cm_pmeth"
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
|
|
|
$! Setup exceptional compilations
|
|
|
|
$!
|
2011-03-19 10:58:14 +00:00
|
|
|
$ CC3_SHOWN = 0
|
|
|
|
$ CC4_SHOWN = 0
|
|
|
|
$ CC5_SHOWN = 0
|
|
|
|
$ CC6_SHOWN = 0
|
|
|
|
$!
|
|
|
|
$! The following lists must have leading and trailing commas, and no
|
|
|
|
$! embedded spaces. (They are scanned for ",name,".)
|
|
|
|
$!
|
|
|
|
$ ! Add definitions for no threads on OpenVMS 7.1 and higher.
|
1999-05-13 11:37:32 +00:00
|
|
|
$ COMPILEWITH_CC3 = ",bss_rtcp,"
|
2011-03-19 10:58:14 +00:00
|
|
|
$ ! Disable the DOLLARID warning. Not needed with /STANDARD=RELAXED.
|
|
|
|
$ COMPILEWITH_CC4 = "" !!! ",a_utctm,bss_log,o_time,o_dir,"
|
|
|
|
$ ! Disable disjoint optimization on VAX with DECC.
|
2000-08-17 22:43:31 +00:00
|
|
|
$ COMPILEWITH_CC5 = ",md2_dgst,md4_dgst,md5_dgst,mdc2dgst," + -
|
2009-05-15 16:36:56 +00:00
|
|
|
"seed,sha_dgst,sha1dgst,rmd_dgst,bf_enc,"
|
2011-03-19 10:58:14 +00:00
|
|
|
$ ! Disable the MIXLINKAGE warning.
|
|
|
|
$ COMPILEWITH_CC6 = "" !!! ",enc_read,set_key,"
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
|
|
|
$! Figure Out What Other Modules We Are To Build.
|
|
|
|
$!
|
|
|
|
$ BUILD_SET:
|
|
|
|
$!
|
|
|
|
$! Define A Module Counter.
|
|
|
|
$!
|
|
|
|
$ MODULE_COUNTER = 0
|
|
|
|
$!
|
|
|
|
$! Top Of The Loop.
|
|
|
|
$!
|
|
|
|
$ MODULE_NEXT:
|
|
|
|
$!
|
|
|
|
$! Extract The Module Name From The Encryption List.
|
|
|
|
$!
|
|
|
|
$ MODULE_NAME = F$ELEMENT(MODULE_COUNTER,",",ENCRYPT_TYPES)
|
2000-01-17 00:57:10 +00:00
|
|
|
$ IF MODULE_NAME.EQS."Basic" THEN MODULE_NAME = ""
|
1999-11-12 02:21:49 +00:00
|
|
|
$ MODULE_NAME1 = MODULE_NAME
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
|
|
|
$! Check To See If We Are At The End Of The Module List.
|
|
|
|
$!
|
|
|
|
$ IF (MODULE_NAME.EQS.",")
|
|
|
|
$ THEN
|
|
|
|
$!
|
|
|
|
$! We Are At The End Of The Module List, Go To MODULE_DONE.
|
|
|
|
$!
|
|
|
|
$ GOTO MODULE_DONE
|
|
|
|
$!
|
|
|
|
$! End The Module List Check.
|
|
|
|
$!
|
|
|
|
$ ENDIF
|
|
|
|
$!
|
|
|
|
$! Increment The Moudle Counter.
|
|
|
|
$!
|
|
|
|
$ MODULE_COUNTER = MODULE_COUNTER + 1
|
|
|
|
$!
|
1999-11-12 02:21:49 +00:00
|
|
|
$! Create The Library and Apps Module Names.
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
|
|
|
$ LIB_MODULE = "LIB_" + MODULE_NAME
|
1999-11-12 02:21:49 +00:00
|
|
|
$ APPS_MODULE = "APPS_" + MODULE_NAME
|
2009-05-15 16:36:56 +00:00
|
|
|
$ IF (F$EXTRACT(0,5,MODULE_NAME).EQS."ASN1_")
|
1999-05-13 11:37:32 +00:00
|
|
|
$ THEN
|
|
|
|
$ MODULE_NAME = "ASN1"
|
|
|
|
$ ENDIF
|
2009-05-17 07:22:11 +00:00
|
|
|
$ IF (F$EXTRACT(0,4,MODULE_NAME).EQS."EVP_")
|
1999-05-13 11:37:32 +00:00
|
|
|
$ THEN
|
|
|
|
$ MODULE_NAME = "EVP"
|
|
|
|
$ ENDIF
|
|
|
|
$!
|
1999-11-12 02:21:49 +00:00
|
|
|
$! Set state (can be LIB and APPS)
|
|
|
|
$!
|
|
|
|
$ STATE = "LIB"
|
|
|
|
$ IF BUILDALL .EQS. "APPS" THEN STATE = "APPS"
|
|
|
|
$!
|
1999-05-13 11:37:32 +00:00
|
|
|
$! Check if the library module name actually is defined
|
|
|
|
$!
|
|
|
|
$ IF F$TYPE('LIB_MODULE') .EQS. ""
|
|
|
|
$ THEN
|
|
|
|
$ WRITE SYS$ERROR ""
|
2011-03-19 10:58:14 +00:00
|
|
|
$ WRITE SYS$ERROR "The module ",MODULE_NAME1," does not exist. Continuing..."
|
1999-05-13 11:37:32 +00:00
|
|
|
$ WRITE SYS$ERROR ""
|
|
|
|
$ GOTO MODULE_NEXT
|
|
|
|
$ ENDIF
|
|
|
|
$!
|
1999-11-12 02:21:49 +00:00
|
|
|
$! Top Of The Module Loop.
|
|
|
|
$!
|
|
|
|
$ MODULE_AGAIN:
|
|
|
|
$!
|
|
|
|
$! Tell The User What Module We Are Building.
|
|
|
|
$!
|
|
|
|
$ IF (MODULE_NAME1.NES."")
|
|
|
|
$ THEN
|
|
|
|
$ IF STATE .EQS. "LIB"
|
|
|
|
$ THEN
|
|
|
|
$ WRITE SYS$OUTPUT "Compiling The ",MODULE_NAME1," Library Files. (",BUILDALL,",",STATE,")"
|
|
|
|
$ ELSE IF F$TYPE('APPS_MODULE') .NES. ""
|
|
|
|
$ THEN
|
|
|
|
$ WRITE SYS$OUTPUT "Compiling The ",MODULE_NAME1," Applications. (",BUILDALL,",",STATE,")"
|
|
|
|
$ ENDIF
|
|
|
|
$ ENDIF
|
|
|
|
$ ENDIF
|
|
|
|
$!
|
|
|
|
$! Define A File Counter And Set It To "0".
|
|
|
|
$!
|
|
|
|
$ FILE_COUNTER = 0
|
|
|
|
$ APPLICATION = ""
|
|
|
|
$ APPLICATION_COUNTER = 0
|
|
|
|
$!
|
1999-05-13 11:37:32 +00:00
|
|
|
$! Top Of The File Loop.
|
|
|
|
$!
|
|
|
|
$ NEXT_FILE:
|
|
|
|
$!
|
1999-11-12 02:21:49 +00:00
|
|
|
$! Look in the LIB_MODULE is we're in state LIB
|
|
|
|
$!
|
|
|
|
$ IF STATE .EQS. "LIB"
|
|
|
|
$ THEN
|
|
|
|
$!
|
|
|
|
$! O.K, Extract The File Name From The File List.
|
|
|
|
$!
|
|
|
|
$ FILE_NAME = F$ELEMENT(FILE_COUNTER,",",'LIB_MODULE')
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
1999-11-12 02:21:49 +00:00
|
|
|
$! else
|
|
|
|
$!
|
|
|
|
$ ELSE
|
|
|
|
$ FILE_NAME = ","
|
|
|
|
$!
|
|
|
|
$ IF F$TYPE('APPS_MODULE') .NES. ""
|
|
|
|
$ THEN
|
|
|
|
$!
|
|
|
|
$! Extract The File Name From The File List.
|
|
|
|
$! This part is a bit more complicated.
|
|
|
|
$!
|
|
|
|
$ IF APPLICATION .EQS. ""
|
|
|
|
$ THEN
|
|
|
|
$ APPLICATION = F$ELEMENT(APPLICATION_COUNTER,";",'APPS_MODULE')
|
|
|
|
$ APPLICATION_COUNTER = APPLICATION_COUNTER + 1
|
|
|
|
$ APPLICATION_OBJECTS = F$ELEMENT(1,"/",APPLICATION)
|
|
|
|
$ APPLICATION = F$ELEMENT(0,"/",APPLICATION)
|
|
|
|
$ FILE_COUNTER = 0
|
|
|
|
$ ENDIF
|
|
|
|
$
|
|
|
|
$! WRITE SYS$OUTPUT "DEBUG: SHOW SYMBOL APPLICATION*"
|
|
|
|
$! SHOW SYMBOL APPLICATION*
|
|
|
|
$!
|
|
|
|
$ IF APPLICATION .NES. ";"
|
|
|
|
$ THEN
|
|
|
|
$ FILE_NAME = F$ELEMENT(FILE_COUNTER,",",APPLICATION_OBJECTS)
|
|
|
|
$ IF FILE_NAME .EQS. ","
|
|
|
|
$ THEN
|
|
|
|
$ APPLICATION = ""
|
|
|
|
$ GOTO NEXT_FILE
|
|
|
|
$ ENDIF
|
|
|
|
$ ENDIF
|
|
|
|
$ ENDIF
|
|
|
|
$ ENDIF
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
|
|
|
$! Check To See If We Are At The End Of The File List.
|
|
|
|
$!
|
|
|
|
$ IF (FILE_NAME.EQS.",")
|
|
|
|
$ THEN
|
|
|
|
$!
|
1999-11-12 02:21:49 +00:00
|
|
|
$! We Are At The End Of The File List, Change State Or Goto FILE_DONE.
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
1999-11-12 02:21:49 +00:00
|
|
|
$ IF STATE .EQS. "LIB" .AND. BUILDALL .NES. "LIBRARY"
|
|
|
|
$ THEN
|
|
|
|
$ STATE = "APPS"
|
|
|
|
$ GOTO MODULE_AGAIN
|
|
|
|
$ ELSE
|
|
|
|
$ GOTO FILE_DONE
|
|
|
|
$ ENDIF
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
|
|
|
$! End The File List Check.
|
|
|
|
$!
|
|
|
|
$ ENDIF
|
|
|
|
$!
|
|
|
|
$! Increment The Counter.
|
|
|
|
$!
|
|
|
|
$ FILE_COUNTER = FILE_COUNTER + 1
|
|
|
|
$!
|
|
|
|
$! Create The Source File Name.
|
|
|
|
$!
|
|
|
|
$ TMP_FILE_NAME = F$ELEMENT(1,"]",FILE_NAME)
|
|
|
|
$ IF TMP_FILE_NAME .EQS. "]" THEN TMP_FILE_NAME = FILE_NAME
|
|
|
|
$ IF F$ELEMENT(0,".",TMP_FILE_NAME) .EQS. TMP_FILE_NAME THEN -
|
|
|
|
FILE_NAME = FILE_NAME + ".c"
|
|
|
|
$ IF (MODULE_NAME.NES."")
|
|
|
|
$ THEN
|
|
|
|
$ SOURCE_FILE = "SYS$DISK:[." + MODULE_NAME+ "]" + FILE_NAME
|
|
|
|
$ ELSE
|
|
|
|
$ SOURCE_FILE = "SYS$DISK:[]" + FILE_NAME
|
|
|
|
$ ENDIF
|
|
|
|
$ SOURCE_FILE = SOURCE_FILE - "]["
|
|
|
|
$!
|
|
|
|
$! Create The Object File Name.
|
|
|
|
$!
|
|
|
|
$ OBJECT_FILE = OBJ_DIR + F$PARSE(FILE_NAME,,,"NAME","SYNTAX_ONLY") + ".OBJ"
|
|
|
|
$ ON WARNING THEN GOTO NEXT_FILE
|
|
|
|
$!
|
|
|
|
$! Check To See If The File We Want To Compile Is Actually There.
|
|
|
|
$!
|
|
|
|
$ IF (F$SEARCH(SOURCE_FILE).EQS."")
|
|
|
|
$ THEN
|
|
|
|
$!
|
2000-09-09 18:05:27 +00:00
|
|
|
$! Tell The User That The File Doesn't Exist.
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
|
|
|
$ WRITE SYS$OUTPUT ""
|
2000-09-09 18:05:27 +00:00
|
|
|
$ WRITE SYS$OUTPUT "The File ",SOURCE_FILE," Doesn't Exist."
|
1999-05-13 11:37:32 +00:00
|
|
|
$ WRITE SYS$OUTPUT ""
|
|
|
|
$!
|
|
|
|
$! Exit The Build.
|
|
|
|
$!
|
|
|
|
$ GOTO EXIT
|
|
|
|
$!
|
|
|
|
$! End The File Exist Check.
|
|
|
|
$!
|
|
|
|
$ ENDIF
|
|
|
|
$!
|
|
|
|
$! Tell The User We Are Compiling The File.
|
|
|
|
$!
|
|
|
|
$ IF (MODULE_NAME.EQS."")
|
|
|
|
$ THEN
|
1999-11-12 02:21:49 +00:00
|
|
|
$ WRITE SYS$OUTPUT "Compiling The ",FILE_NAME," File. (",BUILDALL,",",STATE,")"
|
1999-05-13 11:37:32 +00:00
|
|
|
$ ENDIF
|
|
|
|
$ IF (MODULE_NAME.NES."")
|
|
|
|
$ THEN
|
2011-03-19 10:58:14 +00:00
|
|
|
$ WRITE SYS$OUTPUT " ",FILE_NAME,""
|
1999-05-13 11:37:32 +00:00
|
|
|
$ ENDIF
|
|
|
|
$!
|
|
|
|
$! Compile The File.
|
|
|
|
$!
|
|
|
|
$ ON ERROR THEN GOTO NEXT_FILE
|
2011-03-19 10:58:14 +00:00
|
|
|
$ FILE_NAME0 = ","+ F$ELEMENT(0,".",FILE_NAME)+ ","
|
1999-05-13 11:37:32 +00:00
|
|
|
$ IF FILE_NAME - ".mar" .NES. FILE_NAME
|
|
|
|
$ THEN
|
|
|
|
$ MACRO/OBJECT='OBJECT_FILE' 'SOURCE_FILE'
|
|
|
|
$ ELSE
|
|
|
|
$ IF COMPILEWITH_CC3 - FILE_NAME0 .NES. COMPILEWITH_CC3
|
|
|
|
$ THEN
|
2011-03-19 10:58:14 +00:00
|
|
|
$ write sys$output " \Using special rule (3)"
|
|
|
|
$ if (.not. CC3_SHOWN)
|
|
|
|
$ then
|
|
|
|
$ CC3_SHOWN = 1
|
|
|
|
$ x = " "+ CC3
|
|
|
|
$ write /symbol sys$output x
|
|
|
|
$ endif
|
1999-05-13 11:37:32 +00:00
|
|
|
$ CC3/OBJECT='OBJECT_FILE' 'SOURCE_FILE'
|
|
|
|
$ ELSE
|
|
|
|
$ IF COMPILEWITH_CC4 - FILE_NAME0 .NES. COMPILEWITH_CC4
|
|
|
|
$ THEN
|
2011-03-19 10:58:14 +00:00
|
|
|
$ write /symbol sys$output " \Using special rule (4)"
|
|
|
|
$ if (.not. CC4_SHOWN)
|
|
|
|
$ then
|
|
|
|
$ CC4_SHOWN = 1
|
|
|
|
$ x = " "+ CC4
|
|
|
|
$ write /symbol sys$output x
|
|
|
|
$ endif
|
1999-05-13 11:37:32 +00:00
|
|
|
$ CC4/OBJECT='OBJECT_FILE' 'SOURCE_FILE'
|
|
|
|
$ ELSE
|
2011-03-19 10:58:14 +00:00
|
|
|
$ IF CC5_DIFFERENT .AND. -
|
|
|
|
(COMPILEWITH_CC5 - FILE_NAME0 .NES. COMPILEWITH_CC5)
|
1999-05-13 11:37:32 +00:00
|
|
|
$ THEN
|
2011-03-19 10:58:14 +00:00
|
|
|
$ write sys$output " \Using special rule (5)"
|
|
|
|
$ if (.not. CC5_SHOWN)
|
|
|
|
$ then
|
|
|
|
$ CC5_SHOWN = 1
|
|
|
|
$ x = " "+ CC5
|
|
|
|
$ write /symbol sys$output x
|
|
|
|
$ endif
|
1999-05-13 11:37:32 +00:00
|
|
|
$ CC5/OBJECT='OBJECT_FILE' 'SOURCE_FILE'
|
|
|
|
$ ELSE
|
2006-01-09 19:23:01 +00:00
|
|
|
$ IF COMPILEWITH_CC6 - FILE_NAME0 .NES. COMPILEWITH_CC6
|
|
|
|
$ THEN
|
2011-03-19 10:58:14 +00:00
|
|
|
$ write sys$output " \Using special rule (6)"
|
|
|
|
$ if (.not. CC6_SHOWN)
|
|
|
|
$ then
|
|
|
|
$ CC6_SHOWN = 1
|
|
|
|
$ x = " "+ CC6
|
|
|
|
$ write /symbol sys$output x
|
|
|
|
$ endif
|
2006-01-09 19:23:01 +00:00
|
|
|
$ CC6/OBJECT='OBJECT_FILE' 'SOURCE_FILE'
|
|
|
|
$ ELSE
|
|
|
|
$ CC/OBJECT='OBJECT_FILE' 'SOURCE_FILE'
|
|
|
|
$ ENDIF
|
1999-05-13 11:37:32 +00:00
|
|
|
$ ENDIF
|
|
|
|
$ ENDIF
|
|
|
|
$ ENDIF
|
|
|
|
$ ENDIF
|
1999-11-12 02:21:49 +00:00
|
|
|
$ IF STATE .EQS. "LIB"
|
|
|
|
$ THEN
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
1999-11-12 02:21:49 +00:00
|
|
|
$! Add It To The Library.
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
1999-11-12 02:21:49 +00:00
|
|
|
$ LIBRARY/REPLACE 'LIB_NAME' 'OBJECT_FILE'
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
1999-11-12 02:21:49 +00:00
|
|
|
$! Time To Clean Up The Object File.
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
1999-11-12 02:21:49 +00:00
|
|
|
$ DELETE 'OBJECT_FILE';*
|
|
|
|
$ ENDIF
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
|
|
|
$! Go Back And Do It Again.
|
|
|
|
$!
|
|
|
|
$ GOTO NEXT_FILE
|
|
|
|
$!
|
|
|
|
$! All Done With This Library Part.
|
|
|
|
$!
|
|
|
|
$ FILE_DONE:
|
|
|
|
$!
|
1999-11-12 02:21:49 +00:00
|
|
|
$! Time To Build Some Applications
|
|
|
|
$!
|
|
|
|
$ IF F$TYPE('APPS_MODULE') .NES. "" .AND. BUILDALL .NES. "LIBRARY"
|
|
|
|
$ THEN
|
|
|
|
$ APPLICATION_COUNTER = 0
|
|
|
|
$ NEXT_APPLICATION:
|
|
|
|
$ APPLICATION = F$ELEMENT(APPLICATION_COUNTER,";",'APPS_MODULE')
|
|
|
|
$ IF APPLICATION .EQS. ";" THEN GOTO APPLICATION_DONE
|
|
|
|
$
|
|
|
|
$ APPLICATION_COUNTER = APPLICATION_COUNTER + 1
|
|
|
|
$ APPLICATION_OBJECTS = F$ELEMENT(1,"/",APPLICATION)
|
|
|
|
$ APPLICATION = F$ELEMENT(0,"/",APPLICATION)
|
|
|
|
$
|
|
|
|
$! WRITE SYS$OUTPUT "DEBUG: SHOW SYMBOL APPLICATION*"
|
|
|
|
$! SHOW SYMBOL APPLICATION*
|
|
|
|
$!
|
|
|
|
$! Tell the user what happens
|
|
|
|
$!
|
2011-03-19 10:58:14 +00:00
|
|
|
$ WRITE SYS$OUTPUT " ",APPLICATION,".exe"
|
1999-11-12 02:21:49 +00:00
|
|
|
$!
|
2002-10-31 16:46:52 +00:00
|
|
|
$! Link The Program.
|
1999-11-12 02:21:49 +00:00
|
|
|
$!
|
2002-05-23 13:33:55 +00:00
|
|
|
$ ON ERROR THEN GOTO NEXT_APPLICATION
|
1999-11-12 02:21:49 +00:00
|
|
|
$!
|
2011-03-19 10:58:14 +00:00
|
|
|
$! Link With A TCP/IP Library.
|
1999-11-12 02:21:49 +00:00
|
|
|
$!
|
2011-03-19 10:58:14 +00:00
|
|
|
$ LINK /'DEBUGGER' /'LINKMAP' /'TRACEBACK' -
|
|
|
|
/EXE='EXE_DIR''APPLICATION'.EXE -
|
|
|
|
'OBJ_DIR''APPLICATION_OBJECTS', -
|
|
|
|
'CRYPTO_LIB'/LIBRARY -
|
|
|
|
'TCPIP_LIB' -
|
|
|
|
'ZLIB_LIB' -
|
|
|
|
,'OPT_FILE' /OPTIONS
|
1999-11-12 02:21:49 +00:00
|
|
|
$!
|
|
|
|
$ GOTO NEXT_APPLICATION
|
|
|
|
$ APPLICATION_DONE:
|
|
|
|
$ ENDIF
|
|
|
|
$!
|
1999-05-13 11:37:32 +00:00
|
|
|
$! Go Back And Get The Next Module.
|
|
|
|
$!
|
|
|
|
$ GOTO MODULE_NEXT
|
|
|
|
$!
|
|
|
|
$! All Done With This Module.
|
|
|
|
$!
|
|
|
|
$ MODULE_DONE:
|
|
|
|
$!
|
|
|
|
$! Tell The User That We Are All Done.
|
|
|
|
$!
|
|
|
|
$ WRITE SYS$OUTPUT "All Done..."
|
|
|
|
$ EXIT:
|
|
|
|
$ GOSUB CLEANUP
|
|
|
|
$ EXIT
|
|
|
|
$!
|
|
|
|
$! Check For The Link Option FIle.
|
|
|
|
$!
|
|
|
|
$ CHECK_OPT_FILE:
|
|
|
|
$!
|
|
|
|
$! Check To See If We Need To Make A VAX C Option File.
|
|
|
|
$!
|
|
|
|
$ IF (COMPILER.EQS."VAXC")
|
|
|
|
$ THEN
|
|
|
|
$!
|
|
|
|
$! Check To See If We Already Have A VAX C Linker Option File.
|
|
|
|
$!
|
|
|
|
$ IF (F$SEARCH(OPT_FILE).EQS."")
|
|
|
|
$ THEN
|
|
|
|
$!
|
|
|
|
$! We Need A VAX C Linker Option File.
|
|
|
|
$!
|
|
|
|
$ CREATE 'OPT_FILE'
|
|
|
|
$DECK
|
|
|
|
!
|
2011-03-19 10:58:14 +00:00
|
|
|
! Default System Options File To Link Against
|
1999-05-13 11:37:32 +00:00
|
|
|
! The Sharable VAX C Runtime Library.
|
|
|
|
!
|
|
|
|
SYS$SHARE:VAXCRTL.EXE/SHARE
|
|
|
|
$EOD
|
|
|
|
$!
|
|
|
|
$! End The Option File Check.
|
|
|
|
$!
|
|
|
|
$ ENDIF
|
|
|
|
$!
|
|
|
|
$! End The VAXC Check.
|
|
|
|
$!
|
|
|
|
$ ENDIF
|
|
|
|
$!
|
|
|
|
$! Check To See If We Need A GNU C Option File.
|
|
|
|
$!
|
|
|
|
$ IF (COMPILER.EQS."GNUC")
|
|
|
|
$ THEN
|
|
|
|
$!
|
|
|
|
$! Check To See If We Already Have A GNU C Linker Option File.
|
|
|
|
$!
|
|
|
|
$ IF (F$SEARCH(OPT_FILE).EQS."")
|
|
|
|
$ THEN
|
|
|
|
$!
|
|
|
|
$! We Need A GNU C Linker Option File.
|
|
|
|
$!
|
|
|
|
$ CREATE 'OPT_FILE'
|
|
|
|
$DECK
|
|
|
|
!
|
2011-03-19 10:58:14 +00:00
|
|
|
! Default System Options File To Link Against
|
1999-05-13 11:37:32 +00:00
|
|
|
! The Sharable C Runtime Library.
|
|
|
|
!
|
|
|
|
GNU_CC:[000000]GCCLIB/LIBRARY
|
|
|
|
SYS$SHARE:VAXCRTL/SHARE
|
|
|
|
$EOD
|
|
|
|
$!
|
|
|
|
$! End The Option File Check.
|
|
|
|
$!
|
|
|
|
$ ENDIF
|
|
|
|
$!
|
|
|
|
$! End The GNU C Check.
|
|
|
|
$!
|
|
|
|
$ ENDIF
|
|
|
|
$!
|
|
|
|
$! Check To See If We Need A DEC C Option File.
|
|
|
|
$!
|
|
|
|
$ IF (COMPILER.EQS."DECC")
|
|
|
|
$ THEN
|
|
|
|
$!
|
|
|
|
$! Check To See If We Already Have A DEC C Linker Option File.
|
|
|
|
$!
|
|
|
|
$ IF (F$SEARCH(OPT_FILE).EQS."")
|
|
|
|
$ THEN
|
|
|
|
$!
|
2009-05-15 16:36:56 +00:00
|
|
|
$! Figure Out If We Need A non-VAX Or A VAX Linker Option File.
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
|
|
|
$ IF ARCH .EQS. "VAX"
|
|
|
|
$ THEN
|
|
|
|
$!
|
|
|
|
$! We Need A DEC C Linker Option File For VAX.
|
|
|
|
$!
|
|
|
|
$ CREATE 'OPT_FILE'
|
|
|
|
$DECK
|
|
|
|
!
|
2011-03-19 10:58:14 +00:00
|
|
|
! Default System Options File To Link Against
|
1999-05-13 11:37:32 +00:00
|
|
|
! The Sharable DEC C Runtime Library.
|
|
|
|
!
|
|
|
|
SYS$SHARE:DECC$SHR.EXE/SHARE
|
|
|
|
$EOD
|
|
|
|
$!
|
|
|
|
$! Else...
|
|
|
|
$!
|
|
|
|
$ ELSE
|
|
|
|
$!
|
2009-05-15 16:36:56 +00:00
|
|
|
$! Create The non-VAX Linker Option File.
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
|
|
|
$ CREATE 'OPT_FILE'
|
|
|
|
$DECK
|
|
|
|
!
|
2011-03-19 10:58:14 +00:00
|
|
|
! Default System Options File For non-VAX To Link Against
|
1999-05-13 11:37:32 +00:00
|
|
|
! The Sharable C Runtime Library.
|
|
|
|
!
|
|
|
|
SYS$SHARE:CMA$OPEN_LIB_SHR/SHARE
|
|
|
|
SYS$SHARE:CMA$OPEN_RTL/SHARE
|
|
|
|
$EOD
|
|
|
|
$!
|
2009-05-15 16:36:56 +00:00
|
|
|
$! End The DEC C Option File Check.
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
|
|
|
$ ENDIF
|
|
|
|
$!
|
|
|
|
$! End The Option File Search.
|
|
|
|
$!
|
|
|
|
$ ENDIF
|
|
|
|
$!
|
|
|
|
$! End The DEC C Check.
|
|
|
|
$!
|
|
|
|
$ ENDIF
|
|
|
|
$!
|
|
|
|
$! Tell The User What Linker Option File We Are Using.
|
|
|
|
$!
|
2011-03-19 10:58:14 +00:00
|
|
|
$ WRITE SYS$OUTPUT "Using Linker Option File ",OPT_FILE,"."
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
|
|
|
$! Time To RETURN.
|
|
|
|
$!
|
|
|
|
$ RETURN
|
|
|
|
$!
|
2000-01-16 12:30:16 +00:00
|
|
|
$! Check The User's Options.
|
|
|
|
$!
|
|
|
|
$ CHECK_OPTIONS:
|
|
|
|
$!
|
1999-11-12 02:21:49 +00:00
|
|
|
$! Check To See If P1 Is Blank.
|
|
|
|
$!
|
|
|
|
$ IF (P1.EQS."ALL")
|
|
|
|
$ THEN
|
|
|
|
$!
|
|
|
|
$! P1 Is Blank, So Build Everything.
|
|
|
|
$!
|
|
|
|
$ BUILDALL = "TRUE"
|
|
|
|
$!
|
|
|
|
$! Else...
|
|
|
|
$!
|
|
|
|
$ ELSE
|
|
|
|
$!
|
2011-03-19 10:58:14 +00:00
|
|
|
$! Else, Check To See If P1 Has A Valid Argument.
|
1999-11-12 02:21:49 +00:00
|
|
|
$!
|
|
|
|
$ IF (P1.EQS."LIBRARY").OR.(P1.EQS."APPS")
|
|
|
|
$ THEN
|
|
|
|
$!
|
2011-03-19 10:58:14 +00:00
|
|
|
$! A Valid Argument.
|
1999-11-12 02:21:49 +00:00
|
|
|
$!
|
|
|
|
$ BUILDALL = P1
|
|
|
|
$!
|
|
|
|
$! Else...
|
|
|
|
$!
|
|
|
|
$ ELSE
|
|
|
|
$!
|
|
|
|
$! Tell The User We Don't Know What They Want.
|
|
|
|
$!
|
|
|
|
$ WRITE SYS$OUTPUT ""
|
|
|
|
$ WRITE SYS$OUTPUT "The Option ",P1," Is Invalid. The Valid Options Are:"
|
|
|
|
$ WRITE SYS$OUTPUT ""
|
|
|
|
$ WRITE SYS$OUTPUT " ALL : Just Build Everything."
|
2004-07-29 22:25:59 +00:00
|
|
|
$ WRITE SYS$OUTPUT " LIBRARY : To Compile Just The [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library."
|
|
|
|
$ WRITE SYS$OUTPUT " APPS : To Compile Just The [.xxx.EXE.CRYPTO]*.EXE Programs."
|
1999-11-12 02:21:49 +00:00
|
|
|
$ WRITE SYS$OUTPUT ""
|
|
|
|
$ WRITE SYS$OUTPUT " Where 'xxx' Stands For:"
|
|
|
|
$ WRITE SYS$OUTPUT ""
|
2011-03-19 10:58:14 +00:00
|
|
|
$ WRITE SYS$OUTPUT " ALPHA[64]: Alpha Architecture."
|
|
|
|
$ WRITE SYS$OUTPUT " IA64[64] : IA64 Architecture."
|
2009-05-15 16:36:56 +00:00
|
|
|
$ WRITE SYS$OUTPUT " VAX : VAX Architecture."
|
1999-11-12 02:21:49 +00:00
|
|
|
$ WRITE SYS$OUTPUT ""
|
|
|
|
$!
|
|
|
|
$! Time To EXIT.
|
|
|
|
$!
|
|
|
|
$ EXIT
|
|
|
|
$!
|
2011-03-19 10:58:14 +00:00
|
|
|
$! End The Valid Argument Check.
|
1999-11-12 02:21:49 +00:00
|
|
|
$!
|
|
|
|
$ ENDIF
|
|
|
|
$!
|
|
|
|
$! End The P1 Check.
|
|
|
|
$!
|
|
|
|
$ ENDIF
|
|
|
|
$!
|
|
|
|
$! Check To See If P2 Is Blank.
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
2002-10-31 16:46:52 +00:00
|
|
|
$ IF (P2.EQS."NODEBUG")
|
1999-05-13 11:37:32 +00:00
|
|
|
$ THEN
|
|
|
|
$!
|
2011-03-19 10:58:14 +00:00
|
|
|
$! P2 Is NODEBUG, So Compile Without The Debugger Information.
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
2011-03-19 10:58:14 +00:00
|
|
|
$ DEBUGGER = "NODEBUG"
|
|
|
|
$ LINKMAP = "NOMAP"
|
|
|
|
$ TRACEBACK = "NOTRACEBACK"
|
|
|
|
$ GCC_OPTIMIZE = "OPTIMIZE"
|
|
|
|
$ CC_OPTIMIZE = "OPTIMIZE"
|
|
|
|
$ MACRO_OPTIMIZE = "OPTIMIZE"
|
|
|
|
$ WRITE SYS$OUTPUT "No Debugger Information Will Be Produced During Compile."
|
|
|
|
$ WRITE SYS$OUTPUT "Compiling With Compiler Optimization."
|
1999-05-13 11:37:32 +00:00
|
|
|
$ ELSE
|
|
|
|
$!
|
|
|
|
$! Check To See If We Are To Compile With Debugger Information.
|
|
|
|
$!
|
2002-10-31 16:46:52 +00:00
|
|
|
$ IF (P2.EQS."DEBUG")
|
1999-05-13 11:37:32 +00:00
|
|
|
$ THEN
|
|
|
|
$!
|
|
|
|
$! Compile With Debugger Information.
|
|
|
|
$!
|
|
|
|
$ DEBUGGER = "DEBUG"
|
2011-03-19 10:58:14 +00:00
|
|
|
$ LINKMAP = "MAP"
|
1999-05-13 11:37:32 +00:00
|
|
|
$ TRACEBACK = "TRACEBACK"
|
|
|
|
$ GCC_OPTIMIZE = "NOOPTIMIZE"
|
|
|
|
$ CC_OPTIMIZE = "NOOPTIMIZE"
|
|
|
|
$ MACRO_OPTIMIZE = "NOOPTIMIZE"
|
|
|
|
$ WRITE SYS$OUTPUT "Debugger Information Will Be Produced During Compile."
|
|
|
|
$ WRITE SYS$OUTPUT "Compiling Without Compiler Optimization."
|
|
|
|
$ ELSE
|
|
|
|
$!
|
2011-03-19 10:58:14 +00:00
|
|
|
$! They Entered An Invalid Option.
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
|
|
|
$ WRITE SYS$OUTPUT ""
|
2002-10-31 16:46:52 +00:00
|
|
|
$ WRITE SYS$OUTPUT "The Option ",P2," Is Invalid. The Valid Options Are:"
|
1999-05-13 11:37:32 +00:00
|
|
|
$ WRITE SYS$OUTPUT ""
|
|
|
|
$ WRITE SYS$OUTPUT " DEBUG : Compile With The Debugger Information."
|
|
|
|
$ WRITE SYS$OUTPUT " NODEBUG : Compile Without The Debugger Information."
|
|
|
|
$ WRITE SYS$OUTPUT ""
|
|
|
|
$!
|
|
|
|
$! Time To EXIT.
|
|
|
|
$!
|
|
|
|
$ EXIT
|
|
|
|
$!
|
2011-03-19 10:58:14 +00:00
|
|
|
$! End The Valid Argument Check.
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
|
|
|
$ ENDIF
|
|
|
|
$!
|
2002-10-31 16:46:52 +00:00
|
|
|
$! End The P2 Check.
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
|
|
|
$ ENDIF
|
|
|
|
$!
|
|
|
|
$! Special Threads For OpenVMS v7.1 Or Later
|
|
|
|
$!
|
|
|
|
$! Written By: Richard Levitte
|
|
|
|
$! richard@levitte.org
|
|
|
|
$!
|
|
|
|
$!
|
2002-10-31 16:46:52 +00:00
|
|
|
$! Check To See If We Have A Option For P5.
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
2002-10-31 16:46:52 +00:00
|
|
|
$ IF (P5.EQS."")
|
1999-05-13 11:37:32 +00:00
|
|
|
$ THEN
|
|
|
|
$!
|
|
|
|
$! Get The Version Of VMS We Are Using.
|
|
|
|
$!
|
|
|
|
$ ISSEVEN :=
|
|
|
|
$ TMP = F$ELEMENT(0,"-",F$EXTRACT(1,4,F$GETSYI("VERSION")))
|
|
|
|
$ TMP = F$INTEGER(F$ELEMENT(0,".",TMP)+F$ELEMENT(1,".",TMP))
|
|
|
|
$!
|
|
|
|
$! Check To See If The VMS Version Is v7.1 Or Later.
|
|
|
|
$!
|
|
|
|
$ IF (TMP.GE.71)
|
|
|
|
$ THEN
|
|
|
|
$!
|
|
|
|
$! We Have OpenVMS v7.1 Or Later, So Use The Special Threads.
|
|
|
|
$!
|
|
|
|
$ ISSEVEN := ,PTHREAD_USE_D4
|
|
|
|
$!
|
|
|
|
$! End The VMS Version Check.
|
|
|
|
$!
|
|
|
|
$ ENDIF
|
|
|
|
$!
|
2002-10-31 16:46:52 +00:00
|
|
|
$! End The P5 Check.
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
|
|
|
$ ENDIF
|
|
|
|
$!
|
2011-03-19 10:58:14 +00:00
|
|
|
$! Check P7 (POINTER_SIZE).
|
2010-12-14 19:19:04 +00:00
|
|
|
$!
|
2011-03-19 10:58:14 +00:00
|
|
|
$ IF (P7 .NES. "") .AND. (ARCH .NES. "VAX")
|
2010-12-14 19:19:04 +00:00
|
|
|
$ THEN
|
|
|
|
$!
|
2011-03-19 10:58:14 +00:00
|
|
|
$ IF (P7 .EQS. "32")
|
2010-12-14 19:19:04 +00:00
|
|
|
$ THEN
|
2011-03-25 16:20:35 +00:00
|
|
|
$ POINTER_SIZE = " /POINTER_SIZE=32"
|
2010-12-14 19:19:04 +00:00
|
|
|
$ ELSE
|
2011-03-25 09:40:48 +00:00
|
|
|
$ POINTER_SIZE = F$EDIT( P7, "COLLAPSE, UPCASE")
|
|
|
|
$ IF ((POINTER_SIZE .EQS. "64") .OR. -
|
|
|
|
(POINTER_SIZE .EQS. "64=") .OR. -
|
|
|
|
(POINTER_SIZE .EQS. "64=ARGV"))
|
2010-12-14 19:19:04 +00:00
|
|
|
$ THEN
|
2011-03-19 10:58:14 +00:00
|
|
|
$ ARCHD = ARCH+ "_64"
|
2010-12-14 19:19:04 +00:00
|
|
|
$ LIB32 = ""
|
2011-03-25 16:20:35 +00:00
|
|
|
$ POINTER_SIZE = " /POINTER_SIZE=64"
|
2010-12-14 19:19:04 +00:00
|
|
|
$ ELSE
|
|
|
|
$!
|
2011-03-19 10:58:14 +00:00
|
|
|
$! Tell The User Entered An Invalid Option.
|
2010-12-14 19:19:04 +00:00
|
|
|
$!
|
|
|
|
$ WRITE SYS$OUTPUT ""
|
2011-03-19 10:58:14 +00:00
|
|
|
$ WRITE SYS$OUTPUT "The Option ", P7, -
|
|
|
|
" Is Invalid. The Valid Options Are:"
|
2010-12-14 19:19:04 +00:00
|
|
|
$ WRITE SYS$OUTPUT ""
|
2011-03-25 09:40:48 +00:00
|
|
|
$ WRITE SYS$OUTPUT -
|
|
|
|
" """" : Compile with default (short) pointers."
|
|
|
|
$ WRITE SYS$OUTPUT -
|
|
|
|
" 32 : Compile with 32-bit (short) pointers."
|
|
|
|
$ WRITE SYS$OUTPUT -
|
|
|
|
" 64 : Compile with 64-bit (long) pointers (auto ARGV)."
|
|
|
|
$ WRITE SYS$OUTPUT -
|
|
|
|
" 64= : Compile with 64-bit (long) pointers (no ARGV)."
|
|
|
|
$ WRITE SYS$OUTPUT -
|
|
|
|
" 64=ARGV : Compile with 64-bit (long) pointers (ARGV)."
|
2010-12-14 19:19:04 +00:00
|
|
|
$ WRITE SYS$OUTPUT ""
|
2011-03-19 10:58:14 +00:00
|
|
|
$!
|
2010-12-14 19:19:04 +00:00
|
|
|
$! Time To EXIT.
|
|
|
|
$!
|
2011-03-19 10:58:14 +00:00
|
|
|
$ EXIT
|
2010-12-14 19:19:04 +00:00
|
|
|
$!
|
|
|
|
$ ENDIF
|
2011-03-19 10:58:14 +00:00
|
|
|
$!
|
2010-12-14 19:19:04 +00:00
|
|
|
$ ENDIF
|
|
|
|
$!
|
2011-03-19 10:58:14 +00:00
|
|
|
$! End The P7 (POINTER_SIZE) Check.
|
2010-12-14 19:19:04 +00:00
|
|
|
$!
|
|
|
|
$ ENDIF
|
|
|
|
$!
|
2011-03-19 10:58:14 +00:00
|
|
|
$! Set basic C compiler /INCLUDE directories.
|
|
|
|
$!
|
|
|
|
$ CC_INCLUDES = "SYS$DISK:[.''ARCHD'],SYS$DISK:[],SYS$DISK:[-],"+ -
|
2011-03-20 10:23:27 +00:00
|
|
|
"SYS$DISK:[.ENGINE.VENDOR_DEFNS],SYS$DISK:[.EVP],SYS$DISK:[.ASN1],"+ -
|
|
|
|
"SYS$DISK:[.MODES]"
|
2011-03-19 10:58:14 +00:00
|
|
|
$!
|
2002-10-31 16:46:52 +00:00
|
|
|
$! Check To See If P3 Is Blank.
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
2002-10-31 16:46:52 +00:00
|
|
|
$ IF (P3.EQS."")
|
1999-05-13 11:37:32 +00:00
|
|
|
$ THEN
|
|
|
|
$!
|
|
|
|
$! O.K., The User Didn't Specify A Compiler, Let's Try To
|
|
|
|
$! Find Out Which One To Use.
|
|
|
|
$!
|
|
|
|
$! Check To See If We Have GNU C.
|
|
|
|
$!
|
|
|
|
$ IF (F$TRNLNM("GNU_CC").NES."")
|
|
|
|
$ THEN
|
|
|
|
$!
|
|
|
|
$! Looks Like GNUC, Set To Use GNUC.
|
|
|
|
$!
|
2002-10-31 16:46:52 +00:00
|
|
|
$ P3 = "GNUC"
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
|
|
|
$! Else...
|
|
|
|
$!
|
|
|
|
$ ELSE
|
|
|
|
$!
|
|
|
|
$! Check To See If We Have VAXC Or DECC.
|
|
|
|
$!
|
2009-05-15 16:36:56 +00:00
|
|
|
$ IF (ARCH.NES."VAX").OR.(F$TRNLNM("DECC$CC_DEFAULT").NES."")
|
1999-05-13 11:37:32 +00:00
|
|
|
$ THEN
|
|
|
|
$!
|
|
|
|
$! Looks Like DECC, Set To Use DECC.
|
|
|
|
$!
|
2002-10-31 16:46:52 +00:00
|
|
|
$ P3 = "DECC"
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
|
|
|
$! Else...
|
|
|
|
$!
|
|
|
|
$ ELSE
|
|
|
|
$!
|
|
|
|
$! Looks Like VAXC, Set To Use VAXC.
|
|
|
|
$!
|
2002-10-31 16:46:52 +00:00
|
|
|
$ P3 = "VAXC"
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
|
|
|
$! End The VAXC Compiler Check.
|
|
|
|
$!
|
|
|
|
$ ENDIF
|
|
|
|
$!
|
|
|
|
$! End The DECC & VAXC Compiler Check.
|
|
|
|
$!
|
|
|
|
$ ENDIF
|
|
|
|
$!
|
|
|
|
$! End The Compiler Check.
|
|
|
|
$!
|
|
|
|
$ ENDIF
|
|
|
|
$!
|
2002-10-31 16:46:52 +00:00
|
|
|
$! Check To See If We Have A Option For P4.
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
2002-10-31 16:46:52 +00:00
|
|
|
$ IF (P4.EQS."")
|
1999-05-13 11:37:32 +00:00
|
|
|
$ THEN
|
|
|
|
$!
|
|
|
|
$! Find out what socket library we have available
|
|
|
|
$!
|
|
|
|
$ IF F$PARSE("SOCKETSHR:") .NES. ""
|
|
|
|
$ THEN
|
|
|
|
$!
|
|
|
|
$! We have SOCKETSHR, and it is my opinion that it's the best to use.
|
|
|
|
$!
|
2002-10-31 16:46:52 +00:00
|
|
|
$ P4 = "SOCKETSHR"
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
|
|
|
$! Tell the user
|
|
|
|
$!
|
|
|
|
$ WRITE SYS$OUTPUT "Using SOCKETSHR for TCP/IP"
|
|
|
|
$!
|
|
|
|
$! Else, let's look for something else
|
|
|
|
$!
|
|
|
|
$ ELSE
|
|
|
|
$!
|
|
|
|
$! Like UCX (the reason to do this before Multinet is that the UCX
|
|
|
|
$! emulation is easier to use...)
|
|
|
|
$!
|
|
|
|
$ IF F$TRNLNM("UCX$IPC_SHR") .NES. "" -
|
|
|
|
.OR. F$PARSE("SYS$SHARE:UCX$IPC_SHR.EXE") .NES. "" -
|
|
|
|
.OR. F$PARSE("SYS$LIBRARY:UCX$IPC.OLB") .NES. ""
|
|
|
|
$ THEN
|
|
|
|
$!
|
|
|
|
$! Last resort: a UCX or UCX-compatible library
|
|
|
|
$!
|
2002-10-31 16:46:52 +00:00
|
|
|
$ P4 = "UCX"
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
|
|
|
$! Tell the user
|
|
|
|
$!
|
|
|
|
$ WRITE SYS$OUTPUT "Using UCX or an emulation thereof for TCP/IP"
|
|
|
|
$!
|
|
|
|
$! That was all...
|
|
|
|
$!
|
|
|
|
$ ENDIF
|
|
|
|
$ ENDIF
|
|
|
|
$ ENDIF
|
|
|
|
$!
|
|
|
|
$! Set Up Initial CC Definitions, Possibly With User Ones
|
|
|
|
$!
|
2002-10-31 16:46:52 +00:00
|
|
|
$ CCDEFS = "TCPIP_TYPE_''P4',DSO_VMS"
|
1999-05-13 11:37:32 +00:00
|
|
|
$ IF F$TYPE(USER_CCDEFS) .NES. "" THEN CCDEFS = CCDEFS + "," + USER_CCDEFS
|
|
|
|
$ CCEXTRAFLAGS = ""
|
|
|
|
$ IF F$TYPE(USER_CCFLAGS) .NES. "" THEN CCEXTRAFLAGS = USER_CCFLAGS
|
2011-03-19 10:58:14 +00:00
|
|
|
$ CCDISABLEWARNINGS = "" !!! "LONGLONGTYPE,LONGLONGSUFX,FOUNDCR"
|
1999-05-13 11:37:32 +00:00
|
|
|
$ IF F$TYPE(USER_CCDISABLEWARNINGS) .NES. "" THEN -
|
2000-02-27 10:39:41 +00:00
|
|
|
CCDISABLEWARNINGS = CCDISABLEWARNINGS + "," + USER_CCDISABLEWARNINGS
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
2011-03-19 10:58:14 +00:00
|
|
|
$! Check To See If We Have A ZLIB Option.
|
|
|
|
$!
|
|
|
|
$ ZLIB = P8
|
|
|
|
$ IF (ZLIB .NES. "")
|
|
|
|
$ THEN
|
|
|
|
$!
|
|
|
|
$! Check for expected ZLIB files.
|
|
|
|
$!
|
|
|
|
$ err = 0
|
|
|
|
$ file1 = f$parse( "zlib.h", ZLIB, , , "SYNTAX_ONLY")
|
|
|
|
$ if (f$search( file1) .eqs. "")
|
|
|
|
$ then
|
|
|
|
$ WRITE SYS$OUTPUT ""
|
|
|
|
$ WRITE SYS$OUTPUT "The Option ", ZLIB, " Is Invalid."
|
|
|
|
$ WRITE SYS$OUTPUT " Can't find header: ''file1'"
|
|
|
|
$ err = 1
|
|
|
|
$ endif
|
|
|
|
$ file1 = f$parse( "A.;", ZLIB)- "A.;"
|
|
|
|
$!
|
|
|
|
$ file2 = f$parse( ZLIB, "libz.olb", , , "SYNTAX_ONLY")
|
|
|
|
$ if (f$search( file2) .eqs. "")
|
|
|
|
$ then
|
|
|
|
$ if (err .eq. 0)
|
|
|
|
$ then
|
|
|
|
$ WRITE SYS$OUTPUT ""
|
|
|
|
$ WRITE SYS$OUTPUT "The Option ", ZLIB, " Is Invalid."
|
|
|
|
$ endif
|
|
|
|
$ WRITE SYS$OUTPUT " Can't find library: ''file2'"
|
|
|
|
$ WRITE SYS$OUTPUT ""
|
|
|
|
$ err = err+ 2
|
|
|
|
$ endif
|
|
|
|
$ if (err .eq. 1)
|
|
|
|
$ then
|
|
|
|
$ WRITE SYS$OUTPUT ""
|
|
|
|
$ endif
|
|
|
|
$!
|
|
|
|
$ if (err .ne. 0)
|
|
|
|
$ then
|
|
|
|
$ EXIT
|
|
|
|
$ endif
|
|
|
|
$!
|
|
|
|
$ CCDEFS = """ZLIB=1"", "+ CCDEFS
|
|
|
|
$ CC_INCLUDES = CC_INCLUDES+ ", "+ file1
|
|
|
|
$ ZLIB_LIB = ", ''file2' /library"
|
|
|
|
$!
|
|
|
|
$! Print info
|
|
|
|
$!
|
|
|
|
$ WRITE SYS$OUTPUT "ZLIB library spec: ", file2
|
|
|
|
$!
|
|
|
|
$! End The ZLIB Check.
|
|
|
|
$!
|
|
|
|
$ ENDIF
|
|
|
|
$!
|
|
|
|
$! Check To See If The User Entered A Valid Parameter.
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
2002-10-31 16:46:52 +00:00
|
|
|
$ IF (P3.EQS."VAXC").OR.(P3.EQS."DECC").OR.(P3.EQS."GNUC")
|
1999-05-13 11:37:32 +00:00
|
|
|
$ THEN
|
|
|
|
$!
|
|
|
|
$! Check To See If The User Wanted DECC.
|
|
|
|
$!
|
2002-10-31 16:46:52 +00:00
|
|
|
$ IF (P3.EQS."DECC")
|
1999-05-13 11:37:32 +00:00
|
|
|
$ THEN
|
|
|
|
$!
|
|
|
|
$! Looks Like DECC, Set To Use DECC.
|
|
|
|
$!
|
|
|
|
$ COMPILER = "DECC"
|
|
|
|
$!
|
|
|
|
$! Tell The User We Are Using DECC.
|
|
|
|
$!
|
|
|
|
$ WRITE SYS$OUTPUT "Using DECC 'C' Compiler."
|
|
|
|
$!
|
|
|
|
$! Use DECC...
|
|
|
|
$!
|
|
|
|
$ CC = "CC"
|
|
|
|
$ IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" -
|
|
|
|
THEN CC = "CC/DECC"
|
2011-03-25 16:20:35 +00:00
|
|
|
$ CC = CC + " /''CC_OPTIMIZE' /''DEBUGGER' /STANDARD=RELAXED"+ -
|
2011-03-25 09:40:48 +00:00
|
|
|
"''POINTER_SIZE' /NOLIST /PREFIX=ALL" + -
|
2011-03-25 16:20:35 +00:00
|
|
|
" /INCLUDE=(''CC_INCLUDES')"+ -
|
2011-03-19 10:58:14 +00:00
|
|
|
CCEXTRAFLAGS
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
|
|
|
$! Define The Linker Options File Name.
|
|
|
|
$!
|
2011-03-19 10:58:14 +00:00
|
|
|
$ OPT_FILE = "VAX_DECC_OPTIONS.OPT"
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
|
|
|
$! End DECC Check.
|
|
|
|
$!
|
|
|
|
$ ENDIF
|
|
|
|
$!
|
|
|
|
$! Check To See If We Are To Use VAXC.
|
|
|
|
$!
|
2002-10-31 16:46:52 +00:00
|
|
|
$ IF (P3.EQS."VAXC")
|
1999-05-13 11:37:32 +00:00
|
|
|
$ THEN
|
|
|
|
$!
|
|
|
|
$! Looks Like VAXC, Set To Use VAXC.
|
|
|
|
$!
|
|
|
|
$ COMPILER = "VAXC"
|
|
|
|
$!
|
|
|
|
$! Tell The User We Are Using VAX C.
|
|
|
|
$!
|
|
|
|
$ WRITE SYS$OUTPUT "Using VAXC 'C' Compiler."
|
|
|
|
$!
|
|
|
|
$! Compile Using VAXC.
|
|
|
|
$!
|
|
|
|
$ CC = "CC"
|
2009-05-15 16:36:56 +00:00
|
|
|
$ IF ARCH.NES."VAX"
|
1999-05-13 11:37:32 +00:00
|
|
|
$ THEN
|
2009-05-15 16:36:56 +00:00
|
|
|
$ WRITE SYS$OUTPUT "There is no VAX C on ''ARCH'!"
|
1999-05-13 11:37:32 +00:00
|
|
|
$ EXIT
|
|
|
|
$ ENDIF
|
|
|
|
$ IF F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC" THEN CC = "CC/VAXC"
|
2000-10-26 21:07:28 +00:00
|
|
|
$ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/NOLIST" + -
|
2011-03-19 10:58:14 +00:00
|
|
|
"/INCLUDE=(''CC_INCLUDES')"+ -
|
1999-05-13 11:37:32 +00:00
|
|
|
CCEXTRAFLAGS
|
|
|
|
$ CCDEFS = """VAXC""," + CCDEFS
|
|
|
|
$!
|
|
|
|
$! Define <sys> As SYS$COMMON:[SYSLIB]
|
|
|
|
$!
|
|
|
|
$ DEFINE/NOLOG SYS SYS$COMMON:[SYSLIB]
|
|
|
|
$!
|
|
|
|
$! Define The Linker Options File Name.
|
|
|
|
$!
|
2011-03-19 10:58:14 +00:00
|
|
|
$ OPT_FILE = "VAX_VAXC_OPTIONS.OPT"
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
|
|
|
$! End VAXC Check
|
|
|
|
$!
|
|
|
|
$ ENDIF
|
|
|
|
$!
|
|
|
|
$! Check To See If We Are To Use GNU C.
|
|
|
|
$!
|
2002-10-31 16:46:52 +00:00
|
|
|
$ IF (P3.EQS."GNUC")
|
1999-05-13 11:37:32 +00:00
|
|
|
$ THEN
|
|
|
|
$!
|
|
|
|
$! Looks Like GNUC, Set To Use GNUC.
|
|
|
|
$!
|
|
|
|
$ COMPILER = "GNUC"
|
|
|
|
$!
|
|
|
|
$! Tell The User We Are Using GNUC.
|
|
|
|
$!
|
|
|
|
$ WRITE SYS$OUTPUT "Using GNU 'C' Compiler."
|
|
|
|
$!
|
|
|
|
$! Use GNU C...
|
|
|
|
$!
|
|
|
|
$ CC = "GCC/NOCASE_HACK/''GCC_OPTIMIZE'/''DEBUGGER'/NOLIST" + -
|
2011-03-19 10:58:14 +00:00
|
|
|
"/INCLUDE=(''CC_INCLUDES')"+ -
|
2000-10-26 21:07:28 +00:00
|
|
|
CCEXTRAFLAGS
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
|
|
|
$! Define The Linker Options File Name.
|
|
|
|
$!
|
2011-03-19 10:58:14 +00:00
|
|
|
$ OPT_FILE = "VAX_GNUC_OPTIONS.OPT"
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
|
|
|
$! End The GNU C Check.
|
|
|
|
$!
|
|
|
|
$ ENDIF
|
|
|
|
$!
|
|
|
|
$! Set up default defines
|
|
|
|
$!
|
|
|
|
$ CCDEFS = """FLAT_INC=1""," + CCDEFS
|
|
|
|
$!
|
|
|
|
$! Finish up the definition of CC.
|
|
|
|
$!
|
|
|
|
$ IF COMPILER .EQS. "DECC"
|
|
|
|
$ THEN
|
|
|
|
$ IF CCDISABLEWARNINGS .EQS. ""
|
|
|
|
$ THEN
|
|
|
|
$ CC4DISABLEWARNINGS = "DOLLARID"
|
2006-01-11 18:55:42 +00:00
|
|
|
$ CC6DISABLEWARNINGS = "MIXLINKAGE"
|
1999-05-13 11:37:32 +00:00
|
|
|
$ ELSE
|
|
|
|
$ CC4DISABLEWARNINGS = CCDISABLEWARNINGS + ",DOLLARID"
|
2006-01-11 18:55:42 +00:00
|
|
|
$ CC6DISABLEWARNINGS = CCDISABLEWARNINGS + ",MIXLINKAGE"
|
2011-03-25 16:20:35 +00:00
|
|
|
$ CCDISABLEWARNINGS = " /WARNING=(DISABLE=(" + CCDISABLEWARNINGS + "))"
|
1999-05-13 11:37:32 +00:00
|
|
|
$ ENDIF
|
2011-03-25 16:20:35 +00:00
|
|
|
$ CC4DISABLEWARNINGS = " /WARNING=(DISABLE=(" + CC4DISABLEWARNINGS + "))"
|
|
|
|
$ CC6DISABLEWARNINGS = " /WARNING=(DISABLE=(" + CC6DISABLEWARNINGS + "))"
|
1999-05-13 11:37:32 +00:00
|
|
|
$ ELSE
|
|
|
|
$ CCDISABLEWARNINGS = ""
|
|
|
|
$ CC4DISABLEWARNINGS = ""
|
2006-01-11 18:55:42 +00:00
|
|
|
$ CC6DISABLEWARNINGS = ""
|
1999-05-13 11:37:32 +00:00
|
|
|
$ ENDIF
|
2011-03-25 16:20:35 +00:00
|
|
|
$ CC3 = CC + " /DEFINE=(" + CCDEFS + ISSEVEN + ")" + CCDISABLEWARNINGS
|
|
|
|
$ CC = CC + " /DEFINE=(" + CCDEFS + ")" + CCDISABLEWARNINGS
|
2002-10-31 16:46:52 +00:00
|
|
|
$ IF ARCH .EQS. "VAX" .AND. COMPILER .EQS. "DECC" .AND. P2 .NES. "DEBUG"
|
1999-05-13 11:37:32 +00:00
|
|
|
$ THEN
|
2011-03-25 16:20:35 +00:00
|
|
|
$ CC5 = CC + " /OPTIMIZE=NODISJOINT"
|
2011-03-19 10:58:14 +00:00
|
|
|
$ CC5_DIFFERENT = 1
|
1999-05-13 11:37:32 +00:00
|
|
|
$ ELSE
|
2011-03-19 10:58:14 +00:00
|
|
|
$ CC5 = CC
|
|
|
|
$ CC5_DIFFERENT = 0
|
1999-05-13 11:37:32 +00:00
|
|
|
$ ENDIF
|
|
|
|
$ CC4 = CC - CCDISABLEWARNINGS + CC4DISABLEWARNINGS
|
2006-01-11 13:31:04 +00:00
|
|
|
$ CC6 = CC - CCDISABLEWARNINGS + CC6DISABLEWARNINGS
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
|
|
|
$! Show user the result
|
|
|
|
$!
|
2002-08-15 08:28:38 +00:00
|
|
|
$ WRITE/SYMBOL SYS$OUTPUT "Main C Compiling Command: ",CC
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
2011-03-19 10:58:14 +00:00
|
|
|
$! Else The User Entered An Invalid Argument.
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
|
|
|
$ ELSE
|
|
|
|
$!
|
|
|
|
$! Tell The User We Don't Know What They Want.
|
|
|
|
$!
|
|
|
|
$ WRITE SYS$OUTPUT ""
|
2002-10-31 16:46:52 +00:00
|
|
|
$ WRITE SYS$OUTPUT "The Option ",P3," Is Invalid. The Valid Options Are:"
|
1999-05-13 11:37:32 +00:00
|
|
|
$ WRITE SYS$OUTPUT ""
|
|
|
|
$ WRITE SYS$OUTPUT " VAXC : To Compile With VAX C."
|
|
|
|
$ WRITE SYS$OUTPUT " DECC : To Compile With DEC C."
|
|
|
|
$ WRITE SYS$OUTPUT " GNUC : To Compile With GNU C."
|
|
|
|
$ WRITE SYS$OUTPUT ""
|
|
|
|
$!
|
|
|
|
$! Time To EXIT.
|
|
|
|
$!
|
|
|
|
$ EXIT
|
|
|
|
$!
|
2011-03-19 10:58:14 +00:00
|
|
|
$! End The Valid Argument Check.
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
|
|
|
$ ENDIF
|
|
|
|
$!
|
|
|
|
$! Build a MACRO command for the architecture at hand
|
|
|
|
$!
|
|
|
|
$ IF ARCH .EQS. "VAX" THEN MACRO = "MACRO/''DEBUGGER'"
|
2009-05-15 16:36:56 +00:00
|
|
|
$ IF ARCH .NES. "VAX" THEN MACRO = "MACRO/MIGRATION/''DEBUGGER'/''MACRO_OPTIMIZE'"
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
|
|
|
$! Show user the result
|
|
|
|
$!
|
2002-08-15 08:28:38 +00:00
|
|
|
$ WRITE/SYMBOL SYS$OUTPUT "Main MACRO Compiling Command: ",MACRO
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
|
|
|
$! Time to check the contents, and to make sure we get the correct library.
|
|
|
|
$!
|
2002-10-31 16:46:52 +00:00
|
|
|
$ IF P4.EQS."SOCKETSHR" .OR. P4.EQS."MULTINET" .OR. P4.EQS."UCX" -
|
|
|
|
.OR. P4.EQS."TCPIP" .OR. P4.EQS."NONE"
|
1999-05-13 11:37:32 +00:00
|
|
|
$ THEN
|
|
|
|
$!
|
|
|
|
$! Check to see if SOCKETSHR was chosen
|
|
|
|
$!
|
2002-10-31 16:46:52 +00:00
|
|
|
$ IF P4.EQS."SOCKETSHR"
|
1999-05-13 11:37:32 +00:00
|
|
|
$ THEN
|
|
|
|
$!
|
|
|
|
$! Set the library to use SOCKETSHR
|
|
|
|
$!
|
2011-03-19 10:58:14 +00:00
|
|
|
$ TCPIP_LIB = ",SYS$DISK:[-.VMS]SOCKETSHR_SHR.OPT /OPTIONS"
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
|
|
|
$! Done with SOCKETSHR
|
|
|
|
$!
|
|
|
|
$ ENDIF
|
|
|
|
$!
|
|
|
|
$! Check to see if MULTINET was chosen
|
|
|
|
$!
|
2002-10-31 16:46:52 +00:00
|
|
|
$ IF P4.EQS."MULTINET"
|
1999-05-13 11:37:32 +00:00
|
|
|
$ THEN
|
|
|
|
$!
|
|
|
|
$! Set the library to use UCX emulation.
|
|
|
|
$!
|
2002-10-31 16:46:52 +00:00
|
|
|
$ P4 = "UCX"
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
|
|
|
$! Done with MULTINET
|
|
|
|
$!
|
|
|
|
$ ENDIF
|
|
|
|
$!
|
|
|
|
$! Check to see if UCX was chosen
|
|
|
|
$!
|
2002-10-31 16:46:52 +00:00
|
|
|
$ IF P4.EQS."UCX"
|
1999-05-13 11:37:32 +00:00
|
|
|
$ THEN
|
|
|
|
$!
|
|
|
|
$! Set the library to use UCX.
|
|
|
|
$!
|
2011-03-19 10:58:14 +00:00
|
|
|
$ TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_DECC.OPT /OPTIONS"
|
1999-05-13 11:37:32 +00:00
|
|
|
$ IF F$TRNLNM("UCX$IPC_SHR") .NES. ""
|
|
|
|
$ THEN
|
2011-03-19 10:58:14 +00:00
|
|
|
$ TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_DECC_LOG.OPT /OPTIONS"
|
1999-05-13 11:37:32 +00:00
|
|
|
$ ELSE
|
|
|
|
$ IF COMPILER .NES. "DECC" .AND. ARCH .EQS. "VAX" THEN -
|
2011-03-19 10:58:14 +00:00
|
|
|
TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_VAXC.OPT /OPTIONS"
|
1999-05-13 11:37:32 +00:00
|
|
|
$ ENDIF
|
|
|
|
$!
|
|
|
|
$! Done with UCX
|
|
|
|
$!
|
|
|
|
$ ENDIF
|
|
|
|
$!
|
2002-05-22 11:37:20 +00:00
|
|
|
$! Check to see if TCPIP was chosen
|
|
|
|
$!
|
2002-10-31 16:46:52 +00:00
|
|
|
$ IF P4.EQS."TCPIP"
|
2002-05-22 11:37:20 +00:00
|
|
|
$ THEN
|
|
|
|
$!
|
|
|
|
$! Set the library to use TCPIP (post UCX).
|
|
|
|
$!
|
2011-03-19 10:58:14 +00:00
|
|
|
$ TCPIP_LIB = ",SYS$DISK:[-.VMS]TCPIP_SHR_DECC.OPT /OPTIONS"
|
2002-05-22 11:37:20 +00:00
|
|
|
$!
|
|
|
|
$! Done with TCPIP
|
|
|
|
$!
|
|
|
|
$ ENDIF
|
|
|
|
$!
|
|
|
|
$! Check to see if NONE was chosen
|
|
|
|
$!
|
2002-10-31 16:46:52 +00:00
|
|
|
$ IF P4.EQS."NONE"
|
2002-05-22 11:37:20 +00:00
|
|
|
$ THEN
|
|
|
|
$!
|
|
|
|
$! Do not use a TCPIP library.
|
|
|
|
$!
|
|
|
|
$ TCPIP_LIB = ""
|
|
|
|
$!
|
|
|
|
$! Done with TCPIP
|
|
|
|
$!
|
|
|
|
$ ENDIF
|
|
|
|
$!
|
1999-05-13 11:37:32 +00:00
|
|
|
$! Print info
|
|
|
|
$!
|
2011-03-19 10:58:14 +00:00
|
|
|
$ WRITE SYS$OUTPUT "TCP/IP library spec: ", TCPIP_LIB- ","
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
2011-03-19 10:58:14 +00:00
|
|
|
$! Else The User Entered An Invalid Argument.
|
1999-05-13 11:37:32 +00:00
|
|
|
$!
|
|
|
|
$ ELSE
|
|
|
|
$!
|
|
|
|
$! Tell The User We Don't Know What They Want.
|
|
|
|
$!
|
|
|
|
$ WRITE SYS$OUTPUT ""
|
2002-10-31 16:46:52 +00:00
|
|
|
$ WRITE SYS$OUTPUT "The Option ",P4," Is Invalid. The Valid Options Are:"
|
1999-05-13 11:37:32 +00:00
|
|
|
$ WRITE SYS$OUTPUT ""
|
|
|
|
$ WRITE SYS$OUTPUT " SOCKETSHR : To link with SOCKETSHR TCP/IP library."
|
|
|
|
$ WRITE SYS$OUTPUT " UCX : To link with UCX TCP/IP library."
|
2002-05-22 11:37:20 +00:00
|
|
|
$ WRITE SYS$OUTPUT " TCPIP : To link with TCPIP (post UCX) TCP/IP library."
|
1999-05-13 11:37:32 +00:00
|
|
|
$ WRITE SYS$OUTPUT ""
|
|
|
|
$!
|
|
|
|
$! Time To EXIT.
|
|
|
|
$!
|
|
|
|
$ EXIT
|
|
|
|
$!
|
|
|
|
$! Done with TCP/IP libraries
|
|
|
|
$!
|
|
|
|
$ ENDIF
|
|
|
|
$!
|
|
|
|
$! Check if the user wanted to compile just a subset of all the encryption
|
|
|
|
$! methods.
|
|
|
|
$!
|
2002-10-31 16:46:52 +00:00
|
|
|
$ IF P6 .NES. ""
|
1999-05-13 11:37:32 +00:00
|
|
|
$ THEN
|
2002-10-31 16:46:52 +00:00
|
|
|
$ ENCRYPT_TYPES = P6
|
1999-05-13 11:37:32 +00:00
|
|
|
$ ENDIF
|
|
|
|
$!
|
|
|
|
$! Time To RETURN...
|
|
|
|
$!
|
|
|
|
$ RETURN
|
|
|
|
$!
|
|
|
|
$ INITIALISE:
|
|
|
|
$!
|
|
|
|
$! Save old value of the logical name OPENSSL
|
|
|
|
$!
|
|
|
|
$ __SAVE_OPENSSL = F$TRNLNM("OPENSSL","LNM$PROCESS_TABLE")
|
|
|
|
$!
|
|
|
|
$! Save directory information
|
|
|
|
$!
|
|
|
|
$ __HERE = F$PARSE(F$PARSE("A.;",F$ENVIRONMENT("PROCEDURE"))-"A.;","[]A.;") - "A.;"
|
2001-10-29 13:05:28 +00:00
|
|
|
$ __HERE = F$EDIT(__HERE,"UPCASE")
|
1999-05-13 11:37:32 +00:00
|
|
|
$ __TOP = __HERE - "CRYPTO]"
|
|
|
|
$ __INCLUDE = __TOP + "INCLUDE.OPENSSL]"
|
|
|
|
$!
|
|
|
|
$! Set up the logical name OPENSSL to point at the include directory
|
|
|
|
$!
|
|
|
|
$ DEFINE OPENSSL/NOLOG '__INCLUDE'
|
|
|
|
$!
|
|
|
|
$! Done
|
|
|
|
$!
|
|
|
|
$ RETURN
|
|
|
|
$!
|
|
|
|
$ CLEANUP:
|
|
|
|
$!
|
|
|
|
$! Restore the logical name OPENSSL if it had a value
|
|
|
|
$!
|
|
|
|
$ IF __SAVE_OPENSSL .EQS. ""
|
|
|
|
$ THEN
|
|
|
|
$ DEASSIGN OPENSSL
|
|
|
|
$ ELSE
|
|
|
|
$ DEFINE/NOLOG OPENSSL '__SAVE_OPENSSL'
|
|
|
|
$ ENDIF
|
|
|
|
$!
|
|
|
|
$! Done
|
|
|
|
$!
|
|
|
|
$ RETURN
|