$!----------------------------------------------------------------------------- $! BUILD_WUCME.COM $! $! P1 == COMPILE, LINK or BUILD (empty cannot be used) $! P2 == root directory of SSL package; e.g. $! SSL3$ROOT:[000000] $! SSL111$ROOT:[000000] $! WASD_ROOT:[SRC.OPENSSL-1_0_2K] $! SYS$COMMON:[OPENSSL] $! SYS$COMMON:[SSL111] $! $! 15-JAN-2023 MGD build under VSI SSL 3.0 $! 08-AUG-2019 MGD initial $!----------------------------------------------------------------------------- $! $ on controly then exit 44 $ say = "write sys$output" $! $ @[]archer.com "" $! $ p1 = f$edit(p1,"upcase") $ p2 = f$edit(p2,"upcase") $ p3 = f$edit(p3,"upcase") $! $! ******************* $! * P1 build type * $! ******************* $! $ if p1 .nes. "COMPILE" .and. p1 .nes. "LINK" .and. p1 .nes. "BUILD" $ then $ say "P1 must be one of ""COMPILE"", ""BUILD"" or ""LINK""!" $ exit 44 $ endif $! $! ******************** $! * P2 SSL package * $! ******************** $! $ if p2 .eqs. "" $ then $ say "P2 must be the root directory of the SSL package!" $ exit 44 $ endif $! $ ssl_root = f$parse(p2,,,"device","no_conceal") +- f$parse(p2,,,"directory","no_conceal") $ ssl_root = ssl_root - "][" - ".000000]" $ ssl_root = ssl_root - "]" + ".]" $ ssl_root = f$edit(ssl_root,"upcase") $! $ link_options = "" $ if f$locate("SSL111",ssl_root) .lt. f$length(ssl_root) $ then $ link_options = "ssl_111.opt" $ define /process /exec /nolog openssl 'ssl_root'[include] $ define /process /exec /nolog ssllib sys$share $ say "Using VSI SSL111 package" $ endif $ if f$locate("SSL3",ssl_root) .lt. f$length(ssl_root) $ then $ link_options = "ssl_3.opt" $ define /process /exec /nolog openssl 'ssl_root'[include] $ define /process /exec /nolog ssllib sys$share $ say "Using VSI SSL3 package" $ endif $ if f$locate("OPENSSL.",ssl_root) .lt. f$length(ssl_root) $ then $ link_options = "ssl_open.opt" $ define /process /exec /nolog openssl 'ssl_root'[include.openssl] $ define /process /exec /nolog ssllib 'ssl_root'[lib.'vms_arch_name'] $ say "Using OpenSSL (OSSL$..) package" $ endif $ if f$locate("WASD_ROOT.",ssl_root) .lt. f$length(ssl_root) $ then $ if f$locate("OPENSSL-1_1",ssl_root) .lt. f$length(ssl_root) $ then $ link_options = "ssl_wasd_111.opt" $ define /process /exec /nolog openssl 'ssl_root'[include.openssl] $ define /process /exec /nolog ssllib 'ssl_root'[wasd.'vms_arch_name'] $ define /process /exec /nolog cryptolib 'ssl_root'[wasd.'vms_arch_name'] $ say "Using WASD OpenSSL 1.1.n package" $ endif $ endif $! $ if link_options .eqs. "" $ then $ say "SSL package and link options could not be determined!" $ exit 44 $ endif $ if f$search("openssl:ssl.h") .eqs. "" $ then $ say "Error in SSL package root directory specification?" $ exit 44 $ endif $! $ show logical *ssl*,*lib* /process $! $ @[]archer.com "WUCME" $! $! ************* $! * compile * $! ************* $! $ defines = "/define=(__VMS_VER=70000000,__CRTL_VER=70000000)" $ warnings= " /warning=(disable=(PREOPTW))" $ includes = "" $! $ cc_options = "/decc /optimize /float=ieee /ieee=denorm " +- "/stand=relaxed_ansi /prefix=all" +- includes + defines + warnings $! $ if p1 .eqs. "" .or. p1 .eqs. "BUILD" .or. p1 .eqs. "COMPILE" $ then $ set noon $ set verify $ cc 'cc_options' /nodebug /object='wasd_obj_dir' base64 $ cc 'cc_options' /nodebug /object='wasd_obj_dir' crypto $ cc 'cc_options' /nodebug /object='wasd_obj_dir' curlwrap $ cc 'cc_options' /nodebug /object='wasd_obj_dir' json $ cc 'cc_options' /nodebug /object='wasd_obj_dir' msg $ cc 'cc_options' /nodebug /object='wasd_obj_dir' read-file $ cc 'cc_options' /nodebug /object='wasd_obj_dir' uacme $ cc 'cc_options' /nodebug /object='wasd_obj_dir' wucme $ cc 'cc_options' /nodebug /object='wasd_obj_dir' wucertman $ cc 'cc_options' /nodebug /object='wasd_obj_dir' wuhttp01 $ cc 'cc_options' /nodebug /object='wasd_obj_dir' wuhttps $ cc 'cc_options' /nodebug /object='wasd_obj_dir' wureport $ cc 'cc_options' /nodebug /object='wasd_obj_dir' wuscript $ cc 'cc_options' /nodebug /object='wasd_obj_dir' wutil $ cc 'cc_options' /nodebug /object='wasd_obj_dir' getopt_long $! 'f$verify(0) $ set on $ endif $! $! ********** $! * link * $! ********** $! $ linkit: $ if p1 .eqs. "" .or. p1 .eqs. "BUILD" .or. p1 .eqs. "LINK" $ then $ set noon $ set verify $ link /notrace/executable='wasd_obj_dir'wucme.exe - 'wasd_obj_dir'base64,- 'wasd_obj_dir'crypto,- 'wasd_obj_dir'curlwrap,- 'wasd_obj_dir'json,- 'wasd_obj_dir'msg,- 'wasd_obj_dir'read-file,- 'wasd_obj_dir'uacme,- 'wasd_obj_dir'wucme,- 'wasd_obj_dir'wucertman,- 'wasd_obj_dir'wuhttp01,- 'wasd_obj_dir'wuhttps,- 'wasd_obj_dir'wureport,- 'wasd_obj_dir'wuscript,- 'wasd_obj_dir'wutil,- 'wasd_obj_dir'getopt_long,- []'link_options'/options $! 'f$verify(0) $ set on $ endif $ purge /nolog 'wasd_obj_dir' $! $ deassign /process /exec openssl $ deassign /process /exec ssllib $ if f$trnlnm("CRYPTOLIB","LNM$PROCESS") .nes. "" - then deassign /process /exec cryptolib $! $!-----------------------------------------------------------------------------