3 $! Original Author: UNKNOWN
4 $! Rewritten By: Robert Byer
6 $! A-Com Computing, Inc.
7 $! byer@mail.all-net.net
9 $! Changes by Richard Levitte <richard@levitte.org>
11 $! This procedure creates the SSL libraries of "[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB"
12 $! "[.xxx.EXE.SSL]LIBSSL.OLB" and if specified "[.xxx.EXE.RSAREF]LIBRSAGLUE.OLB".
13 $! The "xxx" denotes the machine architecture of AXP or VAX.
15 $! This procedures accepts two command line options listed below.
17 $! Specify one of the following build options for P1.
19 $! ALL Just build "everything".
20 $! CONFIG Just build the "[.CRYPTO]OPENSSLCONF.H" file.
21 $! BUILDINF Just build the "[.CRYPTO]BUILDINF.H" file.
22 $! SOFTLINKS Just fix the Unix soft links.
23 $! BUILDALL Same as ALL, except CONFIG, BUILDINF and SOFTILNKS aren't done.
24 $! RSAREF Just build the "[.xxx.EXE.RSAREF]LIBRSAGLUE.OLB" library.
25 $! CRYPTO Just build the "[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB" library.
26 $! CRYPTO/x Just build the x part of the
27 $! "[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB" library.
28 $! SSL Just build the "[.xxx.EXE.SSL]LIBSSL.OLB" library.
29 $! SSL_TASK Just build the "[.xxx.EXE.SSL]SSL_TASK.EXE" program.
30 $! TEST Just build the "[.xxx.EXE.TEST]" test programs for OpenSSL.
31 $! APPS Just build the "[.xxx.EXE.APPS]" application programs for OpenSSL.
34 $! Specify RSAREF as P2 to compile using the RSAREF Library.
35 $! If you specify NORSAREF, it will compile without using RSAREF.
36 $! (If in the United States, You Must Compile Using RSAREF).
38 $! Note: The RSAREF libraries are NOT INCLUDED and you have to
39 $! download it from "ftp://ftp.rsa.com/rsaref". You have to
40 $! get the ".tar-Z" file as the ".zip" file dosen't have the
41 $! directory structure stored. You have to extract the file
42 $! into the [.RSAREF] directory as that is where the scripts
43 $! will look for the files.
45 $! Speficy DEBUG or NODEBUG as P3 to compile with or without debugging
48 $! Specify which compiler at P4 to try to compile under.
53 $! LINK To only link the programs from existing object files.
54 $! (not yet implemented)
56 $! If you don't speficy a compiler, it will try to determine which
57 $! "C" compiler to use.
59 $! P5, if defined, sets a TCP/IP library to use, through one of the following
62 $! UCX for UCX or UCX emulation
63 $! SOCKETSHR for SOCKETSHR+NETLIB
65 $! P6, if defined, sets a compiler thread NOT needed on OpenVMS 7.1 (and up)
68 $! Check if we're in a batch job, and make sure we get to
69 $! the directory this script is in
71 $ IF F$MODE() .EQS. "BATCH"
73 $ COMNAME=F$ENVIRONMENT("PROCEDURE")
74 $ COMPATH=F$PARSE("A.;",COMNAME) - "A.;"
78 $! Check Which Architecture We Are Using.
80 $ IF (F$GETSYI("CPU").GE.128)
83 $! The Architecture Is AXP.
91 $! The Architecture Is VAX.
95 $! End The Architecture Check.
99 $! Check To Make Sure We Have Valid Command Line Parameters.
101 $ GOSUB CHECK_OPTIONS
103 $! Check To See What We Are To Do.
105 $ IF (BUILDCOMMAND.EQS."ALL")
108 $! Start with building the OpenSSL configuration file.
112 $! Create The "BUILDINF.H" Include File.
116 $! Fix The Unix Softlinks.
122 $ IF (BUILDCOMMAND.EQS."ALL".OR.BUILDCOMMAND.EQS."BUILDALL")
125 $! Check To See If We Are Going To Be Building The
126 $! [.xxx.EXE.RSAREF]LIBRSAGLUE.OLB Library.
128 $ IF (RSAREF.EQS."RSAREF")
131 $! Build The [.xxx.EXE.RSAREF]LIBRSAGLUE.OLB Library.
135 $! End The RSAREF Check.
139 $! Build The [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library.
143 $! Build The [.xxx.EXE.SSL]LIBSSL.OLB Library.
147 $! Build The [.xxx.EXE.SSL]SSL_TASK.EXE DECNet SSL Engine.
151 $! Build The [.xxx.EXE.TEST] OpenSSL Test Utilities.
155 $! Build The [.xxx.EXE.APPS] OpenSSL Application Utilities.
163 $! Build Just What The User Wants Us To Build.
165 $ GOSUB 'BUILDCOMMAND'
173 $! Rebuild The "[.CRYPTO]OPENSSLCONF.H" file.
177 $! Tell The User We Are Creating The [.CRYPTO]OPENSSLCONF.H File.
179 $ WRITE SYS$OUTPUT "Creating [.CRYPTO]OPENSSLCONF.H Include File."
181 $! Create The [.CRYPTO]OPENSSLCONF.H File.
183 $ OPEN/WRITE H_FILE SYS$DISK:[.CRYPTO]OPENSSLCONF.H
185 $! Write The [.CRYPTO]OPENSSLCONF.H File.
187 $ WRITE H_FILE "/* This file was automatically built using makevms.com */"
188 $ WRITE H_FILE "/* and [.CRYPTO]OPENSSLCONF.H_IN */"
191 $! Write a few macros that indicate how this system was built.
194 $ WRITE H_FILE "#ifndef OPENSSL_SYS_VMS"
195 $ WRITE H_FILE "# define OPENSSL_SYS_VMS"
196 $ WRITE H_FILE "#endif"
197 $ CONFIG_LOGICALS := NO_ASM,NO_RSA,NO_DSA,NO_DH,NO_MD2,NO_MD5,NO_RIPEMD,-
198 NO_SHA,NO_SHA0,NO_SHA1,NO_DES/NO_MDC2;NO_MDC2,NO_RC2,NO_RC4,NO_RC5,-
199 NO_IDEA,NO_BF,NO_CAST,NO_HMAC,NO_SSL2
202 $ CONFIG_LOG_E1 = F$ELEMENT(CONFIG_LOG_I,",",CONFIG_LOGICALS)
203 $ CONFIG_LOG_I = CONFIG_LOG_I + 1
204 $ IF CONFIG_LOG_E1 .EQS. "" THEN GOTO CONFIG_LOG_LOOP
205 $ IF CONFIG_LOG_E1 .EQS. "," THEN GOTO CONFIG_LOG_LOOP_END
206 $ CONFIG_LOG_E2 = F$EDIT(CONFIG_LOG_E1,"TRIM")
207 $ CONFIG_LOG_E1 = F$ELEMENT(0,";",CONFIG_LOG_E2)
208 $ CONFIG_LOG_E2 = F$ELEMENT(1,";",CONFIG_LOG_E2)
209 $ CONFIG_LOG_E0 = F$ELEMENT(0,"/",CONFIG_LOG_E1)
210 $ CONFIG_LOG_E1 = F$ELEMENT(1,"/",CONFIG_LOG_E1)
211 $ IF F$TRNLNM("OPENSSL_"+CONFIG_LOG_E0)
213 $ WRITE H_FILE "#ifndef OPENSSL_",CONFIG_LOG_E0
214 $ WRITE H_FILE "# define OPENSSL_",CONFIG_LOG_E0
215 $ WRITE H_FILE "#endif"
216 $ IF CONFIG_LOG_E1 .NES. "/"
218 $ WRITE H_FILE "#ifndef OPENSSL_",CONFIG_LOG_E1
219 $ WRITE H_FILE "# define OPENSSL_",CONFIG_LOG_E1
220 $ WRITE H_FILE "#endif"
223 $ IF CONFIG_LOG_E2 .NES. ";"
225 $ IF F$TRNLNM("OPENSSL_"+CONFIG_LOG_E2)
227 $ WRITE H_FILE "#ifndef OPENSSL_",CONFIG_LOG_E2
228 $ WRITE H_FILE "# define OPENSSL_",CONFIG_LOG_E2
229 $ WRITE H_FILE "#endif"
233 $ GOTO CONFIG_LOG_LOOP
234 $ CONFIG_LOG_LOOP_END:
235 $ WRITE H_FILE "#ifndef OPENSSL_THREADS"
236 $ WRITE H_FILE "# define OPENSSL_THREADS"
237 $ WRITE H_FILE "#endif"
238 $ WRITE H_FILE "#ifndef OPENSSL_NO_KRB5"
239 $ WRITE H_FILE "# define OPENSSL_NO_KRB5"
240 $ WRITE H_FILE "#endif"
243 $! Different tar version may have named the file differently
244 $ IF F$SEARCH("[.CRYPTO]OPENSSLCONF.H_IN") .NES. ""
246 $ TYPE [.CRYPTO]OPENSSLCONF.H_IN /OUTPUT=H_FILE:
248 $ IF F$SEARCH("[.CRYPTO]OPENSSLCONF_H.IN") .NES. ""
250 $ TYPE [.CRYPTO]OPENSSLCONF_H.IN /OUTPUT=H_FILE:
252 $ WRITE SYS$ERROR "Couldn't find a [.CRYPTO]OPENSSLCONF.H_IN. Exiting!"
256 $ IF ARCH .EQS. "AXP"
259 $! Write the Alpha specific data
261 $ WRITE H_FILE "#if defined(HEADER_RC4_H)"
262 $ WRITE H_FILE "#undef RC4_INT"
263 $ WRITE H_FILE "#define RC4_INT unsigned int"
264 $ WRITE H_FILE "#undef RC4_CHUNK"
265 $ WRITE H_FILE "#define RC4_CHUNK unsigned long long"
266 $ WRITE H_FILE "#endif"
268 $ WRITE H_FILE "#if defined(HEADER_DES_LOCL_H)"
269 $ WRITE H_FILE "#undef DES_LONG"
270 $ WRITE H_FILE "#define DES_LONG unsigned int"
271 $ WRITE H_FILE "#undef DES_PTR"
272 $ WRITE H_FILE "#define DES_PTR"
273 $ WRITE H_FILE "#undef DES_RISC1"
274 $ WRITE H_FILE "#undef DES_RISC2"
275 $ WRITE H_FILE "#define DES_RISC1"
276 $ WRITE H_FILE "#undef DES_UNROLL"
277 $ WRITE H_FILE "#define DES_UNROLL"
278 $ WRITE H_FILE "#endif"
280 $ WRITE H_FILE "#if defined(HEADER_BN_H)"
281 $ WRITE H_FILE "#undef SIXTY_FOUR_BIT_LONG"
282 $ WRITE H_FILE "#undef SIXTY_FOUR_BIT"
283 $ WRITE H_FILE "#define SIXTY_FOUR_BIT"
284 $ WRITE H_FILE "#undef THIRTY_TWO_BIT"
285 $ WRITE H_FILE "#undef SIXTEEN_BIT"
286 $ WRITE H_FILE "#undef EIGHT_BIT"
287 $ WRITE H_FILE "#endif"
289 $ WRITE H_FILE "#undef OPENSSL_EXPORT_VAR_AS_FUNCTION"
295 $! Write the VAX specific data
297 $ WRITE H_FILE "#if defined(HEADER_RC4_H)"
298 $ WRITE H_FILE "#undef RC4_INT"
299 $ WRITE H_FILE "#define RC4_INT unsigned char"
300 $ WRITE H_FILE "#undef RC4_CHUNK"
301 $ WRITE H_FILE "#define RC4_CHUNK unsigned long"
302 $ WRITE H_FILE "#endif"
304 $ WRITE H_FILE "#if defined(HEADER_DES_LOCL_H)"
305 $ WRITE H_FILE "#undef DES_LONG"
306 $ WRITE H_FILE "#define DES_LONG unsigned long"
307 $ WRITE H_FILE "#undef DES_PTR"
308 $ WRITE H_FILE "#define DES_PTR"
309 $ WRITE H_FILE "#undef DES_RISC1"
310 $ WRITE H_FILE "#undef DES_RISC2"
311 $ WRITE H_FILE "#undef DES_UNROLL"
312 $ WRITE H_FILE "#endif"
314 $ WRITE H_FILE "#if defined(HEADER_BN_H)"
315 $ WRITE H_FILE "#undef SIXTY_FOUR_BIT_LONG"
316 $ WRITE H_FILE "#undef SIXTY_FOUR_BIT"
317 $ WRITE H_FILE "#undef THIRTY_TWO_BIT"
318 $ WRITE H_FILE "#define THIRTY_TWO_BIT"
319 $ WRITE H_FILE "#undef SIXTEEN_BIT"
320 $ WRITE H_FILE "#undef EIGHT_BIT"
321 $ WRITE H_FILE "#endif"
323 $ WRITE H_FILE "#undef OPENSSL_EXPORT_VAR_AS_FUNCTION"
324 $ WRITE H_FILE "#define OPENSSL_EXPORT_VAR_AS_FUNCTION"
330 $! Close the [.CRYPTO]OPENSSLCONF.H file
334 $! That's All, Time To RETURN.
338 $! Rebuild The "[.CRYPTO]BUILDINF.H" file.
342 $! Tell The User We Are Creating The [.CRYPTO]BUILDINF.H File.
344 $ WRITE SYS$OUTPUT "Creating [.CRYPTO]BUILDINF.H Include File."
346 $! Create The [.CRYPTO]BUILDINF.H File.
348 $ OPEN/WRITE H_FILE SYS$DISK:[.CRYPTO]BUILDINF.H
350 $! Get The Current Date & Time.
354 $! Write The [.CRYPTO]BUILDINF.H File.
356 $ WRITE H_FILE "#define CFLAGS """" /* Not filled in for now */"
357 $ WRITE H_FILE "#define PLATFORM ""VMS"""
358 $ WRITE H_FILE "#define DATE ""''TIME'"" "
360 $! Close The [.CRYPTO]BUILDINF.H File.
364 $! That's All, Time To RETURN.
368 $! Copy a lot of files around.
372 $! Tell The User We Are Partly Rebuilding The [.TEST] Directory.
374 $ WRITE SYS$OUTPUT "Rebuilding The '[.APPS]MD5.C' And '[.APPS]RMD160.C' Files."
376 $ DELETE SYS$DISK:[.APPS]MD4.C;*,MD5.C;*,RMD160.C;*
378 $! Copy MD4.C from [.CRYPTO.MD4] into [.APPS]
380 $ COPY SYS$DISK:[.CRYPTO.MD4]MD4.C SYS$DISK:[.APPS]
382 $! Copy MD5.C from [.CRYPTO.MD5] into [.APPS]
384 $ COPY SYS$DISK:[.CRYPTO.MD5]MD5.C SYS$DISK:[.APPS]
386 $! Copy RMD160.C from [.CRYPTO.RIPEMD] into [.APPS]
388 $ COPY SYS$DISK:[.CRYPTO.RIPEMD]RMD160.C SYS$DISK:[.APPS]
390 $! Tell The User We Are Partly Rebuilding The [.TEST] Directory.
392 $ WRITE SYS$OUTPUT "Rebuilding The '[.TEST]*.C' Files."
394 $! First, We Have To "Rebuild" The "[.TEST]" Directory, So Delete
395 $! All The "C" Files That Are Currently There Now.
397 $ DELETE SYS$DISK:[.TEST]*.C;*
399 $! Copy all the *TEST.C files from [.CRYPTO...] into [.TEST]
401 $ COPY SYS$DISK:[.CRYPTO.*]%*TEST.C SYS$DISK:[.TEST]
403 $! Copy all the *TEST.C files from [.SSL...] into [.TEST]
405 $ COPY SYS$DISK:[.SSL]%*TEST.C SYS$DISK:[.TEST]
407 $! Tell The User We Are Rebuilding The [.INCLUDE.OPENSSL] Directory.
409 $ WRITE SYS$OUTPUT "Rebuilding The '[.INCLUDE.OPENSSL]' Directory."
411 $! First, make sure the directory exists
413 $ IF F$PARSE("SYS$DISK:[.INCLUDE.OPENSSL]") .EQS. "" THEN -
414 CREATE/DIRECTORY SYS$DISK:[.INCLUDE.OPENSSL]
416 $! Copy All The ".H" Files From The Main Directory.
418 $ EXHEADER := e_os2.h
419 $ COPY 'EXHEADER' SYS$DISK:[.INCLUDE.OPENSSL]
421 $! Copy All The ".H" Files From The [.CRYPTO] Directory Tree.
423 $ SDIRS := ,MD2,MD4,MD5,SHA,MDC2,HMAC,RIPEMD,-
424 DES,RC2,RC4,RC5,IDEA,BF,CAST,-
425 BN,EC,RSA,DSA,DH,DSO,ENGINE,RIJNDAEL,-
426 BUFFER,BIO,STACK,LHASH,RAND,ERR,OBJECTS,-
427 EVP,ASN1,PEM,X509,X509V3,CONF,TXT_DB,PKCS7,PKCS12,COMP,OCSP,UI
428 $ EXHEADER_ := crypto.h,tmdiff.h,opensslv.h,opensslconf.h,ebcdic.h,symhacks.h
429 $ EXHEADER_MD2 := md2.h
430 $ EXHEADER_MD4 := md4.h
431 $ EXHEADER_MD5 := md5.h
432 $ EXHEADER_SHA := sha.h
433 $ EXHEADER_MDC2 := mdc2.h
434 $ EXHEADER_HMAC := hmac.h
435 $ EXHEADER_RIPEMD := ripemd.h
436 $ EXHEADER_DES := des.h
437 $ EXHEADER_RC2 := rc2.h
438 $ EXHEADER_RC4 := rc4.h
439 $ EXHEADER_RC5 := rc5.h
440 $ EXHEADER_IDEA := idea.h
441 $ EXHEADER_BF := blowfish.h
442 $ EXHEADER_CAST := cast.h
443 $ EXHEADER_BN := bn.h
444 $ EXHEADER_EC := ec.h
445 $ EXHEADER_RSA := rsa.h
446 $ EXHEADER_DSA := dsa.h
447 $ EXHEADER_DH := dh.h
448 $ EXHEADER_DSO := dso.h
449 $ EXHEADER_ENGINE := engine.h
450 $ EXHEADER_RIJNDAEL := rd_fst.h,rijndael.h
451 $ EXHEADER_BUFFER := buffer.h
452 $ EXHEADER_BIO := bio.h
453 $ EXHEADER_STACK := stack.h,safestack.h
454 $ EXHEADER_LHASH := lhash.h
455 $ EXHEADER_RAND := rand.h
456 $ EXHEADER_ERR := err.h
457 $ EXHEADER_OBJECTS := objects.h,obj_mac.h
458 $ EXHEADER_EVP := evp.h
459 $ EXHEADER_ASN1 := asn1.h,asn1_mac.h,asn1t.h
460 $ EXHEADER_PEM := pem.h,pem2.h
461 $ EXHEADER_X509 := x509.h,x509_vfy.h
462 $ EXHEADER_X509V3 := x509v3.h
463 $ EXHEADER_CONF := conf.h,conf_api.h
464 $ EXHEADER_TXT_DB := txt_db.h
465 $ EXHEADER_PKCS7 := pkcs7.h
466 $ EXHEADER_PKCS12 := pkcs12.h
467 $ EXHEADER_COMP := comp.h
468 $ EXHEADER_OCSP := ocsp.h
469 $ EXHEADER_UI := ui.h,ui_compat.h
473 $ D = F$EDIT(F$ELEMENT(I, ",", SDIRS),"TRIM")
475 $ IF D .EQS. "," THEN GOTO LOOP_SDIRS_END
479 $ COPY [.CRYPTO]'tmp' SYS$DISK:[.INCLUDE.OPENSSL] !/LOG
481 $ COPY [.CRYPTO.'D']'tmp' SYS$DISK:[.INCLUDE.OPENSSL] !/LOG
486 $! Copy All The ".H" Files From The [.RSAREF] Directory.
488 $! EXHEADER := rsaref.h
489 $! COPY SYS$DISK:[.RSAREF]'EXHEADER' SYS$DISK:[.INCLUDE.OPENSSL]
491 $! Copy All The ".H" Files From The [.SSL] Directory.
493 $ EXHEADER := ssl.h,ssl2.h,ssl3.h,ssl23.h,tls1.h,kssl.h
494 $ COPY SYS$DISK:[.SSL]'EXHEADER' SYS$DISK:[.INCLUDE.OPENSSL]
498 $ PURGE SYS$DISK:[.INCLUDE.OPENSSL]*.H
500 $! That's All, Time To RETURN.
504 $! Build The "[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB" Library.
508 $! Tell The User What We Are Doing.
510 $ WRITE SYS$OUTPUT ""
511 $ WRITE SYS$OUTPUT "Building The [.",ARCH,".EXE.CRYPTO]LIBCRYPTO.OLB Library."
513 $! Go To The [.CRYPTO] Directory.
515 $ SET DEFAULT SYS$DISK:[.CRYPTO]
517 $! Build The [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library.
519 $ @CRYPTO-LIB LIBRARY 'RSAREF' 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" "''ISSEVEN'" "''BUILDPART'"
521 $! Build The [.xxx.EXE.CRYPTO]*.EXE Test Applications.
523 $ @CRYPTO-LIB APPS 'RSAREF' 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" 'ISSEVEN'
525 $! Go Back To The Main Directory.
533 $! Build The [.xxx.EXE.RSAREF]LIBRSAGLUE Library.
536 $ WRITE SYS$OUTPUT ""
537 $ WRITE SYS$OUTPUT "RSAref glue library not built, since it's no longer needed"
540 $! Tell The User What We Are Doing.
542 $ WRITE SYS$OUTPUT ""
543 $ WRITE SYS$OUTPUT "Building The [.",ARCH,".EXE.RSAREF]LIBRSAGLUE.OLB Library."
545 $! Go To The [.RSAREF] Directory.
547 $ SET DEFAULT SYS$DISK:[.RSAREF]
549 $! Build The [.xxx.EXE.RSAREF]LIBRSAGLUE.OLB Library.
551 $ @RSAREF-LIB LIBRARY 'DEBUGGER' "''COMPILER'" 'ISSEVEN'
553 $! Go Back To The Main Directory.
561 $! Build The "[.xxx.EXE.SSL]LIBSSL.OLB" Library.
565 $! Tell The User What We Are Doing.
567 $ WRITE SYS$OUTPUT ""
568 $ WRITE SYS$OUTPUT "Building The [.",ARCH,".EXE.SSL]LIBSSL.OLB Library."
570 $! Go To The [.SSL] Directory.
572 $ SET DEFAULT SYS$DISK:[.SSL]
574 $! Build The [.xxx.EXE.SSL]LIBSSL.OLB Library.
576 $ @SSL-LIB LIBRARY 'RSAREF' 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" 'ISSEVEN'
578 $! Go Back To The Main Directory.
586 $! Build The "[.xxx.EXE.SSL]SSL_TASK.EXE" Program.
590 $! Tell The User What We Are Doing.
592 $ WRITE SYS$OUTPUT ""
593 $ WRITE SYS$OUTPUT "Building DECNet Based SSL Engine, [.",ARCH,".EXE.SSL]SSL_TASK.EXE"
595 $! Go To The [.SSL] Directory.
597 $ SET DEFAULT SYS$DISK:[.SSL]
599 $! Build The [.xxx.EXE.SSL]SSL_TASK.EXE
601 $ @SSL-LIB SSL_TASK 'RSAREF' 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" 'ISSEVEN'
603 $! Go Back To The Main Directory.
607 $! That's All, Time To RETURN.
611 $! Build The OpenSSL Test Programs.
615 $! Tell The User What We Are Doing.
617 $ WRITE SYS$OUTPUT ""
618 $ WRITE SYS$OUTPUT "Building The OpenSSL [.",ARCH,".EXE.TEST] Test Utilities."
620 $! Go To The [.TEST] Directory.
622 $ SET DEFAULT SYS$DISK:[.TEST]
624 $! Build The Test Programs.
626 $ @MAKETESTS 'RSAREF' 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" 'ISSEVEN'
628 $! Go Back To The Main Directory.
632 $! That's All, Time To RETURN.
636 $! Build The OpenSSL Application Programs.
640 $! Tell The User What We Are Doing.
642 $ WRITE SYS$OUTPUT ""
643 $ WRITE SYS$OUTPUT "Building OpenSSL [.",ARCH,".EXE.APPS] Applications."
645 $! Go To The [.APPS] Directory.
647 $ SET DEFAULT SYS$DISK:[.APPS]
649 $! Build The Application Programs.
651 $ @MAKEAPPS 'RSAREF' 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" 'ISSEVEN'
653 $! Go Back To The Main Directory.
657 $! That's All, Time To RETURN.
661 $! Check The User's Options.
665 $! Check if there's a "part", and separate it out
667 $ BUILDPART = F$ELEMENT(1,"/",P1)
668 $ IF BUILDPART .EQS. "/"
672 $ P1 = F$EXTRACT(0,F$LENGTH(P1) - F$LENGTH(BUILDPART) - 1, P1)
675 $! Check To See If P1 Is Blank.
680 $! P1 Is ALL, So Build Everything.
682 $ BUILDCOMMAND = "ALL"
688 $! Else, Check To See If P1 Has A Valid Arguement.
690 $ IF (P1.EQS."CONFIG").OR.(P1.EQS."BUILDINF").OR.(P1.EQS."SOFTLINKS") -
691 .OR.(P1.EQS."BUILDALL") -
692 .OR.(P1.EQS."CRYPTO").OR.(P1.EQS."SSL").OR.(P1.EQS."RSAREF") -
693 .OR.(P1.EQS."SSL_TASK").OR.(P1.EQS."TEST").OR.(P1.EQS."APPS")
696 $! A Valid Arguement.
704 $! Tell The User We Don't Know What They Want.
706 $ WRITE SYS$OUTPUT ""
707 $ WRITE SYS$OUTPUT "The Option ",P1," Is Invalid. The Valid Options Are:"
708 $ WRITE SYS$OUTPUT ""
709 $ WRITE SYS$OUTPUT " ALL : Just Build Everything."
710 $ WRITE SYS$OUTPUT " CONFIG : Just build the [.CRYPTO]OPENSSLCONF.H file."
711 $ WRITE SYS$OUTPUT " BUILDINF : Just build the [.CRYPTO]BUILDINF.H file."
712 $ WRITE SYS$OUTPUT " SOFTLINKS: Just Fix The Unix soft links."
713 $ WRITE SYS$OUTPUT " BUILDALL : Same as ALL, except CONFIG, BUILDINF and SOFTILNKS aren't done."
714 $ WRITE SYS$OUTPUT " CRYPTO : To Build Just The [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library."
715 $ WRITE SYS$OUTPUT " CRYPTO/x : To Build Just The x Part Of The"
716 $ WRITE SYS$OUTPUT " [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library."
717 $ WRITE SYS$OUTPUT " SSL : To Build Just The [.xxx.EXE.SSL]LIBSSL.OLB Library."
718 $ WRITE SYS$OUTPUT " SSL_TASK : To Build Just The [.xxx.EXE.SSL]SSL_TASK.EXE Program."
719 $ WRITE SYS$OUTPUT " TEST : To Build Just The OpenSSL Test Programs."
720 $ WRITE SYS$OUTPUT " APPS : To Build Just The OpenSSL Application Programs."
721 $ WRITE SYS$OUTPUT ""
722 $ WRITE SYS$OUTPUT " Where 'xxx' Stands For:"
723 $ WRITE SYS$OUTPUT ""
724 $ WRITE SYS$OUTPUT " AXP : Alpha Architecture."
725 $ WRITE SYS$OUTPUT " VAX : VAX Architecture."
726 $ WRITE SYS$OUTPUT ""
732 $! End The Valid Argument Check.
740 $! Check To See If P2 Is Blank.
743 $ IF (P2.EQS."NORSAREF")
746 $! P2 Is NORSAREF, So Compile Without RSAREF.
748 $ RSAREF = "NORSAREF"
754 $! Check To See If We Are To Compile Using The RSAREF Library.
756 $ IF (P2.EQS."RSAREF")
759 $! Compile With RSAREF Library.
767 $! Tell The User Entered An Invalid Option..
769 $ WRITE SYS$OUTPUT ""
770 $ WRITE SYS$OUTPUT "The Option ",P2," Is Invalid. The Valid Options Are:"
771 $ WRITE SYS$OUTPUT ""
772 $ WRITE SYS$OUTPUT " RSAREF : To Compile With The RSAREF Library."
773 $ WRITE SYS$OUTPUT " NORSAREF : To Compile With The Regular RSA Library."
774 $ WRITE SYS$OUTPUT ""
780 $! End The Valid Arguemnt Check.
788 $! Check To See If P3 Is Blank.
790 $ IF (P3.EQS."NODEBUG")
793 $! P3 Is NODEBUG, So Compile Without Debugger Information.
795 $ DEBUGGER = "NODEBUG"
801 $! Check To See If We Are To Compile With Debugger Information.
803 $ IF (P3.EQS."DEBUG")
806 $! Compile With Debugger Information.
814 $! Tell The User Entered An Invalid Option..
816 $ WRITE SYS$OUTPUT ""
817 $ WRITE SYS$OUTPUT "The Option ",P3," Is Invalid. The Valid Options Are:"
818 $ WRITE SYS$OUTPUT ""
819 $ WRITE SYS$OUTPUT " DEBUG : Compile With The Debugger Information."
820 $ WRITE SYS$OUTPUT " NODEBUG : Compile Without The Debugger Information."
821 $ WRITE SYS$OUTPUT ""
827 $! End The Valid Arguement Check.
835 $! Check To See If P4 Is Blank.
840 $! O.K., The User Didn't Specify A Compiler, Let's Try To
841 $! Find Out Which One To Use.
843 $! Check To See If We Have GNU C.
845 $ IF (F$TRNLNM("GNU_CC").NES."")
848 $! Looks Like GNUC, Set To Use GNUC.
852 $! Tell The User We Are Using GNUC.
854 $ WRITE SYS$OUTPUT "Using GNU 'C' Compiler."
856 $! End The GNU C Compiler Check.
860 $! Check To See If We Have VAXC Or DECC.
862 $ IF (F$GETSYI("CPU").GE.128).OR.(F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC")
865 $! Looks Like DECC, Set To Use DECC.
869 $! Tell The User We Are Using DECC.
871 $ WRITE SYS$OUTPUT "Using DECC 'C' Compiler."
877 $! Looks Like VAXC, Set To Use VAXC.
881 $! Tell The User We Are Using VAX C.
883 $ WRITE SYS$OUTPUT "Using VAXC 'C' Compiler."
885 $! End The DECC & VAXC Compiler Check.
893 $! Check To See If The User Entered A Valid Paramter.
895 $ IF (P4.EQS."VAXC").OR.(P4.EQS."DECC").OR.(P4.EQS."GNUC")!.OR.(P4.EQS."LINK")
898 $! Check To See If The User Wanted To Just LINK.
903 $! Looks Like LINK-only
907 $! Tell The User We Are Only Linking.
909 $ WRITE SYS$OUTPUT "LINK Only. This actually NOT YET SUPPORTED!"
915 $! Check To See If The User Wanted DECC.
920 $! Looks Like DECC, Set To Use DECC.
924 $! Tell The User We Are Using DECC.
926 $ WRITE SYS$OUTPUT "Using DECC 'C' Compiler."
932 $! Check To See If We Are To Use VAXC.
937 $! Looks Like VAXC, Set To Use VAXC.
941 $! Tell The User We Are Using VAX C.
943 $ WRITE SYS$OUTPUT "Using VAXC 'C' Compiler."
949 $! Check To See If We Are To Use GNU C.
954 $! Looks Like GNUC, Set To Use GNUC.
958 $! Tell The User We Are Using GNUC.
960 $ WRITE SYS$OUTPUT "Using GNU 'C' Compiler."
962 $! End The GNU C Check.
966 $! Else The User Entered An Invalid Arguement.
970 $! Tell The User We Don't Know What They Want.
972 $ WRITE SYS$OUTPUT ""
973 $ WRITE SYS$OUTPUT "The Option ",P4," Is Invalid. The Valid Options Are:"
974 $ WRITE SYS$OUTPUT ""
975 $ WRITE SYS$OUTPUT " VAXC : To Compile With VAX C."
976 $ WRITE SYS$OUTPUT " DECC : To Compile With DEC C."
977 $ WRITE SYS$OUTPUT " GNUC : To Compile With GNU C."
978 $ WRITE SYS$OUTPUT ""
984 $! End The Valid Arguement Check.
992 $! Time to check the contents of P5, and to make sure we get the correct library.
994 $ IF P5.EQS."SOCKETSHR" .OR. P5.EQS."MULTINET" .OR. P5.EQS."UCX"
997 $! Check to see if SOCKETSHR was chosen
999 $ IF P5.EQS."SOCKETSHR"
1002 $! Set the library to use SOCKETSHR
1004 $ TCPIP_LIB = "[-.VMS]SOCKETSHR_SHR.OPT/OPT"
1008 $ WRITE SYS$OUTPUT "Using SOCKETSHR for TCP/IP"
1010 $! Done with SOCKETSHR
1014 $! Check to see if MULTINET was chosen
1016 $ IF P5.EQS."MULTINET"
1019 $! Set the library to use UCX emulation.
1025 $ WRITE SYS$OUTPUT "Using MultiNet via UCX emulation for TCP/IP"
1027 $! Done with MULTINET
1031 $! Check to see if UCX was chosen
1036 $! Set the library to use UCX.
1038 $ TCPIP_LIB = "[-.VMS]UCX_SHR_DECC.OPT/OPT"
1042 $ WRITE SYS$OUTPUT "Using UCX or an emulation thereof for TCP/IP"
1048 $! Set the TCPIP_TYPE symbol
1054 $ WRITE SYS$OUTPUT "TCP/IP library spec: ", TCPIP_LIB
1056 $! Else The User Entered An Invalid Arguement.
1062 $! Tell The User We Don't Know What They Want.
1064 $ WRITE SYS$OUTPUT ""
1065 $ WRITE SYS$OUTPUT "The Option ",P5," Is Invalid. The Valid Options Are:"
1066 $ WRITE SYS$OUTPUT ""
1067 $ WRITE SYS$OUTPUT " SOCKETSHR : To link with SOCKETSHR TCP/IP library."
1068 $ WRITE SYS$OUTPUT " UCX : To link with UCX TCP/IP library."
1069 $ WRITE SYS$OUTPUT ""
1076 $! Set the TCPIP_TYPE symbol
1081 $! Done with TCP/IP libraries
1085 $! Special Threads For OpenVMS v7.1 Or Later
1087 $! Written By: Richard Levitte
1088 $! richard@levitte.org
1091 $! Check To See If We Have A Option For P6.
1096 $! Get The Version Of VMS We Are Using.
1099 $ TMP = F$ELEMENT(0,"-",F$EXTRACT(1,4,F$GETSYI("VERSION")))
1100 $ TMP = F$INTEGER(F$ELEMENT(0,".",TMP)+F$ELEMENT(1,".",TMP))
1102 $! Check To See If The VMS Version Is v7.1 Or Later.
1107 $! We Have OpenVMS v7.1 Or Later, So Use The Special Threads.
1109 $ ISSEVEN := ,PTHREAD_USE_D4
1111 $! End The VMS Version Check.
1115 $! End The P6 Check.
1119 $! Time To RETURN...