summaryrefslogtreecommitdiff
path: root/VMS/mkshared.com
diff options
context:
space:
mode:
Diffstat (limited to 'VMS/mkshared.com')
-rw-r--r--VMS/mkshared.com67
1 files changed, 42 insertions, 25 deletions
diff --git a/VMS/mkshared.com b/VMS/mkshared.com
index da8f899db8..a950460b19 100644
--- a/VMS/mkshared.com
+++ b/VMS/mkshared.com
@@ -12,10 +12,10 @@ $! "64" for 64-bit pointer size
$! "" for default pointer size (64 bits on Alpha, 32 bits on VAX)
$! any other value gets the same effect as ""
$!
-$! Input: [.UTIL]LIBEAY.NUM,[.AXP.EXE.CRYPTO]LIBCRYPTO.OLB
-$! [.UTIL]SSLEAY.NUM,[.AXP.EXE.SSL]LIBSSL.OLB
-$! Output: [.AXP.EXE.CRYPTO]LIBCRYPTO.OPT,.MAP,.EXE
-$! [.AXP.EXE.SSL]LIBSSL.OPT,.MAP,.EXE
+$! Input: [.UTIL]LIBEAY.NUM,[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB
+$! [.UTIL]SSLEAY.NUM,[.xxx.EXE.SSL]LIBSSL.OLB
+$! Output: [.xxx.EXE.CRYPTO]LIBCRYPTO.OPT,.MAP,.EXE
+$! [.xxx.EXE.SSL]LIBSSL.OPT,.MAP,.EXE
$!
$! So far, tests have only been made on VMS for Alpha. VAX will come in time.
$! ===========================================================================
@@ -31,36 +31,46 @@ $
$ file_prefix = p1
$ if p2 .nes. "" .and. p2 .nes. "32" .and. p2 .nes. "64" then p2 = ""
$
-$ if f$getsyi("CPU") .ge. 128
+$ if (f$getsyi("cpu").lt.128)
$ then
-$ if p2 .eqs. "" then p2 = "64"
-$ build_bits = p2
-$ if build_bits .eqs. "64" then build_bits = ""
+$ arch := VAX
+$ else
+$ arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
+$ if (arch .eqs. "") then arch = "UNK"
+$ if p2 .eqs. "" then p2 = "64"
+$ build_bits = p2
+$ if build_bits .eqs. "64" then build_bits = ""
+$ endif
+$
+$ if arch .nes. "VAX"
+$ then
+$ arch_vax = 0
$ libid = "Crypto"
$ libnum = "[.UTIL]LIBEAY.NUM"
-$ libdir = "[.AXP.EXE.CRYPTO]"
+$ libdir = "[.''ARCH'.EXE.CRYPTO]"
$ libolb = "''libdir'LIBCRYPTO.OLB"
$ libopt = "''libdir'LIBCRYPTO.OPT"
$ libmap = "''libdir'LIBCRYPTO.MAP"
$ libgoal= "''libdir'''file_prefix'LIBCRYPTO_SHR''build_bits'.EXE"
$ libref = ""
-$ gosub create_axp_shr
+$ gosub create_nonvax_shr
$ libid = "SSL"
$ libnum = "[.UTIL]SSLEAY.NUM"
-$ libdir = "[.AXP.EXE.SSL]"
+$ libdir = "[.''ARCH'.EXE.SSL]"
$ libolb = "''libdir'LIBSSL.OLB"
$ libopt = "''libdir'LIBSSL.OPT"
$ libmap = "''libdir'LIBSSL.MAP"
$ libgoal= "''libdir'''file_prefix'LIBSSL_SHR''build_bits'.EXE"
-$ libref = "[.AXP.EXE.CRYPTO]''file_prefix'LIBCRYPTO_SHR''build_bits'.EXE"
-$ gosub create_axp_shr
+$ libref = "[.''ARCH'.EXE.CRYPTO]''file_prefix'LIBCRYPTO_SHR''build_bits'.EXE"
+$ gosub create_nonvax_shr
$ else
$ p2 = "32"
$ build_bits = ""
+$ arch_vax = 1
$ libtit = "CRYPTO_TRANSFER_VECTOR"
$ libid = "Crypto"
$ libnum = "[.UTIL]LIBEAY.NUM"
-$ libdir = "[.VAX.EXE.CRYPTO]"
+$ libdir = "[.''ARCH'.EXE.CRYPTO]"
$ libmar = "''libdir'LIBCRYPTO.MAR"
$ libolb = "''libdir'LIBCRYPTO.OLB"
$ libopt = "''libdir'LIBCRYPTO.OPT"
@@ -73,22 +83,22 @@ $ gosub create_vax_shr
$ libtit = "SSL_TRANSFER_VECTOR"
$ libid = "SSL"
$ libnum = "[.UTIL]SSLEAY.NUM"
-$ libdir = "[.VAX.EXE.SSL]"
+$ libdir = "[.''ARCH'.EXE.SSL]"
$ libmar = "''libdir'LIBSSL.MAR"
$ libolb = "''libdir'LIBSSL.OLB"
$ libopt = "''libdir'LIBSSL.OPT"
$ libobj = "''libdir'LIBSSL.OBJ"
$ libmap = "''libdir'LIBSSL.MAP"
$ libgoal= "''libdir'''file_prefix'LIBSSL_SHR''build_bits'.EXE"
-$ libref = "[.VAX.EXE.CRYPTO]''file_prefix'LIBCRYPTO_SHR''build_bits'.EXE"
+$ libref = "[.''ARCH'.EXE.CRYPTO]''file_prefix'LIBCRYPTO_SHR''build_bits'.EXE"
$ libvec = "LIBSSL"
$ gosub create_vax_shr
$ endif
$ exit
$
-$! ----- Soubroutines to actually build the shareable libraries
-$! The way things work, there's a main shareable library creator for each
-$! supported architecture, which is called from the main code above.
+$! ----- Soubroutines to build the shareable libraries
+$! For each supported architecture, there's a main shareable library
+$! creator, which is called from the main code above.
$! The creator will define a number of variables to tell the next levels of
$! subroutines what routines to use to write to the option files, call the
$! main processor, read_func_num, and when that is done, it will write version
@@ -114,10 +124,10 @@ $! read_func_num depends on the following variables from the creator:
$! libwriter The name of the writer routine to call for each .num file line
$! -----
$
-$! ----- Subroutines for AXP
+$! ----- Subroutines for non-VAX
$! -----
$! The creator routine
-$ create_axp_shr:
+$ create_nonvax_shr:
$ open/write opt 'libopt'
$ write opt "identification=""",libid," ",libverstr,""""
$ write opt libolb,"/lib"
@@ -125,7 +135,7 @@ $ if libref .nes. "" then write opt libref,"/SHARE"
$ write opt "SYMBOL_VECTOR=(-"
$ libfirstentry := true
$ libwrch := opt
-$ libwriter := write_axp_transfer_entry
+$ libwriter := write_nonvax_transfer_entry
$ textcount = 0
$ gosub read_func_num
$ write opt ")"
@@ -135,7 +145,7 @@ $ link/map='libmap'/full/share='libgoal' 'libopt'/option
$ return
$
$! The record writer routine
-$ write_axp_transfer_entry:
+$ write_nonvax_transfer_entry:
$ if libentry .eqs. ".dummy" then return
$ if info_kind .eqs. "VARIABLE"
$ then
@@ -281,8 +291,15 @@ $ truesum = truesum + 1
$ if plat_entry .eqs. "!EXPORT_VAR_AS_FUNCTION" then -
$ falsesum = falsesum + 1
$ endif
-$ if plat_entry .eqs. "VMS" then truesum = truesum + 1
-$ if plat_entry .eqs. "!VMS" then falsesum = falsesum + 1
+$!
+$ if ((plat_entry .eqs. "VMS") .or. -
+ (arch_vax .and. (plat_entry .eqs. "VMSVAX"))) then -
+ truesum = truesum + 1
+$!
+$ if ((plat_entry .eqs. "!VMS") .or. -
+ (arch_vax .and. (plat_entry .eqs. "!VMSVAX"))) then -
+ falsesum = falsesum + 1
+$!
$ goto loop1
$ endif
$ endloop1: