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_CAMELLIA,NO_SEED,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 BN_LLONG" ! Never define with SIXTY_FOUR_BIT
278 $ WRITE H_FILE "#undef SIXTY_FOUR_BIT_LONG"
279 $ WRITE H_FILE "#undef SIXTY_FOUR_BIT"
280 $ WRITE H_FILE "#define SIXTY_FOUR_BIT"
281 $ WRITE H_FILE "#undef THIRTY_TWO_BIT"
282 $ WRITE H_FILE "#undef SIXTEEN_BIT"
283 $ WRITE H_FILE "#undef EIGHT_BIT"
284 $ WRITE H_FILE "#endif"
286 $ WRITE H_FILE "#undef OPENSSL_EXPORT_VAR_AS_FUNCTION"
292 $! Write the VAX specific data
294 $ WRITE H_FILE "#if defined(HEADER_RC4_H)"
295 $ WRITE H_FILE "#undef RC4_INT"
296 $ WRITE H_FILE "#define RC4_INT unsigned char"
297 $ WRITE H_FILE "#undef RC4_CHUNK"
298 $ WRITE H_FILE "#define RC4_CHUNK unsigned long"
299 $ WRITE H_FILE "#endif"
301 $ WRITE H_FILE "#if defined(HEADER_DES_LOCL_H)"
302 $ WRITE H_FILE "#undef DES_LONG"
303 $ WRITE H_FILE "#define DES_LONG unsigned long"
304 $ WRITE H_FILE "#undef DES_PTR"
305 $ WRITE H_FILE "#define DES_PTR"
306 $ WRITE H_FILE "#undef DES_RISC1"
307 $ WRITE H_FILE "#undef DES_RISC2"
308 $ WRITE H_FILE "#undef DES_UNROLL"
309 $ WRITE H_FILE "#endif"
311 $ WRITE H_FILE "#if defined(HEADER_BN_H)"
312 $ WRITE H_FILE "#undef BN_LLONG" ! VAX C/DEC C doesn't have long long
313 $ WRITE H_FILE "#undef SIXTY_FOUR_BIT_LONG"
314 $ WRITE H_FILE "#undef SIXTY_FOUR_BIT"
315 $ WRITE H_FILE "#undef THIRTY_TWO_BIT"
316 $ WRITE H_FILE "#define THIRTY_TWO_BIT"
317 $ WRITE H_FILE "#undef SIXTEEN_BIT"
318 $ WRITE H_FILE "#undef EIGHT_BIT"
319 $ WRITE H_FILE "#endif"
321 $ WRITE H_FILE "#if defined(HEADER_SHA_H)"
322 $ WRITE H_FILE "#undef OPENSSL_NO_SHA512"
323 $ WRITE H_FILE "#define OPENSSL_NO_SHA512"
324 $ WRITE H_FILE "#endif"
326 $ WRITE H_FILE "#undef OPENSSL_EXPORT_VAR_AS_FUNCTION"
327 $ WRITE H_FILE "#define OPENSSL_EXPORT_VAR_AS_FUNCTION"
333 $! Close the [.CRYPTO]OPENSSLCONF.H file
337 $! That's All, Time To RETURN.
341 $! Rebuild The "[.CRYPTO]BUILDINF.H" file.
345 $! Tell The User We Are Creating The [.CRYPTO]BUILDINF.H File.
347 $ WRITE SYS$OUTPUT "Creating [.CRYPTO]BUILDINF.H Include File."
349 $! Create The [.CRYPTO]BUILDINF.H File.
351 $ OPEN/WRITE H_FILE SYS$DISK:[.CRYPTO]BUILDINF.H
353 $! Get The Current Date & Time.
357 $! Write The [.CRYPTO]BUILDINF.H File.
359 $ WRITE H_FILE "#define CFLAGS """" /* Not filled in for now */"
360 $ WRITE H_FILE "#define PLATFORM ""VMS"""
361 $ WRITE H_FILE "#define DATE ""''TIME'"" "
363 $! Close The [.CRYPTO]BUILDINF.H File.
367 $! That's All, Time To RETURN.
371 $! Copy a lot of files around.
375 $! Tell The User We Are Partly Rebuilding The [.APPS] Directory.
377 $ WRITE SYS$OUTPUT "Rebuilding The '[.APPS]MD4.C', '[.APPS]MD5.C' And '[.APPS]RMD160.C' Files."
379 $ DELETE SYS$DISK:[.APPS]MD4.C;*,MD5.C;*,RMD160.C;*
381 $! Copy MD4.C from [.CRYPTO.MD4] into [.APPS]
383 $ COPY SYS$DISK:[.CRYPTO.MD4]MD4.C SYS$DISK:[.APPS]
385 $! Copy MD5.C from [.CRYPTO.MD5] into [.APPS]
387 $ COPY SYS$DISK:[.CRYPTO.MD5]MD5.C SYS$DISK:[.APPS]
389 $! Copy RMD160.C from [.CRYPTO.RIPEMD] into [.APPS]
391 $ COPY SYS$DISK:[.CRYPTO.RIPEMD]RMD160.C SYS$DISK:[.APPS]
393 $! Tell The User We Are Partly Rebuilding The [.TEST] Directory.
395 $ WRITE SYS$OUTPUT "Rebuilding The '[.TEST]*.C' Files."
397 $! First, We Have To "Rebuild" The "[.TEST]" Directory, So Delete
398 $! All The "C" Files That Are Currently There Now.
400 $ DELETE SYS$DISK:[.TEST]*.C;*
401 $ DELETE SYS$DISK:[.TEST]EVPTESTS.TXT;*
403 $! Copy all the *TEST.C files from [.CRYPTO...] into [.TEST]
405 $ COPY SYS$DISK:[.CRYPTO.*]%*TEST.C SYS$DISK:[.TEST]
406 $ COPY SYS$DISK:[.CRYPTO.SHA]SHA%%%T.C SYS$DISK:[.TEST]
407 $ COPY SYS$DISK:[.CRYPTO.EVP]EVPTESTS.TXT SYS$DISK:[.TEST]
409 $! Copy all the *TEST.C files from [.SSL...] into [.TEST]
411 $ COPY SYS$DISK:[.SSL]%*TEST.C SYS$DISK:[.TEST]
413 $! Tell The User We Are Rebuilding The [.INCLUDE.OPENSSL] Directory.
415 $ WRITE SYS$OUTPUT "Rebuilding The '[.INCLUDE.OPENSSL]' Directory."
417 $! First, make sure the directory exists
419 $ IF F$PARSE("SYS$DISK:[.INCLUDE.OPENSSL]") .EQS. "" THEN -
420 CREATE/DIRECTORY SYS$DISK:[.INCLUDE.OPENSSL]
422 $! Copy All The ".H" Files From The Main Directory.
424 $ EXHEADER := e_os2.h
425 $ COPY 'EXHEADER' SYS$DISK:[.INCLUDE.OPENSSL]
427 $! Copy All The ".H" Files From The [.CRYPTO] Directory Tree.
431 MD2,MD4,MD5,SHA,MDC2,HMAC,RIPEMD,-
432 DES,RC2,RC4,RC5,IDEA,BF,CAST,CAMELLIA,SEED,-
433 BN,EC,RSA,DSA,ECDSA,DH,ECDH,DSO,ENGINE,AES,-
434 BUFFER,BIO,STACK,LHASH,RAND,ERR,-
435 EVP,ASN1,PEM,X509,X509V3,CONF,TXT_DB,PKCS7,PKCS12,COMP,OCSP,UI,KRB5,-
437 $ EXHEADER_ := crypto.h,tmdiff.h,opensslv.h,opensslconf.h,ebcdic.h,symhacks.h,-
439 $ EXHEADER_OBJECTS := objects.h,obj_mac.h
440 $ EXHEADER_MD2 := md2.h
441 $ EXHEADER_MD4 := md4.h
442 $ EXHEADER_MD5 := md5.h
443 $ EXHEADER_SHA := sha.h
444 $ EXHEADER_MDC2 := mdc2.h
445 $ EXHEADER_HMAC := hmac.h
446 $ EXHEADER_RIPEMD := ripemd.h
447 $ EXHEADER_DES := des.h,des_old.h
448 $ EXHEADER_RC2 := rc2.h
449 $ EXHEADER_RC4 := rc4.h
450 $ EXHEADER_RC5 := rc5.h
451 $ EXHEADER_IDEA := idea.h
452 $ EXHEADER_BF := blowfish.h
453 $ EXHEADER_CAST := cast.h
454 $ EXHEADER_CAMELLIA := camellia.h
455 $ EXHEADER_SEED := seed.h
456 $ EXHEADER_BN := bn.h
457 $ EXHEADER_EC := ec.h
458 $ EXHEADER_RSA := rsa.h
459 $ EXHEADER_DSA := dsa.h
460 $ EXHEADER_ECDSA := ecdsa.h
461 $ EXHEADER_DH := dh.h
462 $ EXHEADER_ECDH := ecdh.h
463 $ EXHEADER_DSO := dso.h
464 $ EXHEADER_ENGINE := engine.h
465 $ EXHEADER_AES := aes.h
466 $ EXHEADER_BUFFER := buffer.h
467 $ EXHEADER_BIO := bio.h
468 $ EXHEADER_STACK := stack.h,safestack.h
469 $ EXHEADER_LHASH := lhash.h
470 $ EXHEADER_RAND := rand.h
471 $ EXHEADER_ERR := err.h
472 $ EXHEADER_EVP := evp.h
473 $ EXHEADER_ASN1 := asn1.h,asn1_mac.h,asn1t.h
474 $ EXHEADER_PEM := pem.h,pem2.h
475 $ EXHEADER_X509 := x509.h,x509_vfy.h
476 $ EXHEADER_X509V3 := x509v3.h
477 $ EXHEADER_CONF := conf.h,conf_api.h
478 $ EXHEADER_TXT_DB := txt_db.h
479 $ EXHEADER_PKCS7 := pkcs7.h
480 $ EXHEADER_PKCS12 := pkcs12.h
481 $ EXHEADER_COMP := comp.h
482 $ EXHEADER_OCSP := ocsp.h
483 $ EXHEADER_UI := ui.h,ui_compat.h
484 $ EXHEADER_KRB5 := krb5_asn.h
485 $!EXHEADER_STORE := store.h,str_compat.h
486 $ EXHEADER_STORE := store.h
487 $ EXHEADER_PQUEUE := pqueue.h,pq_compat.h
491 $ D = F$EDIT(F$ELEMENT(I, ",", SDIRS),"TRIM")
493 $ IF D .EQS. "," THEN GOTO LOOP_SDIRS_END
497 $ COPY [.CRYPTO]'tmp' SYS$DISK:[.INCLUDE.OPENSSL] !/LOG
499 $ COPY [.CRYPTO.'D']'tmp' SYS$DISK:[.INCLUDE.OPENSSL] !/LOG
504 $! Copy All The ".H" Files From The [.SSL] Directory.
506 $ EXHEADER := ssl.h,ssl2.h,ssl3.h,ssl23.h,tls1.h,dtls1.h,kssl.h
507 $ COPY SYS$DISK:[.SSL]'EXHEADER' SYS$DISK:[.INCLUDE.OPENSSL]
511 $ PURGE SYS$DISK:[.INCLUDE.OPENSSL]*.H
513 $! That's All, Time To RETURN.
517 $! Build The "[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB" Library.
521 $! Tell The User What We Are Doing.
523 $ WRITE SYS$OUTPUT ""
524 $ WRITE SYS$OUTPUT "Building The [.",ARCH,".EXE.CRYPTO]LIBCRYPTO.OLB Library."
526 $! Go To The [.CRYPTO] Directory.
528 $ SET DEFAULT SYS$DISK:[.CRYPTO]
530 $! Build The [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library.
532 $ @CRYPTO-LIB LIBRARY 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" "''ISSEVEN'" "''BUILDPART'"
534 $! Build The [.xxx.EXE.CRYPTO]*.EXE Test Applications.
536 $ @CRYPTO-LIB APPS 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" 'ISSEVEN' "''BUILDPART'"
538 $! Go Back To The Main Directory.
546 $! Build The "[.xxx.EXE.SSL]LIBSSL.OLB" Library.
550 $! Tell The User What We Are Doing.
552 $ WRITE SYS$OUTPUT ""
553 $ WRITE SYS$OUTPUT "Building The [.",ARCH,".EXE.SSL]LIBSSL.OLB Library."
555 $! Go To The [.SSL] Directory.
557 $ SET DEFAULT SYS$DISK:[.SSL]
559 $! Build The [.xxx.EXE.SSL]LIBSSL.OLB Library.
561 $ @SSL-LIB LIBRARY 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" 'ISSEVEN'
563 $! Go Back To The Main Directory.
571 $! Build The "[.xxx.EXE.SSL]SSL_TASK.EXE" Program.
575 $! Tell The User What We Are Doing.
577 $ WRITE SYS$OUTPUT ""
578 $ WRITE SYS$OUTPUT "Building DECNet Based SSL Engine, [.",ARCH,".EXE.SSL]SSL_TASK.EXE"
580 $! Go To The [.SSL] Directory.
582 $ SET DEFAULT SYS$DISK:[.SSL]
584 $! Build The [.xxx.EXE.SSL]SSL_TASK.EXE
586 $ @SSL-LIB SSL_TASK 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" 'ISSEVEN'
588 $! Go Back To The Main Directory.
592 $! That's All, Time To RETURN.
596 $! Build The OpenSSL Test Programs.
600 $! Tell The User What We Are Doing.
602 $ WRITE SYS$OUTPUT ""
603 $ WRITE SYS$OUTPUT "Building The OpenSSL [.",ARCH,".EXE.TEST] Test Utilities."
605 $! Go To The [.TEST] Directory.
607 $ SET DEFAULT SYS$DISK:[.TEST]
609 $! Build The Test Programs.
611 $ @MAKETESTS 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" 'ISSEVEN'
613 $! Go Back To The Main Directory.
617 $! That's All, Time To RETURN.
621 $! Build The OpenSSL Application Programs.
625 $! Tell The User What We Are Doing.
627 $ WRITE SYS$OUTPUT ""
628 $ WRITE SYS$OUTPUT "Building OpenSSL [.",ARCH,".EXE.APPS] Applications."
630 $! Go To The [.APPS] Directory.
632 $ SET DEFAULT SYS$DISK:[.APPS]
634 $! Build The Application Programs.
636 $ @MAKEAPPS 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" 'ISSEVEN'
638 $! Go Back To The Main Directory.
642 $! That's All, Time To RETURN.
646 $! Build The OpenSSL Application Programs.
650 $! Tell The User What We Are Doing.
652 $ WRITE SYS$OUTPUT ""
653 $ WRITE SYS$OUTPUT "Building OpenSSL [.",ARCH,".EXE.ENGINES] Engines."
655 $! Go To The [.ENGINES] Directory.
657 $ SET DEFAULT SYS$DISK:[.ENGINES]
659 $! Build The Application Programs.
661 $ @MAKEENGINES ENGINES 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" 'ISSEVEN' "''BUILDPART'"
663 $! Go Back To The Main Directory.
667 $! That's All, Time To RETURN.
671 $! Check The User's Options.
675 $! Check if there's a "part", and separate it out
677 $ BUILDPART = F$ELEMENT(1,"/",P1)
678 $ IF BUILDPART .EQS. "/"
682 $ P1 = F$EXTRACT(0,F$LENGTH(P1) - F$LENGTH(BUILDPART) - 1, P1)
685 $! Check To See If P1 Is Blank.
690 $! P1 Is ALL, So Build Everything.
692 $ BUILDCOMMAND = "ALL"
698 $! Else, Check To See If P1 Has A Valid Arguement.
700 $ IF (P1.EQS."CONFIG").OR.(P1.EQS."BUILDINF").OR.(P1.EQS."SOFTLINKS") -
701 .OR.(P1.EQS."BUILDALL") -
702 .OR.(P1.EQS."CRYPTO").OR.(P1.EQS."SSL") -
703 .OR.(P1.EQS."SSL_TASK").OR.(P1.EQS."TEST").OR.(P1.EQS."APPS")
706 $! A Valid Arguement.
714 $! Tell The User We Don't Know What They Want.
716 $ WRITE SYS$OUTPUT ""
717 $ WRITE SYS$OUTPUT "The Option ",P1," Is Invalid. The Valid Options Are:"
718 $ WRITE SYS$OUTPUT ""
719 $ WRITE SYS$OUTPUT " ALL : Just Build Everything."
720 $ WRITE SYS$OUTPUT " CONFIG : Just build the [.CRYPTO]OPENSSLCONF.H file."
721 $ WRITE SYS$OUTPUT " BUILDINF : Just build the [.CRYPTO]BUILDINF.H file."
722 $ WRITE SYS$OUTPUT " SOFTLINKS: Just Fix The Unix soft links."
723 $ WRITE SYS$OUTPUT " BUILDALL : Same as ALL, except CONFIG, BUILDINF and SOFTILNKS aren't done."
724 $ WRITE SYS$OUTPUT " CRYPTO : To Build Just The [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library."
725 $ WRITE SYS$OUTPUT " CRYPTO/x : To Build Just The x Part Of The"
726 $ WRITE SYS$OUTPUT " [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library."
727 $ WRITE SYS$OUTPUT " SSL : To Build Just The [.xxx.EXE.SSL]LIBSSL.OLB Library."
728 $ WRITE SYS$OUTPUT " SSL_TASK : To Build Just The [.xxx.EXE.SSL]SSL_TASK.EXE Program."
729 $ WRITE SYS$OUTPUT " TEST : To Build Just The OpenSSL Test Programs."
730 $ WRITE SYS$OUTPUT " APPS : To Build Just The OpenSSL Application Programs."
731 $ WRITE SYS$OUTPUT ""
732 $ WRITE SYS$OUTPUT " Where 'xxx' Stands For:"
733 $ WRITE SYS$OUTPUT ""
734 $ WRITE SYS$OUTPUT " AXP : Alpha Architecture."
735 $ WRITE SYS$OUTPUT " VAX : VAX Architecture."
736 $ WRITE SYS$OUTPUT ""
742 $! End The Valid Argument Check.
750 $! Check To See If P3 Is Blank.
752 $ IF (P3.EQS."NODEBUG")
755 $! P3 Is NODEBUG, So Compile Without Debugger Information.
757 $ DEBUGGER = "NODEBUG"
763 $! Check To See If We Are To Compile With Debugger Information.
765 $ IF (P3.EQS."DEBUG")
768 $! Compile With Debugger Information.
776 $! Tell The User Entered An Invalid Option..
778 $ WRITE SYS$OUTPUT ""
779 $ WRITE SYS$OUTPUT "The Option ",P3," Is Invalid. The Valid Options Are:"
780 $ WRITE SYS$OUTPUT ""
781 $ WRITE SYS$OUTPUT " DEBUG : Compile With The Debugger Information."
782 $ WRITE SYS$OUTPUT " NODEBUG : Compile Without The Debugger Information."
783 $ WRITE SYS$OUTPUT ""
789 $! End The Valid Arguement Check.
797 $! Check To See If P4 Is Blank.
802 $! O.K., The User Didn't Specify A Compiler, Let's Try To
803 $! Find Out Which One To Use.
805 $! Check To See If We Have GNU C.
807 $ IF (F$TRNLNM("GNU_CC").NES."")
810 $! Looks Like GNUC, Set To Use GNUC.
814 $! Tell The User We Are Using GNUC.
816 $ WRITE SYS$OUTPUT "Using GNU 'C' Compiler."
818 $! End The GNU C Compiler Check.
822 $! Check To See If We Have VAXC Or DECC.
824 $ IF (F$GETSYI("CPU").GE.128).OR.(F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC")
827 $! Looks Like DECC, Set To Use DECC.
831 $! Tell The User We Are Using DECC.
833 $ WRITE SYS$OUTPUT "Using DECC 'C' Compiler."
839 $! Looks Like VAXC, Set To Use VAXC.
843 $! Tell The User We Are Using VAX C.
845 $ WRITE SYS$OUTPUT "Using VAXC 'C' Compiler."
847 $! End The DECC & VAXC Compiler Check.
855 $! Check To See If The User Entered A Valid Paramter.
857 $ IF (P4.EQS."VAXC").OR.(P4.EQS."DECC").OR.(P4.EQS."GNUC")!.OR.(P4.EQS."LINK")
860 $! Check To See If The User Wanted To Just LINK.
865 $! Looks Like LINK-only
869 $! Tell The User We Are Only Linking.
871 $ WRITE SYS$OUTPUT "LINK Only. This actually NOT YET SUPPORTED!"
877 $! Check To See If The User Wanted DECC.
882 $! Looks Like DECC, Set To Use DECC.
886 $! Tell The User We Are Using DECC.
888 $ WRITE SYS$OUTPUT "Using DECC 'C' Compiler."
894 $! Check To See If We Are To Use VAXC.
899 $! Looks Like VAXC, Set To Use VAXC.
903 $! Tell The User We Are Using VAX C.
905 $ WRITE SYS$OUTPUT "Using VAXC 'C' Compiler."
911 $! Check To See If We Are To Use GNU C.
916 $! Looks Like GNUC, Set To Use GNUC.
920 $! Tell The User We Are Using GNUC.
922 $ WRITE SYS$OUTPUT "Using GNU 'C' Compiler."
924 $! End The GNU C Check.
928 $! Else The User Entered An Invalid Arguement.
932 $! Tell The User We Don't Know What They Want.
934 $ WRITE SYS$OUTPUT ""
935 $ WRITE SYS$OUTPUT "The Option ",P4," Is Invalid. The Valid Options Are:"
936 $ WRITE SYS$OUTPUT ""
937 $ WRITE SYS$OUTPUT " VAXC : To Compile With VAX C."
938 $ WRITE SYS$OUTPUT " DECC : To Compile With DEC C."
939 $ WRITE SYS$OUTPUT " GNUC : To Compile With GNU C."
940 $ WRITE SYS$OUTPUT ""
946 $! End The Valid Arguement Check.
954 $! Time to check the contents of P5, and to make sure we get the correct library.
956 $ IF P5.EQS."SOCKETSHR" .OR. P5.EQS."MULTINET" .OR. P5.EQS."UCX" -
957 .OR. P5.EQS."TCPIP" .OR. P5.EQS."NONE"
960 $! Check to see if SOCKETSHR was chosen
962 $ IF P5.EQS."SOCKETSHR"
965 $! Set the library to use SOCKETSHR
967 $ TCPIP_LIB = "SYS$DISK:[-.VMS]SOCKETSHR_SHR.OPT/OPT"
971 $ WRITE SYS$OUTPUT "Using SOCKETSHR for TCP/IP"
973 $! Done with SOCKETSHR
977 $! Check to see if MULTINET was chosen
979 $ IF P5.EQS."MULTINET"
982 $! Set the library to use UCX emulation.
988 $ WRITE SYS$OUTPUT "Using MultiNet via UCX emulation for TCP/IP"
990 $! Done with MULTINET
994 $! Check to see if UCX was chosen
999 $! Set the library to use UCX.
1001 $ TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_DECC.OPT/OPT"
1005 $ WRITE SYS$OUTPUT "Using UCX or an emulation thereof for TCP/IP"
1011 $! Check to see if TCPIP was chosen
1016 $! Set the library to use TCPIP (post UCX).
1018 $ TCPIP_LIB = "SYS$DISK:[-.VMS]TCPIP_SHR_DECC.OPT/OPT"
1022 $ WRITE SYS$OUTPUT "Using TCPIP (post UCX) for TCP/IP"
1028 $! Check to see if NONE was chosen
1033 $! Do not use a TCPIP library.
1039 $ WRITE SYS$OUTPUT "A specific TCPIP library will not be used."
1045 $! Set the TCPIP_TYPE symbol
1051 $ WRITE SYS$OUTPUT "TCP/IP library spec: ", TCPIP_LIB
1053 $! Else The User Entered An Invalid Arguement.
1059 $! Tell The User We Don't Know What They Want.
1061 $ WRITE SYS$OUTPUT ""
1062 $ WRITE SYS$OUTPUT "The Option ",P5," Is Invalid. The Valid Options Are:"
1063 $ WRITE SYS$OUTPUT ""
1064 $ WRITE SYS$OUTPUT " SOCKETSHR : To link with SOCKETSHR TCP/IP library."
1065 $ WRITE SYS$OUTPUT " UCX : To link with UCX TCP/IP library."
1066 $ WRITE SYS$OUTPUT " TCPIP : To link with TCPIP TCP/IP (post UCX) library."
1067 $ WRITE SYS$OUTPUT " NONE : To not link with a specific TCP/IP library."
1068 $ WRITE SYS$OUTPUT ""
1075 $! If TCPIP is not defined, then hardcode it to make
1076 $! it clear that no TCPIP is desired.
1081 $ TCPIP_TYPE = "NONE"
1084 $! Set the TCPIP_TYPE symbol
1090 $! Done with TCP/IP libraries
1094 $! Special Threads For OpenVMS v7.1 Or Later
1096 $! Written By: Richard Levitte
1097 $! richard@levitte.org
1100 $! Check To See If We Have A Option For P6.
1105 $! Get The Version Of VMS We Are Using.
1108 $ TMP = F$ELEMENT(0,"-",F$EXTRACT(1,4,F$GETSYI("VERSION")))
1109 $ TMP = F$INTEGER(F$ELEMENT(0,".",TMP)+F$ELEMENT(1,".",TMP))
1111 $! Check To See If The VMS Version Is v7.1 Or Later.
1116 $! We Have OpenVMS v7.1 Or Later, So Use The Special Threads.
1118 $ ISSEVEN := ,PTHREAD_USE_D4
1120 $! End The VMS Version Check.
1124 $! End The P6 Check.
1128 $! Time To RETURN...