add test
[openssl.git] / demos / engines / rsaref / build.com
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 $       _save_default = f$environment("default")
11 $       set default [.install]
12 $       files := desc,digit,md2c,md5c,nn,prime,-
13                 rsa,r_encode,r_dh,r_enhanc,r_keygen,r_random,-
14                 r_stdlib
15 $       delete rsaref.olb;*
16 $       library/create/object rsaref.olb
17 $       files_i = 0
18 $ rsaref_loop:
19 $       files_e = f$edit(f$element(files_i,",",files),"trim")
20 $       files_i = files_i + 1
21 $       if files_e .eqs. "," then goto rsaref_loop_end
22 $       cc/include=([-.source],[])/define=PROTOTYPES=1/object=[]'files_e'.obj -
23                 [-.source]'files_e'.c
24 $       library/replace/object rsaref.olb 'files_e'.obj
25 $       goto rsaref_loop
26 $ rsaref_loop_end:
27 $
28 $       set default [-]
29 $       define/user openssl [---.include.openssl]
30 $       cc/define=ENGINE_DYNAMIC_SUPPORT rsaref.c
31 $
32 $       if f$getsyi("CPU") .ge. 128
33 $       then
34 $           link/share=librsaref.exe sys$input:/option
35 []rsaref.obj
36 [.install]rsaref.olb/lib
37 [---.axp.exe.crypto]libcrypto.olb/lib
38 symbol_vector=(bind_engine=procedure,v_check=procedure)
39 $       else
40 $           macro/object=rsaref_vec.obj sys$input:
41 ;
42 ; Transfer vector for VAX shareable image
43 ;
44         .TITLE librsaref
45 ;
46 ; Define macro to assist in building transfer vector entries.  Each entry
47 ; should take no more than 8 bytes.
48 ;
49         .MACRO FTRANSFER_ENTRY routine
50         .ALIGN QUAD
51         .TRANSFER routine
52         .MASK   routine
53         JMP     routine+2
54         .ENDM FTRANSFER_ENTRY
55 ;
56 ; Place entries in own program section.
57 ;
58         .PSECT $$LIBRSAREF,QUAD,PIC,USR,CON,REL,LCL,SHR,EXE,RD,NOWRT
59
60 LIBRSAREF_xfer:
61         FTRANSFER_ENTRY bind_engine
62         FTRANSFER_ENTRY v_check
63
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 $       endif
84 $
85 $       set default '_save_default'