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"
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 $! CRYPTO Just build the "[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB" library.
25 $! CRYPTO/x Just build the x part of the
26 $! "[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB" library.
27 $! SSL Just build the "[.xxx.EXE.SSL]LIBSSL.OLB" library.
28 $! SSL_TASK Just build the "[.xxx.EXE.SSL]SSL_TASK.EXE" program.
29 $! TEST Just build the "[.xxx.EXE.TEST]" test programs for OpenSSL.
30 $! APPS Just build the "[.xxx.EXE.APPS]" application programs for OpenSSL.
31 $! ENGINES Just build the "[.xxx.EXE.ENGINES]" application programs for OpenSSL.
34 $! P2 is ignored (it was used to denote if RSAref should be used or not,
35 $! and is simply kept so surrounding scripts don't get confused)
37 $! Speficy DEBUG or NODEBUG as P3 to compile with or without debugging
40 $! Specify which compiler at P4 to try to compile under.
45 $! LINK To only link the programs from existing object files.
46 $! (not yet implemented)
48 $! If you don't speficy a compiler, it will try to determine which
49 $! "C" compiler to use.
51 $! P5, if defined, sets a TCP/IP library to use, through one of the following
54 $! UCX for UCX or UCX emulation
55 $! TCPIP for TCP/IP Services or TCP/IP Services emulation
56 $! (this is prefered over UCX)
57 $! SOCKETSHR for SOCKETSHR+NETLIB
58 $! NONE to avoid specifying which TCP/IP implementation to
59 $! use at build time (this works with DEC C). This is
62 $! P6, if defined, sets a compiler thread NOT needed on OpenVMS 7.1 (and up)
65 $! Check if we're in a batch job, and make sure we get to
66 $! the directory this script is in
68 $ IF F$MODE() .EQS. "BATCH"
70 $ COMNAME=F$ENVIRONMENT("PROCEDURE")
71 $ COMPATH=F$PARSE("A.;",COMNAME) - "A.;"
75 $! Check Which Architecture We Are Using.
77 $ IF (F$GETSYI("CPU").GE.128)
80 $! The Architecture Is AXP.
88 $! The Architecture Is VAX.
92 $! End The Architecture Check.
96 $! Check To Make Sure We Have Valid Command Line Parameters.
100 $! Check To See What We Are To Do.
102 $ IF (BUILDCOMMAND.EQS."ALL")
105 $! Start with building the OpenSSL configuration file.
109 $! Create The "BUILDINF.H" Include File.
113 $! Fix The Unix Softlinks.
119 $ IF (BUILDCOMMAND.EQS."ALL".OR.BUILDCOMMAND.EQS."BUILDALL")
122 $! Build The [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library.
126 $! Build The [.xxx.EXE.SSL]LIBSSL.OLB Library.
130 $! Build The [.xxx.EXE.SSL]SSL_TASK.EXE DECNet SSL Engine.
134 $! Build The [.xxx.EXE.TEST] OpenSSL Test Utilities.
138 $! Build The [.xxx.EXE.APPS] OpenSSL Application Utilities.
142 $! Build The [.xxx.EXE.ENGINES] OpenSSL Shareable Engines.
150 $! Build Just What The User Wants Us To Build.
152 $ GOSUB 'BUILDCOMMAND'
160 $! Rebuild The "[.CRYPTO]OPENSSLCONF.H" file.
164 $! Tell The User We Are Creating The [.CRYPTO]OPENSSLCONF.H File.
166 $ WRITE SYS$OUTPUT "Creating [.CRYPTO]OPENSSLCONF.H Include File."
168 $! Create The [.CRYPTO]OPENSSLCONF.H File.
170 $ OPEN/WRITE H_FILE SYS$DISK:[.CRYPTO]OPENSSLCONF.H
172 $! Write The [.CRYPTO]OPENSSLCONF.H File.
174 $ WRITE H_FILE "/* This file was automatically built using makevms.com */"
175 $ WRITE H_FILE "/* and [.CRYPTO]OPENSSLCONF.H_IN */"
178 $! Write a few macros that indicate how this system was built.
181 $ WRITE H_FILE "#ifndef OPENSSL_SYS_VMS"
182 $ WRITE H_FILE "# define OPENSSL_SYS_VMS"
183 $ WRITE H_FILE "#endif"
184 $ CONFIG_LOGICALS := NO_ASM,NO_RSA,NO_DSA,NO_DH,NO_MD2,NO_MD5,NO_RIPEMD,-
185 NO_SHA,NO_SHA0,NO_SHA1,NO_DES/NO_MDC2;NO_MDC2,NO_RC2,NO_RC4,NO_RC5,-
186 NO_IDEA,NO_BF,NO_CAST,NO_HMAC,NO_SSL2
189 $ CONFIG_LOG_E1 = F$ELEMENT(CONFIG_LOG_I,",",CONFIG_LOGICALS)
190 $ CONFIG_LOG_I = CONFIG_LOG_I + 1
191 $ IF CONFIG_LOG_E1 .EQS. "" THEN GOTO CONFIG_LOG_LOOP
192 $ IF CONFIG_LOG_E1 .EQS. "," THEN GOTO CONFIG_LOG_LOOP_END
193 $ CONFIG_LOG_E2 = F$EDIT(CONFIG_LOG_E1,"TRIM")
194 $ CONFIG_LOG_E1 = F$ELEMENT(0,";",CONFIG_LOG_E2)
195 $ CONFIG_LOG_E2 = F$ELEMENT(1,";",CONFIG_LOG_E2)
196 $ CONFIG_LOG_E0 = F$ELEMENT(0,"/",CONFIG_LOG_E1)
197 $ CONFIG_LOG_E1 = F$ELEMENT(1,"/",CONFIG_LOG_E1)
198 $ IF F$TRNLNM("OPENSSL_"+CONFIG_LOG_E0)
200 $ WRITE H_FILE "#ifndef OPENSSL_",CONFIG_LOG_E0
201 $ WRITE H_FILE "# define OPENSSL_",CONFIG_LOG_E0
202 $ WRITE H_FILE "#endif"
203 $ IF CONFIG_LOG_E1 .NES. "/"
205 $ WRITE H_FILE "#ifndef OPENSSL_",CONFIG_LOG_E1
206 $ WRITE H_FILE "# define OPENSSL_",CONFIG_LOG_E1
207 $ WRITE H_FILE "#endif"
210 $ IF CONFIG_LOG_E2 .NES. ";"
212 $ IF F$TRNLNM("OPENSSL_"+CONFIG_LOG_E2)
214 $ WRITE H_FILE "#ifndef OPENSSL_",CONFIG_LOG_E2
215 $ WRITE H_FILE "# define OPENSSL_",CONFIG_LOG_E2
216 $ WRITE H_FILE "#endif"
220 $ GOTO CONFIG_LOG_LOOP
221 $ CONFIG_LOG_LOOP_END:
222 $ WRITE H_FILE "#ifndef OPENSSL_NO_STATIC_ENGINE"
223 $ WRITE H_FILE "# define OPENSSL_NO_STATIC_ENGINE"
224 $ WRITE H_FILE "#endif"
225 $ WRITE H_FILE "#ifndef OPENSSL_THREADS"
226 $ WRITE H_FILE "# define OPENSSL_THREADS"
227 $ WRITE H_FILE "#endif"
228 $ WRITE H_FILE "#ifndef OPENSSL_NO_KRB5"
229 $ WRITE H_FILE "# define OPENSSL_NO_KRB5"
230 $ WRITE H_FILE "#endif"
233 $! Different tar version may have named the file differently
234 $ IF F$SEARCH("[.CRYPTO]OPENSSLCONF.H_IN") .NES. ""
236 $ TYPE [.CRYPTO]OPENSSLCONF.H_IN /OUTPUT=H_FILE:
238 $ IF F$SEARCH("[.CRYPTO]OPENSSLCONF_H.IN") .NES. ""
240 $ TYPE [.CRYPTO]OPENSSLCONF_H.IN /OUTPUT=H_FILE:
243 $ IF F$SEARCH("[.CRYPTO]OPENSSLCONF.H.IN") .NES. ""
245 $ TYPE [.CRYPTO]OPENSSLCONF.H.IN /OUTPUT=H_FILE:
247 $ WRITE SYS$ERROR "Couldn't find a [.CRYPTO]OPENSSLCONF.H_IN. Exiting!"
252 $ IF ARCH .EQS. "AXP"
255 $! Write the Alpha specific data
257 $ WRITE H_FILE "#if defined(HEADER_RC4_H)"
258 $ WRITE H_FILE "#undef RC4_INT"
259 $ WRITE H_FILE "#define RC4_INT unsigned int"
260 $ WRITE H_FILE "#undef RC4_CHUNK"
261 $ WRITE H_FILE "#define RC4_CHUNK unsigned long long"
262 $ WRITE H_FILE "#endif"
264 $ WRITE H_FILE "#if defined(HEADER_DES_LOCL_H)"
265 $ WRITE H_FILE "#undef DES_LONG"
266 $ WRITE H_FILE "#define DES_LONG unsigned int"
267 $ WRITE H_FILE "#undef DES_PTR"
268 $ WRITE H_FILE "#define DES_PTR"
269 $ WRITE H_FILE "#undef DES_RISC1"
270 $ WRITE H_FILE "#undef DES_RISC2"
271 $ WRITE H_FILE "#define DES_RISC1"
272 $ WRITE H_FILE "#undef DES_UNROLL"
273 $ WRITE H_FILE "#define DES_UNROLL"
274 $ WRITE H_FILE "#endif"
276 $ WRITE H_FILE "#if defined(HEADER_BN_H)"
277 $ WRITE H_FILE "#undef SIXTY_FOUR_BIT_LONG"
278 $ WRITE H_FILE "#undef SIXTY_FOUR_BIT"
279 $ WRITE H_FILE "#define SIXTY_FOUR_BIT"
280 $ WRITE H_FILE "#undef THIRTY_TWO_BIT"
281 $ WRITE H_FILE "#undef SIXTEEN_BIT"
282 $ WRITE H_FILE "#undef EIGHT_BIT"
283 $ WRITE H_FILE "#endif"
285 $ WRITE H_FILE "#undef OPENSSL_EXPORT_VAR_AS_FUNCTION"
291 $! Write the VAX specific data
293 $ WRITE H_FILE "#if defined(HEADER_RC4_H)"
294 $ WRITE H_FILE "#undef RC4_INT"
295 $ WRITE H_FILE "#define RC4_INT unsigned char"
296 $ WRITE H_FILE "#undef RC4_CHUNK"
297 $ WRITE H_FILE "#define RC4_CHUNK unsigned long"
298 $ WRITE H_FILE "#endif"
300 $ WRITE H_FILE "#if defined(HEADER_DES_LOCL_H)"
301 $ WRITE H_FILE "#undef DES_LONG"
302 $ WRITE H_FILE "#define DES_LONG unsigned long"
303 $ WRITE H_FILE "#undef DES_PTR"
304 $ WRITE H_FILE "#define DES_PTR"
305 $ WRITE H_FILE "#undef DES_RISC1"
306 $ WRITE H_FILE "#undef DES_RISC2"
307 $ WRITE H_FILE "#undef DES_UNROLL"
308 $ WRITE H_FILE "#endif"
310 $ WRITE H_FILE "#if defined(HEADER_BN_H)"
311 $ WRITE H_FILE "#undef SIXTY_FOUR_BIT_LONG"
312 $ WRITE H_FILE "#undef SIXTY_FOUR_BIT"
313 $ WRITE H_FILE "#undef THIRTY_TWO_BIT"
314 $ WRITE H_FILE "#define THIRTY_TWO_BIT"
315 $ WRITE H_FILE "#undef SIXTEEN_BIT"
316 $ WRITE H_FILE "#undef EIGHT_BIT"
317 $ WRITE H_FILE "#endif"
319 $ WRITE H_FILE "#undef OPENSSL_EXPORT_VAR_AS_FUNCTION"
320 $ WRITE H_FILE "#define OPENSSL_EXPORT_VAR_AS_FUNCTION"
326 $! Close the [.CRYPTO]OPENSSLCONF.H file
330 $! That's All, Time To RETURN.
334 $! Rebuild The "[.CRYPTO]BUILDINF.H" file.
338 $! Tell The User We Are Creating The [.CRYPTO]BUILDINF.H File.
340 $ WRITE SYS$OUTPUT "Creating [.CRYPTO]BUILDINF.H Include File."
342 $! Create The [.CRYPTO]BUILDINF.H File.
344 $ OPEN/WRITE H_FILE SYS$DISK:[.CRYPTO]BUILDINF.H
346 $! Get The Current Date & Time.
350 $! Write The [.CRYPTO]BUILDINF.H File.
352 $ WRITE H_FILE "#define CFLAGS """" /* Not filled in for now */"
353 $ WRITE H_FILE "#define PLATFORM ""VMS"""
354 $ WRITE H_FILE "#define DATE ""''TIME'"" "
356 $! Close The [.CRYPTO]BUILDINF.H File.
360 $! That's All, Time To RETURN.
364 $! Copy a lot of files around.
368 $! Tell The User We Are Partly Rebuilding The [.TEST] Directory.
370 $ WRITE SYS$OUTPUT "Rebuilding The '[.APPS]MD4.C', '[.APPS]MD5.C' And '[.APPS]RMD160.C' Files."
372 $ DELETE SYS$DISK:[.APPS]MD4.C;*,MD5.C;*,RMD160.C;*
374 $! Copy MD4.C from [.CRYPTO.MD4] into [.APPS]
376 $ COPY SYS$DISK:[.CRYPTO.MD4]MD4.C SYS$DISK:[.APPS]
378 $! Copy MD5.C from [.CRYPTO.MD5] into [.APPS]
380 $ COPY SYS$DISK:[.CRYPTO.MD5]MD5.C SYS$DISK:[.APPS]
382 $! Copy RMD160.C from [.CRYPTO.RIPEMD] into [.APPS]
384 $ COPY SYS$DISK:[.CRYPTO.RIPEMD]RMD160.C SYS$DISK:[.APPS]
386 $! Tell The User We Are Partly Rebuilding The [.TEST] Directory.
388 $ WRITE SYS$OUTPUT "Rebuilding The '[.TEST]*.C' Files."
390 $! First, We Have To "Rebuild" The "[.TEST]" Directory, So Delete
391 $! All The "C" Files That Are Currently There Now.
393 $ DELETE SYS$DISK:[.TEST]*.C;*
394 $ DELETE SYS$DISK:[.TEST]EVPTESTS.TXT;*
396 $! Copy all the *TEST.C files from [.CRYPTO...] into [.TEST]
398 $ COPY SYS$DISK:[.CRYPTO.*]%*TEST.C SYS$DISK:[.TEST]
399 $ COPY SYS$DISK:[.CRYPTO.EVP]EVPTESTS.TXT SYS$DISK:[.TEST]
401 $! Copy all the *TEST.C files from [.SSL...] into [.TEST]
403 $ COPY SYS$DISK:[.SSL]%*TEST.C SYS$DISK:[.TEST]
405 $! Tell The User We Are Rebuilding The [.INCLUDE.OPENSSL] Directory.
407 $ WRITE SYS$OUTPUT "Rebuilding The '[.INCLUDE.OPENSSL]' Directory."
409 $! First, make sure the directory exists
411 $ IF F$PARSE("SYS$DISK:[.INCLUDE.OPENSSL]") .EQS. "" THEN -
412 CREATE/DIRECTORY SYS$DISK:[.INCLUDE.OPENSSL]
414 $! Copy All The ".H" Files From The Main Directory.
416 $ EXHEADER := e_os2.h
417 $ COPY 'EXHEADER' SYS$DISK:[.INCLUDE.OPENSSL]
419 $! Copy All The ".H" Files From The [.CRYPTO] Directory Tree.
421 $ SDIRS := ,MD2,MD4,MD5,SHA,MDC2,HMAC,RIPEMD,-
422 DES,RC2,RC4,RC5,IDEA,BF,CAST,-
423 BN,EC,RSA,DSA,ECDSA,DH,ECDH,DSO,ENGINE,AES,-
424 BUFFER,BIO,STACK,LHASH,RAND,ERR,OBJECTS,-
425 EVP,ASN1,PEM,X509,X509V3,CONF,TXT_DB,PKCS7,PKCS12,COMP,OCSP,UI,KRB5
426 $ EXHEADER_ := crypto.h,tmdiff.h,opensslv.h,opensslconf.h,ebcdic.h,symhacks.h,-
428 $ EXHEADER_MD2 := md2.h
429 $ EXHEADER_MD4 := md4.h
430 $ EXHEADER_MD5 := md5.h
431 $ EXHEADER_SHA := sha.h
432 $ EXHEADER_MDC2 := mdc2.h
433 $ EXHEADER_HMAC := hmac.h
434 $ EXHEADER_RIPEMD := ripemd.h
435 $ EXHEADER_DES := des.h,des_old.h
436 $ EXHEADER_RC2 := rc2.h
437 $ EXHEADER_RC4 := rc4.h
438 $ EXHEADER_RC5 := rc5.h
439 $ EXHEADER_IDEA := idea.h
440 $ EXHEADER_BF := blowfish.h
441 $ EXHEADER_CAST := cast.h
442 $ EXHEADER_BN := bn.h
443 $ EXHEADER_EC := ec.h
444 $ EXHEADER_RSA := rsa.h
445 $ EXHEADER_DSA := dsa.h
446 $ EXHEADER_ECDSA := ecdsa.h
447 $ EXHEADER_DH := dh.h
448 $ EXHEADER_ECDH := ecdh.h
449 $ EXHEADER_DSO := dso.h
450 $ EXHEADER_ENGINE := engine.h
451 $ EXHEADER_AES := aes.h
452 $ EXHEADER_BUFFER := buffer.h
453 $ EXHEADER_BIO := bio.h
454 $ EXHEADER_STACK := stack.h,safestack.h
455 $ EXHEADER_LHASH := lhash.h
456 $ EXHEADER_RAND := rand.h
457 $ EXHEADER_ERR := err.h
458 $ EXHEADER_OBJECTS := objects.h,obj_mac.h
459 $ EXHEADER_EVP := evp.h
460 $ EXHEADER_ASN1 := asn1.h,asn1_mac.h,asn1t.h
461 $ EXHEADER_PEM := pem.h,pem2.h
462 $ EXHEADER_X509 := x509.h,x509_vfy.h
463 $ EXHEADER_X509V3 := x509v3.h
464 $ EXHEADER_CONF := conf.h,conf_api.h
465 $ EXHEADER_TXT_DB := txt_db.h
466 $ EXHEADER_PKCS7 := pkcs7.h
467 $ EXHEADER_PKCS12 := pkcs12.h
468 $ EXHEADER_COMP := comp.h
469 $ EXHEADER_OCSP := ocsp.h
470 $ EXHEADER_UI := ui.h,ui_compat.h
471 $ EXHEADER_KRB5 := krb5_asn.h
475 $ D = F$EDIT(F$ELEMENT(I, ",", SDIRS),"TRIM")
477 $ IF D .EQS. "," THEN GOTO LOOP_SDIRS_END
481 $ COPY [.CRYPTO]'tmp' SYS$DISK:[.INCLUDE.OPENSSL] !/LOG
483 $ COPY [.CRYPTO.'D']'tmp' SYS$DISK:[.INCLUDE.OPENSSL] !/LOG
488 $! Copy All The ".H" Files From The [.SSL] Directory.
490 $ EXHEADER := ssl.h,ssl2.h,ssl3.h,ssl23.h,tls1.h,kssl.h
491 $ COPY SYS$DISK:[.SSL]'EXHEADER' SYS$DISK:[.INCLUDE.OPENSSL]
495 $ PURGE SYS$DISK:[.INCLUDE.OPENSSL]*.H
497 $! That's All, Time To RETURN.
501 $! Build The "[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB" Library.
505 $! Tell The User What We Are Doing.
507 $ WRITE SYS$OUTPUT ""
508 $ WRITE SYS$OUTPUT "Building The [.",ARCH,".EXE.CRYPTO]LIBCRYPTO.OLB Library."
510 $! Go To The [.CRYPTO] Directory.
512 $ SET DEFAULT SYS$DISK:[.CRYPTO]
514 $! Build The [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library.
516 $ @CRYPTO-LIB LIBRARY 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" "''ISSEVEN'" "''BUILDPART'"
518 $! Build The [.xxx.EXE.CRYPTO]*.EXE Test Applications.
520 $ @CRYPTO-LIB APPS 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" 'ISSEVEN' "''BUILDPART'"
522 $! Go Back To The Main Directory.
530 $! Build The "[.xxx.EXE.SSL]LIBSSL.OLB" Library.
534 $! Tell The User What We Are Doing.
536 $ WRITE SYS$OUTPUT ""
537 $ WRITE SYS$OUTPUT "Building The [.",ARCH,".EXE.SSL]LIBSSL.OLB Library."
539 $! Go To The [.SSL] Directory.
541 $ SET DEFAULT SYS$DISK:[.SSL]
543 $! Build The [.xxx.EXE.SSL]LIBSSL.OLB Library.
545 $ @SSL-LIB LIBRARY 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" 'ISSEVEN'
547 $! Go Back To The Main Directory.
555 $! Build The "[.xxx.EXE.SSL]SSL_TASK.EXE" Program.
559 $! Tell The User What We Are Doing.
561 $ WRITE SYS$OUTPUT ""
562 $ WRITE SYS$OUTPUT "Building DECNet Based SSL Engine, [.",ARCH,".EXE.SSL]SSL_TASK.EXE"
564 $! Go To The [.SSL] Directory.
566 $ SET DEFAULT SYS$DISK:[.SSL]
568 $! Build The [.xxx.EXE.SSL]SSL_TASK.EXE
570 $ @SSL-LIB SSL_TASK 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" 'ISSEVEN'
572 $! Go Back To The Main Directory.
576 $! That's All, Time To RETURN.
580 $! Build The OpenSSL Test Programs.
584 $! Tell The User What We Are Doing.
586 $ WRITE SYS$OUTPUT ""
587 $ WRITE SYS$OUTPUT "Building The OpenSSL [.",ARCH,".EXE.TEST] Test Utilities."
589 $! Go To The [.TEST] Directory.
591 $ SET DEFAULT SYS$DISK:[.TEST]
593 $! Build The Test Programs.
595 $ @MAKETESTS 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" 'ISSEVEN'
597 $! Go Back To The Main Directory.
601 $! That's All, Time To RETURN.
605 $! Build The OpenSSL Application Programs.
609 $! Tell The User What We Are Doing.
611 $ WRITE SYS$OUTPUT ""
612 $ WRITE SYS$OUTPUT "Building OpenSSL [.",ARCH,".EXE.APPS] Applications."
614 $! Go To The [.APPS] Directory.
616 $ SET DEFAULT SYS$DISK:[.APPS]
618 $! Build The Application Programs.
620 $ @MAKEAPPS 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" 'ISSEVEN'
622 $! Go Back To The Main Directory.
626 $! That's All, Time To RETURN.
630 $! Build The OpenSSL Application Programs.
634 $! Tell The User What We Are Doing.
636 $ WRITE SYS$OUTPUT ""
637 $ WRITE SYS$OUTPUT "Building OpenSSL [.",ARCH,".EXE.ENGINES] Engines."
639 $! Go To The [.ENGINES] Directory.
641 $ SET DEFAULT SYS$DISK:[.ENGINES]
643 $! Build The Application Programs.
645 $ @MAKEENGINES ENGINES 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" 'ISSEVEN' "''BUILDPART'"
647 $! Go Back To The Main Directory.
651 $! That's All, Time To RETURN.
655 $! Check The User's Options.
659 $! Check if there's a "part", and separate it out
661 $ BUILDPART = F$ELEMENT(1,"/",P1)
662 $ IF BUILDPART .EQS. "/"
666 $ P1 = F$EXTRACT(0,F$LENGTH(P1) - F$LENGTH(BUILDPART) - 1, P1)
669 $! Check To See If P1 Is Blank.
674 $! P1 Is ALL, So Build Everything.
676 $ BUILDCOMMAND = "ALL"
682 $! Else, Check To See If P1 Has A Valid Arguement.
684 $ IF (P1.EQS."CONFIG").OR.(P1.EQS."BUILDINF").OR.(P1.EQS."SOFTLINKS") -
685 .OR.(P1.EQS."BUILDALL") -
686 .OR.(P1.EQS."CRYPTO").OR.(P1.EQS."SSL") -
687 .OR.(P1.EQS."SSL_TASK").OR.(P1.EQS."TEST").OR.(P1.EQS."APPS")
690 $! A Valid Arguement.
698 $! Tell The User We Don't Know What They Want.
700 $ WRITE SYS$OUTPUT ""
701 $ WRITE SYS$OUTPUT "The Option ",P1," Is Invalid. The Valid Options Are:"
702 $ WRITE SYS$OUTPUT ""
703 $ WRITE SYS$OUTPUT " ALL : Just Build Everything."
704 $ WRITE SYS$OUTPUT " CONFIG : Just build the [.CRYPTO]OPENSSLCONF.H file."
705 $ WRITE SYS$OUTPUT " BUILDINF : Just build the [.CRYPTO]BUILDINF.H file."
706 $ WRITE SYS$OUTPUT " SOFTLINKS: Just Fix The Unix soft links."
707 $ WRITE SYS$OUTPUT " BUILDALL : Same as ALL, except CONFIG, BUILDINF and SOFTILNKS aren't done."
708 $ WRITE SYS$OUTPUT " CRYPTO : To Build Just The [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library."
709 $ WRITE SYS$OUTPUT " CRYPTO/x : To Build Just The x Part Of The"
710 $ WRITE SYS$OUTPUT " [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library."
711 $ WRITE SYS$OUTPUT " SSL : To Build Just The [.xxx.EXE.SSL]LIBSSL.OLB Library."
712 $ WRITE SYS$OUTPUT " SSL_TASK : To Build Just The [.xxx.EXE.SSL]SSL_TASK.EXE Program."
713 $ WRITE SYS$OUTPUT " TEST : To Build Just The OpenSSL Test Programs."
714 $ WRITE SYS$OUTPUT " APPS : To Build Just The OpenSSL Application Programs."
715 $ WRITE SYS$OUTPUT ""
716 $ WRITE SYS$OUTPUT " Where 'xxx' Stands For:"
717 $ WRITE SYS$OUTPUT ""
718 $ WRITE SYS$OUTPUT " AXP : Alpha Architecture."
719 $ WRITE SYS$OUTPUT " VAX : VAX Architecture."
720 $ WRITE SYS$OUTPUT ""
726 $! End The Valid Argument Check.
734 $! Check To See If P3 Is Blank.
736 $ IF (P3.EQS."NODEBUG")
739 $! P3 Is NODEBUG, So Compile Without Debugger Information.
741 $ DEBUGGER = "NODEBUG"
747 $! Check To See If We Are To Compile With Debugger Information.
749 $ IF (P3.EQS."DEBUG")
752 $! Compile With Debugger Information.
760 $! Tell The User Entered An Invalid Option..
762 $ WRITE SYS$OUTPUT ""
763 $ WRITE SYS$OUTPUT "The Option ",P3," Is Invalid. The Valid Options Are:"
764 $ WRITE SYS$OUTPUT ""
765 $ WRITE SYS$OUTPUT " DEBUG : Compile With The Debugger Information."
766 $ WRITE SYS$OUTPUT " NODEBUG : Compile Without The Debugger Information."
767 $ WRITE SYS$OUTPUT ""
773 $! End The Valid Arguement Check.
781 $! Check To See If P4 Is Blank.
786 $! O.K., The User Didn't Specify A Compiler, Let's Try To
787 $! Find Out Which One To Use.
789 $! Check To See If We Have GNU C.
791 $ IF (F$TRNLNM("GNU_CC").NES."")
794 $! Looks Like GNUC, Set To Use GNUC.
798 $! Tell The User We Are Using GNUC.
800 $ WRITE SYS$OUTPUT "Using GNU 'C' Compiler."
802 $! End The GNU C Compiler Check.
806 $! Check To See If We Have VAXC Or DECC.
808 $ IF (F$GETSYI("CPU").GE.128).OR.(F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC")
811 $! Looks Like DECC, Set To Use DECC.
815 $! Tell The User We Are Using DECC.
817 $ WRITE SYS$OUTPUT "Using DECC 'C' Compiler."
823 $! Looks Like VAXC, Set To Use VAXC.
827 $! Tell The User We Are Using VAX C.
829 $ WRITE SYS$OUTPUT "Using VAXC 'C' Compiler."
831 $! End The DECC & VAXC Compiler Check.
839 $! Check To See If The User Entered A Valid Paramter.
841 $ IF (P4.EQS."VAXC").OR.(P4.EQS."DECC").OR.(P4.EQS."GNUC")!.OR.(P4.EQS."LINK")
844 $! Check To See If The User Wanted To Just LINK.
849 $! Looks Like LINK-only
853 $! Tell The User We Are Only Linking.
855 $ WRITE SYS$OUTPUT "LINK Only. This actually NOT YET SUPPORTED!"
861 $! Check To See If The User Wanted DECC.
866 $! Looks Like DECC, Set To Use DECC.
870 $! Tell The User We Are Using DECC.
872 $ WRITE SYS$OUTPUT "Using DECC 'C' Compiler."
878 $! Check To See If We Are To Use VAXC.
883 $! Looks Like VAXC, Set To Use VAXC.
887 $! Tell The User We Are Using VAX C.
889 $ WRITE SYS$OUTPUT "Using VAXC 'C' Compiler."
895 $! Check To See If We Are To Use GNU C.
900 $! Looks Like GNUC, Set To Use GNUC.
904 $! Tell The User We Are Using GNUC.
906 $ WRITE SYS$OUTPUT "Using GNU 'C' Compiler."
908 $! End The GNU C Check.
912 $! Else The User Entered An Invalid Arguement.
916 $! Tell The User We Don't Know What They Want.
918 $ WRITE SYS$OUTPUT ""
919 $ WRITE SYS$OUTPUT "The Option ",P4," Is Invalid. The Valid Options Are:"
920 $ WRITE SYS$OUTPUT ""
921 $ WRITE SYS$OUTPUT " VAXC : To Compile With VAX C."
922 $ WRITE SYS$OUTPUT " DECC : To Compile With DEC C."
923 $ WRITE SYS$OUTPUT " GNUC : To Compile With GNU C."
924 $ WRITE SYS$OUTPUT ""
930 $! End The Valid Arguement Check.
938 $! Time to check the contents of P5, and to make sure we get the correct library.
940 $ IF P5.EQS."SOCKETSHR" .OR. P5.EQS."MULTINET" .OR. P5.EQS."UCX" -
941 .OR. P5.EQS."TCPIP" .OR. P5.EQS."NONE"
944 $! Check to see if SOCKETSHR was chosen
946 $ IF P5.EQS."SOCKETSHR"
949 $! Set the library to use SOCKETSHR
951 $ TCPIP_LIB = "SYS$DISK:[-.VMS]SOCKETSHR_SHR.OPT/OPT"
955 $ WRITE SYS$OUTPUT "Using SOCKETSHR for TCP/IP"
957 $! Done with SOCKETSHR
961 $! Check to see if MULTINET was chosen
963 $ IF P5.EQS."MULTINET"
966 $! Set the library to use UCX emulation.
972 $ WRITE SYS$OUTPUT "Using MultiNet via UCX emulation for TCP/IP"
974 $! Done with MULTINET
978 $! Check to see if UCX was chosen
983 $! Set the library to use UCX.
985 $ TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_DECC.OPT/OPT"
989 $ WRITE SYS$OUTPUT "Using UCX or an emulation thereof for TCP/IP"
995 $! Check to see if TCPIP was chosen
1000 $! Set the library to use TCPIP (post UCX).
1002 $ TCPIP_LIB = "SYS$DISK:[-.VMS]TCPIP_SHR_DECC.OPT/OPT"
1006 $ WRITE SYS$OUTPUT "Using TCPIP (post UCX) for TCP/IP"
1012 $! Check to see if NONE was chosen
1017 $! Do not use a TCPIP library.
1023 $ WRITE SYS$OUTPUT "A specific TCPIP library will not be used."
1029 $! Set the TCPIP_TYPE symbol
1035 $ WRITE SYS$OUTPUT "TCP/IP library spec: ", TCPIP_LIB
1037 $! Else The User Entered An Invalid Arguement.
1043 $! Tell The User We Don't Know What They Want.
1045 $ WRITE SYS$OUTPUT ""
1046 $ WRITE SYS$OUTPUT "The Option ",P5," Is Invalid. The Valid Options Are:"
1047 $ WRITE SYS$OUTPUT ""
1048 $ WRITE SYS$OUTPUT " SOCKETSHR : To link with SOCKETSHR TCP/IP library."
1049 $ WRITE SYS$OUTPUT " UCX : To link with UCX TCP/IP library."
1050 $ WRITE SYS$OUTPUT " TCPIP : To link with TCPIP TCP/IP (post UCX) library."
1051 $ WRITE SYS$OUTPUT " NONE : To not link with a specific TCP/IP library."
1052 $ WRITE SYS$OUTPUT ""
1059 $! If TCPIP is not defined, then hardcode it to make
1060 $! it clear that no TCPIP is desired.
1065 $ TCPIP_TYPE = "NONE"
1068 $! Set the TCPIP_TYPE symbol
1074 $! Done with TCP/IP libraries
1078 $! Special Threads For OpenVMS v7.1 Or Later
1080 $! Written By: Richard Levitte
1081 $! richard@levitte.org
1084 $! Check To See If We Have A Option For P6.
1089 $! Get The Version Of VMS We Are Using.
1092 $ TMP = F$ELEMENT(0,"-",F$EXTRACT(1,4,F$GETSYI("VERSION")))
1093 $ TMP = F$INTEGER(F$ELEMENT(0,".",TMP)+F$ELEMENT(1,".",TMP))
1095 $! Check To See If The VMS Version Is v7.1 Or Later.
1100 $! We Have OpenVMS v7.1 Or Later, So Use The Special Threads.
1102 $ ISSEVEN := ,PTHREAD_USE_D4
1104 $! End The VMS Version Check.
1108 $! End The P6 Check.
1112 $! Time To RETURN...