build.com 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. $! BUILD.COM -- Building procedure for the RSAref engine
  2. $
  3. $ if f$search("source.dir") .eqs. "" -
  4. .or. f$search("install.dir") .eqs. ""
  5. $ then
  6. $ write sys$error "RSAref 2.0 hasn't been properly extracted."
  7. $ exit
  8. $ endif
  9. $
  10. $ if (f$getsyi("cpu").lt.128)
  11. $ then
  12. $ arch := vax
  13. $ else
  14. $ arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
  15. $ if (arch .eqs. "") then arch = "UNK"
  16. $ endif
  17. $
  18. $ _save_default = f$environment("default")
  19. $ set default [.install]
  20. $ files := desc,digit,md2c,md5c,nn,prime,-
  21. rsa,r_encode,r_dh,r_enhanc,r_keygen,r_random,-
  22. r_stdlib
  23. $ delete rsaref.olb;*
  24. $ library/create/object rsaref.olb
  25. $ files_i = 0
  26. $ rsaref_loop:
  27. $ files_e = f$edit(f$element(files_i,",",files),"trim")
  28. $ files_i = files_i + 1
  29. $ if files_e .eqs. "," then goto rsaref_loop_end
  30. $ cc/include=([-.source],[])/define=PROTOTYPES=1/object=[]'files_e'.obj -
  31. [-.source]'files_e'.c
  32. $ library/replace/object rsaref.olb 'files_e'.obj
  33. $ goto rsaref_loop
  34. $ rsaref_loop_end:
  35. $
  36. $ set default [-]
  37. $ define/user openssl [---.include.openssl]
  38. $ cc/define=ENGINE_DYNAMIC_SUPPORT rsaref.c
  39. $
  40. $ if arch .eqs. "VAX"
  41. $ then
  42. $ macro/object=rsaref_vec.obj sys$input:
  43. ;
  44. ; Transfer vector for VAX shareable image
  45. ;
  46. .TITLE librsaref
  47. ;
  48. ; Define macro to assist in building transfer vector entries. Each entry
  49. ; should take no more than 8 bytes.
  50. ;
  51. .MACRO FTRANSFER_ENTRY routine
  52. .ALIGN QUAD
  53. .TRANSFER routine
  54. .MASK routine
  55. JMP routine+2
  56. .ENDM FTRANSFER_ENTRY
  57. ;
  58. ; Place entries in own program section.
  59. ;
  60. .PSECT $$LIBRSAREF,QUAD,PIC,USR,CON,REL,LCL,SHR,EXE,RD,NOWRT
  61. LIBRSAREF_xfer:
  62. FTRANSFER_ENTRY bind_engine
  63. FTRANSFER_ENTRY v_check
  64. ;
  65. ; Allocate extra storage at end of vector to allow for expansion.
  66. ;
  67. .BLKB 512-<.-LIBRSAREF_xfer> ; 1 page.
  68. .END
  69. $ link/share=librsaref.exe sys$input:/option
  70. !
  71. ! Ensure transfer vector is at beginning of image
  72. !
  73. CLUSTER=FIRST
  74. COLLECT=FIRST,$$LIBRSAREF
  75. !
  76. ! make psects nonshareable so image can be installed.
  77. !
  78. PSECT_ATTR=$CHAR_STRING_CONSTANTS,NOWRT
  79. []rsaref_vec.obj
  80. []rsaref.obj
  81. [.install]rsaref.olb/lib
  82. [---.vax.exe.crypto]libcrypto.olb/lib
  83. $ else
  84. $ if arch_name .eqs. "ALPHA"
  85. $ then
  86. $ link/share=librsaref.exe sys$input:/option
  87. []rsaref.obj
  88. [.install]rsaref.olb/lib
  89. [---.alpha.exe.crypto]libcrypto.olb/lib
  90. symbol_vector=(bind_engine=procedure,v_check=procedure)
  91. $ else
  92. $ if arch_name .eqs. "IA64"
  93. $ then
  94. $ link /shareable=librsaref.exe sys$input: /options
  95. []rsaref.obj
  96. [.install]rsaref.olb/lib
  97. [---.ia64.exe.crypto]libcrypto.olb/lib
  98. symbol_vector=(bind_engine=procedure,v_check=procedure)
  99. $ endif
  100. $ endif
  101. $ endif
  102. $
  103. $ set default '_save_default'