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 ALPHA, IA64 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.<ARCH>]OPENSSLCONF.H" file.
21 $! BUILDINF Just build the "[.CRYPTO.<ARCH>]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 $ DEF_ORIG = F$ENVIRONMENT( "DEFAULT")
66 $ ON ERROR THEN GOTO TIDY
67 $ ON CONTROL_C THEN GOTO TIDY
69 $! Check if we're in a batch job, and make sure we get to
70 $! the directory this script is in
72 $ IF F$MODE() .EQS. "BATCH"
74 $ COMNAME=F$ENVIRONMENT("PROCEDURE")
75 $ COMPATH=F$PARSE("A.;",COMNAME) - "A.;"
79 $! Check What Architecture We Are Using.
81 $ IF (F$GETSYI("CPU").LT.128)
84 $! The Architecture Is VAX.
92 $! The Architecture Is Alpha, IA64 or whatever comes in the future.
94 $ ARCH = F$EDIT( F$GETSYI( "ARCH_NAME"), "UPCASE")
95 $ IF (ARCH .EQS. "") THEN ARCH = "UNK"
97 $! End The Architecture Check.
101 $! Check To Make Sure We Have Valid Command Line Parameters.
103 $ GOSUB CHECK_OPTIONS
105 $! Check To See What We Are To Do.
107 $ IF (BUILDCOMMAND.EQS."ALL")
110 $! Start with building the OpenSSL configuration file.
114 $! Create The "BUILDINF.H" Include File.
118 $! Fix The Unix Softlinks.
124 $ IF (BUILDCOMMAND.EQS."ALL".OR.BUILDCOMMAND.EQS."BUILDALL")
127 $! Build The [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library.
131 $! Build The [.xxx.EXE.SSL]LIBSSL.OLB Library.
135 $! Build The [.xxx.EXE.SSL]SSL_TASK.EXE DECNet SSL Engine.
139 $! Build The [.xxx.EXE.TEST] OpenSSL Test Utilities.
143 $! Build The [.xxx.EXE.APPS] OpenSSL Application Utilities.
147 $! Build The [.xxx.EXE.ENGINES] OpenSSL Shareable Engines.
155 $! Build Just What The User Wants Us To Build.
157 $ GOSUB 'BUILDCOMMAND'
165 $! Rebuild The "[.CRYPTO.''ARCH']OPENSSLCONF.H" file.
169 $! Tell The User We Are Creating The [.CRYPTO.<ARCH>]OPENSSLCONF.H File.
171 $ WRITE SYS$OUTPUT "Creating [.CRYPTO.''ARCH']OPENSSLCONF.H Include File."
173 $! First, make sure the directory exists.
175 $ IF F$PARSE("SYS$DISK:[.CRYPTO.''ARCH']") .EQS. "" THEN -
176 CREATE/DIRECTORY SYS$DISK:[.CRYPTO.'ARCH']
178 $! Create The [.CRYPTO.<ARCH>]OPENSSLCONF.H File.
179 $! Make sure it has the right format.
181 $ OSCH_NAME = "SYS$DISK:[.CRYPTO.''ARCH']OPENSSLCONF.H"
182 $ CREATE /FDL=SYS$INPUT: 'OSCH_NAME'
185 $ OPEN /APPEND H_FILE 'OSCH_NAME'
187 $! Write The [.CRYPTO.<ARCH>]OPENSSLCONF.H File.
189 $ WRITE H_FILE "/* This file was automatically built using makevms.com */"
190 $ WRITE H_FILE "/* and [.CRYPTO.''ARCH']OPENSSLCONF.H_IN */"
192 $! Write a few macros that indicate how this system was built.
195 $ WRITE H_FILE "#ifndef OPENSSL_SYS_VMS"
196 $ WRITE H_FILE "# define OPENSSL_SYS_VMS"
197 $ WRITE H_FILE "#endif"
198 $ CONFIG_LOGICALS := NO_ASM,NO_RSA,NO_DSA,NO_DH,NO_MD2,NO_MD5,NO_RIPEMD,WHRLPOOL,-
199 NO_SHA,NO_SHA0,NO_SHA1,NO_DES/NO_MDC2;NO_MDC2,NO_RC2,NO_RC4,NO_RC5,-
200 NO_IDEA,NO_BF,NO_CAST,NO_CAMELLIA,NO_SEED,NO_HMAC,NO_SSL2
203 $ CONFIG_LOG_E1 = F$ELEMENT(CONFIG_LOG_I,",",CONFIG_LOGICALS)
204 $ CONFIG_LOG_I = CONFIG_LOG_I + 1
205 $ IF CONFIG_LOG_E1 .EQS. "" THEN GOTO CONFIG_LOG_LOOP
206 $ IF CONFIG_LOG_E1 .EQS. "," THEN GOTO CONFIG_LOG_LOOP_END
207 $ CONFIG_LOG_E2 = F$EDIT(CONFIG_LOG_E1,"TRIM")
208 $ CONFIG_LOG_E1 = F$ELEMENT(0,";",CONFIG_LOG_E2)
209 $ CONFIG_LOG_E2 = F$ELEMENT(1,";",CONFIG_LOG_E2)
210 $ CONFIG_LOG_E0 = F$ELEMENT(0,"/",CONFIG_LOG_E1)
211 $ CONFIG_LOG_E1 = F$ELEMENT(1,"/",CONFIG_LOG_E1)
212 $ IF F$TRNLNM("OPENSSL_"+CONFIG_LOG_E0)
214 $ WRITE H_FILE "#ifndef OPENSSL_",CONFIG_LOG_E0
215 $ WRITE H_FILE "# define OPENSSL_",CONFIG_LOG_E0
216 $ WRITE H_FILE "#endif"
217 $ IF CONFIG_LOG_E1 .NES. "/"
219 $ WRITE H_FILE "#ifndef OPENSSL_",CONFIG_LOG_E1
220 $ WRITE H_FILE "# define OPENSSL_",CONFIG_LOG_E1
221 $ WRITE H_FILE "#endif"
224 $ IF CONFIG_LOG_E2 .NES. ";"
226 $ IF F$TRNLNM("OPENSSL_"+CONFIG_LOG_E2)
228 $ WRITE H_FILE "#ifndef OPENSSL_",CONFIG_LOG_E2
229 $ WRITE H_FILE "# define OPENSSL_",CONFIG_LOG_E2
230 $ WRITE H_FILE "#endif"
234 $ GOTO CONFIG_LOG_LOOP
235 $ CONFIG_LOG_LOOP_END:
236 $ WRITE H_FILE "#ifndef OPENSSL_NO_STATIC_ENGINE"
237 $ WRITE H_FILE "# define OPENSSL_NO_STATIC_ENGINE"
238 $ WRITE H_FILE "#endif"
239 $ WRITE H_FILE "#ifndef OPENSSL_THREADS"
240 $ WRITE H_FILE "# define OPENSSL_THREADS"
241 $ WRITE H_FILE "#endif"
242 $ WRITE H_FILE "#ifndef OPENSSL_NO_KRB5"
243 $ WRITE H_FILE "# define OPENSSL_NO_KRB5"
244 $ WRITE H_FILE "#endif"
247 $! Different tar version may have named the file differently
248 $ IF F$SEARCH("[.CRYPTO]OPENSSLCONF.H_IN") .NES. ""
250 $ TYPE [.CRYPTO]OPENSSLCONF.H_IN /OUTPUT=H_FILE:
252 $ IF F$SEARCH("[.CRYPTO]OPENSSLCONF_H.IN") .NES. ""
254 $ TYPE [.CRYPTO]OPENSSLCONF_H.IN /OUTPUT=H_FILE:
257 $ IF F$SEARCH("[.CRYPTO]OPENSSLCONF.H.IN") .NES. ""
259 $ TYPE [.CRYPTO]OPENSSLCONF.H.IN /OUTPUT=H_FILE:
261 $ WRITE SYS$ERROR "Couldn't find a [.CRYPTO]OPENSSLCONF.H_IN. Exiting!"
262 $ $STATUS = %X00018294 ! "%RMS-F-FNF, file not found".
267 $ IF ARCH .EQS. "AXP"
270 $! Write the Alpha specific data
272 $ WRITE H_FILE "#if defined(HEADER_RC4_H)"
273 $ WRITE H_FILE "#undef RC4_INT"
274 $ WRITE H_FILE "#define RC4_INT unsigned int"
275 $ WRITE H_FILE "#undef RC4_CHUNK"
276 $ WRITE H_FILE "#define RC4_CHUNK unsigned long long"
277 $ WRITE H_FILE "#endif"
279 $ WRITE H_FILE "#if defined(HEADER_DES_LOCL_H)"
280 $ WRITE H_FILE "#undef DES_LONG"
281 $ WRITE H_FILE "#define DES_LONG unsigned int"
282 $ WRITE H_FILE "#undef DES_PTR"
283 $ WRITE H_FILE "#define DES_PTR"
284 $ WRITE H_FILE "#undef DES_RISC1"
285 $ WRITE H_FILE "#undef DES_RISC2"
286 $ WRITE H_FILE "#define DES_RISC1"
287 $ WRITE H_FILE "#undef DES_UNROLL"
288 $ WRITE H_FILE "#define DES_UNROLL"
289 $ WRITE H_FILE "#endif"
291 $ WRITE H_FILE "#if defined(HEADER_BN_H)"
292 $ WRITE H_FILE "#undef BN_LLONG" ! Never define with SIXTY_FOUR_BIT
293 $ WRITE H_FILE "#undef SIXTY_FOUR_BIT_LONG"
294 $ WRITE H_FILE "#undef SIXTY_FOUR_BIT"
295 $ WRITE H_FILE "#define SIXTY_FOUR_BIT"
296 $ WRITE H_FILE "#undef THIRTY_TWO_BIT"
297 $ WRITE H_FILE "#undef SIXTEEN_BIT"
298 $ WRITE H_FILE "#undef EIGHT_BIT"
299 $ WRITE H_FILE "#endif"
301 $ WRITE H_FILE "#undef OPENSSL_EXPORT_VAR_AS_FUNCTION"
307 $! Write the VAX specific data
309 $ WRITE H_FILE "#if defined(HEADER_RC4_H)"
310 $ WRITE H_FILE "#undef RC4_INT"
311 $ WRITE H_FILE "#define RC4_INT unsigned char"
312 $ WRITE H_FILE "#undef RC4_CHUNK"
313 $ WRITE H_FILE "#define RC4_CHUNK unsigned long"
314 $ WRITE H_FILE "#endif"
316 $ WRITE H_FILE "#if defined(HEADER_DES_LOCL_H)"
317 $ WRITE H_FILE "#undef DES_LONG"
318 $ WRITE H_FILE "#define DES_LONG unsigned long"
319 $ WRITE H_FILE "#undef DES_PTR"
320 $ WRITE H_FILE "#define DES_PTR"
321 $ WRITE H_FILE "#undef DES_RISC1"
322 $ WRITE H_FILE "#undef DES_RISC2"
323 $ WRITE H_FILE "#undef DES_UNROLL"
324 $ WRITE H_FILE "#endif"
326 $ WRITE H_FILE "#if defined(HEADER_BN_H)"
327 $ WRITE H_FILE "#undef BN_LLONG" ! VAX C/DEC C doesn't have long long
328 $ WRITE H_FILE "#undef SIXTY_FOUR_BIT_LONG"
329 $ WRITE H_FILE "#undef SIXTY_FOUR_BIT"
330 $ WRITE H_FILE "#undef THIRTY_TWO_BIT"
331 $ WRITE H_FILE "#define THIRTY_TWO_BIT"
332 $ WRITE H_FILE "#undef SIXTEEN_BIT"
333 $ WRITE H_FILE "#undef EIGHT_BIT"
334 $ WRITE H_FILE "#endif"
336 $! Oddly enough, the following symbol is tested in crypto/sha/sha512.c
337 $! before sha.h gets included (and HEADER_SHA_H defined), so we will not
338 $! protect this one...
339 $ WRITE H_FILE "#undef OPENSSL_NO_SHA512"
340 $ WRITE H_FILE "#define OPENSSL_NO_SHA512"
342 $ WRITE H_FILE "#undef OPENSSL_EXPORT_VAR_AS_FUNCTION"
343 $ WRITE H_FILE "#define OPENSSL_EXPORT_VAR_AS_FUNCTION"
349 $! Close the [.CRYPTO.<ARCH>]OPENSSLCONF.H file
353 $! Purge The [.CRYPTO.<ARCH>]OPENSSLCONF.H file
355 $ PURGE SYS$DISK:[.CRYPTO.'ARCH']OPENSSLCONF.H
357 $! That's All, Time To RETURN.
361 $! Rebuild The "[.CRYPTO.<ARCH>]BUILDINF.H" file.
365 $! Tell The User We Are Creating The [.CRYPTO.<ARCH>]BUILDINF.H File.
367 $ WRITE SYS$OUTPUT "Creating [.CRYPTO.''ARCH']BUILDINF.H Include File."
369 $! Create The [.CRYPTO.<ARCH>]BUILDINF.H File.
371 $ BIH_NAME = "SYS$DISK:[.CRYPTO.''ARCH']BUILDINF.H"
372 $ CREATE /FDL=SYS$INPUT: 'BIH_NAME'
376 $ OPEN /APPEND H_FILE 'bih_name'
378 $! Get The Current Date & Time.
382 $! Write The [.CRYPTO.<ARCH>]BUILDINF.H File.
384 $ WRITE H_FILE "#define CFLAGS """" /* Not filled in for now */"
385 $ WRITE H_FILE "#define PLATFORM ""VMS ''ARCH' ''VMS_VER'"""
386 $ WRITE H_FILE "#define DATE ""''TIME'"" "
388 $! Close The [.CRYPTO.<ARCH>]BUILDINF.H File.
392 $! Purge The [.CRYPTO.<ARCH>]BUILDINF.H File.
394 $ PURGE SYS$DISK:[.CRYPTO.'ARCH']BUILDINF.H
396 $! That's All, Time To RETURN.
400 $! Copy a lot of files around.
404 $! Tell The User We Are Partly Rebuilding The [.APPS] Directory.
406 $ WRITE SYS$OUTPUT "Rebuilding The '[.APPS]MD4.C', '[.APPS]MD5.C' And '[.APPS]RMD160.C' Files."
408 $ DELETE SYS$DISK:[.APPS]MD4.C;*,MD5.C;*,RMD160.C;*
410 $! Copy MD4.C from [.CRYPTO.MD4] into [.APPS]
412 $ COPY SYS$DISK:[.CRYPTO.MD4]MD4.C SYS$DISK:[.APPS]
414 $! Copy MD5.C from [.CRYPTO.MD5] into [.APPS]
416 $ COPY SYS$DISK:[.CRYPTO.MD5]MD5.C SYS$DISK:[.APPS]
418 $! Copy RMD160.C from [.CRYPTO.RIPEMD] into [.APPS]
420 $ COPY SYS$DISK:[.CRYPTO.RIPEMD]RMD160.C SYS$DISK:[.APPS]
422 $! Tell The User We Are Partly Rebuilding The [.TEST] Directory.
424 $ WRITE SYS$OUTPUT "Rebuilding The '[.TEST]*.C' Files."
426 $! First, We Have To "Rebuild" The "[.TEST]" Directory, So Delete
427 $! All The "C" Files That Are Currently There Now.
429 $ DELETE SYS$DISK:[.TEST]*.C;*
430 $ DELETE SYS$DISK:[.TEST]EVPTESTS.TXT;*
432 $! Copy all the *TEST.C files from [.CRYPTO...] into [.TEST]
434 $ COPY SYS$DISK:[.CRYPTO.*]%*TEST.C SYS$DISK:[.TEST]
435 $ COPY SYS$DISK:[.CRYPTO.SHA]SHA%%%T.C SYS$DISK:[.TEST]
436 $ COPY SYS$DISK:[.CRYPTO.EVP]EVPTESTS.TXT SYS$DISK:[.TEST]
438 $! Copy all the *TEST.C files from [.SSL...] into [.TEST]
440 $ COPY SYS$DISK:[.SSL]%*TEST.C SYS$DISK:[.TEST]
442 $! Tell The User We Are Rebuilding The [.INCLUDE.OPENSSL] Directory.
444 $ WRITE SYS$OUTPUT "Rebuilding The '[.INCLUDE.OPENSSL]' Directory."
446 $! First, make sure the directory exists
448 $ IF F$PARSE("SYS$DISK:[.INCLUDE.OPENSSL]") .EQS. "" THEN -
449 CREATE/DIRECTORY SYS$DISK:[.INCLUDE.OPENSSL]
451 $! Copy All The ".H" Files From The Main Directory.
453 $ EXHEADER := e_os2.h
454 $ COPY 'EXHEADER' SYS$DISK:[.INCLUDE.OPENSSL]
456 $! Copy All The ".H" Files From The [.CRYPTO] Directory Tree.
461 MD2,MD4,MD5,SHA,MDC2,HMAC,RIPEMD,WHRLPOOL,-
462 DES,AES,RC2,RC4,RC5,IDEA,BF,CAST,CAMELLIA,SEED,MODES,-
463 BN,EC,RSA,DSA,ECDSA,DH,ECDH,DSO,ENGINE,-
464 BUFFER,BIO,STACK,LHASH,RAND,ERR,-
465 EVP,ASN1,PEM,X509,X509V3,CONF,TXT_DB,PKCS7,PKCS12,COMP,OCSP,UI,KRB5,-
466 STORE,CMS,PQUEUE,TS,JPAKE
467 $ EXHEADER_ := crypto.h,opensslv.h,ebcdic.h,symhacks.h,ossl_typ.h
468 $ EXHEADER_'ARCH' := opensslconf.h
469 $ EXHEADER_OBJECTS := objects.h,obj_mac.h
470 $ EXHEADER_MD2 := md2.h
471 $ EXHEADER_MD4 := md4.h
472 $ EXHEADER_MD5 := md5.h
473 $ EXHEADER_SHA := sha.h
474 $ EXHEADER_MDC2 := mdc2.h
475 $ EXHEADER_HMAC := hmac.h
476 $ EXHEADER_RIPEMD := ripemd.h
477 $ EXHEADER_WHRLPOOL := whrlpool.h
478 $ EXHEADER_DES := des.h,des_old.h
479 $ EXHEADER_AES := aes.h
480 $ EXHEADER_RC2 := rc2.h
481 $ EXHEADER_RC4 := rc4.h
482 $ EXHEADER_RC5 := rc5.h
483 $ EXHEADER_IDEA := idea.h
484 $ EXHEADER_BF := blowfish.h
485 $ EXHEADER_CAST := cast.h
486 $ EXHEADER_CAMELLIA := camellia.h
487 $ EXHEADER_SEED := seed.h
488 $ EXHEADER_MODES := modes.h
489 $ EXHEADER_BN := bn.h
490 $ EXHEADER_EC := ec.h
491 $ EXHEADER_RSA := rsa.h
492 $ EXHEADER_DSA := dsa.h
493 $ EXHEADER_ECDSA := ecdsa.h
494 $ EXHEADER_DH := dh.h
495 $ EXHEADER_ECDH := ecdh.h
496 $ EXHEADER_DSO := dso.h
497 $ EXHEADER_ENGINE := engine.h
498 $ EXHEADER_BUFFER := buffer.h
499 $ EXHEADER_BIO := bio.h
500 $ EXHEADER_STACK := stack.h,safestack.h
501 $ EXHEADER_LHASH := lhash.h
502 $ EXHEADER_RAND := rand.h
503 $ EXHEADER_ERR := err.h
504 $ EXHEADER_EVP := evp.h
505 $ EXHEADER_ASN1 := asn1.h,asn1_mac.h,asn1t.h
506 $ EXHEADER_PEM := pem.h,pem2.h
507 $ EXHEADER_X509 := x509.h,x509_vfy.h
508 $ EXHEADER_X509V3 := x509v3.h
509 $ EXHEADER_CONF := conf.h,conf_api.h
510 $ EXHEADER_TXT_DB := txt_db.h
511 $ EXHEADER_PKCS7 := pkcs7.h
512 $ EXHEADER_PKCS12 := pkcs12.h
513 $ EXHEADER_COMP := comp.h
514 $ EXHEADER_OCSP := ocsp.h
515 $ EXHEADER_UI := ui.h,ui_compat.h
516 $ EXHEADER_KRB5 := krb5_asn.h
517 $!EXHEADER_STORE := store.h,str_compat.h
518 $ EXHEADER_STORE := store.h
519 $ EXHEADER_CMS := cms.h
520 $ EXHEADER_PQUEUE := pqueue.h
521 $ EXHEADER_TS := ts.h
522 $ EXHEADER_JPAKE := jpake.h
526 $ D = F$EDIT(F$ELEMENT(I, ",", SDIRS),"TRIM")
528 $ IF D .EQS. "," THEN GOTO LOOP_SDIRS_END
532 $ COPY [.CRYPTO]'tmp' SYS$DISK:[.INCLUDE.OPENSSL] !/LOG
534 $ COPY [.CRYPTO.'D']'tmp' SYS$DISK:[.INCLUDE.OPENSSL] !/LOG
539 $! Copy All The ".H" Files From The [.SSL] Directory.
541 $ EXHEADER := ssl.h,ssl2.h,ssl3.h,ssl23.h,tls1.h,dtls1.h,kssl.h
542 $ COPY SYS$DISK:[.SSL]'EXHEADER' SYS$DISK:[.INCLUDE.OPENSSL]
546 $ PURGE SYS$DISK:[.INCLUDE.OPENSSL]*.H
548 $! That's All, Time To RETURN.
552 $! Build The "[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB" Library.
556 $! Tell The User What We Are Doing.
558 $ WRITE SYS$OUTPUT ""
559 $ WRITE SYS$OUTPUT "Building The [.",ARCH,".EXE.CRYPTO]LIBCRYPTO.OLB Library."
561 $! Go To The [.CRYPTO] Directory.
563 $ SET DEFAULT SYS$DISK:[.CRYPTO]
565 $! Build The [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library.
567 $ @CRYPTO-LIB LIBRARY 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" "''ISSEVEN'" "''BUILDPART'"
569 $! Build The [.xxx.EXE.CRYPTO]*.EXE Test Applications.
571 $ @CRYPTO-LIB APPS 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" 'ISSEVEN' "''BUILDPART'"
573 $! Go Back To The Main Directory.
581 $! Build The "[.xxx.EXE.SSL]LIBSSL.OLB" Library.
585 $! Tell The User What We Are Doing.
587 $ WRITE SYS$OUTPUT ""
588 $ WRITE SYS$OUTPUT "Building The [.",ARCH,".EXE.SSL]LIBSSL.OLB Library."
590 $! Go To The [.SSL] Directory.
592 $ SET DEFAULT SYS$DISK:[.SSL]
594 $! Build The [.xxx.EXE.SSL]LIBSSL.OLB Library.
596 $ @SSL-LIB LIBRARY 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" 'ISSEVEN'
598 $! Go Back To The Main Directory.
606 $! Build The "[.xxx.EXE.SSL]SSL_TASK.EXE" Program.
610 $! Tell The User What We Are Doing.
612 $ WRITE SYS$OUTPUT ""
613 $ WRITE SYS$OUTPUT "Building DECNet Based SSL Engine, [.",ARCH,".EXE.SSL]SSL_TASK.EXE"
615 $! Go To The [.SSL] Directory.
617 $ SET DEFAULT SYS$DISK:[.SSL]
619 $! Build The [.xxx.EXE.SSL]SSL_TASK.EXE
621 $ @SSL-LIB SSL_TASK 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" 'ISSEVEN'
623 $! Go Back To The Main Directory.
627 $! That's All, Time To RETURN.
631 $! Build The OpenSSL Test Programs.
635 $! Tell The User What We Are Doing.
637 $ WRITE SYS$OUTPUT ""
638 $ WRITE SYS$OUTPUT "Building The OpenSSL [.",ARCH,".EXE.TEST] Test Utilities."
640 $! Go To The [.TEST] Directory.
642 $ SET DEFAULT SYS$DISK:[.TEST]
644 $! Build The Test Programs.
646 $ @MAKETESTS 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" 'ISSEVEN'
648 $! Go Back To The Main Directory.
652 $! That's All, Time To RETURN.
656 $! Build The OpenSSL Application Programs.
660 $! Tell The User What We Are Doing.
662 $ WRITE SYS$OUTPUT ""
663 $ WRITE SYS$OUTPUT "Building OpenSSL [.",ARCH,".EXE.APPS] Applications."
665 $! Go To The [.APPS] Directory.
667 $ SET DEFAULT SYS$DISK:[.APPS]
669 $! Build The Application Programs.
671 $ @MAKEAPPS 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" 'ISSEVEN'
673 $! Go Back To The Main Directory.
677 $! That's All, Time To RETURN.
681 $! Build The OpenSSL Application Programs.
685 $! Tell The User What We Are Doing.
687 $ WRITE SYS$OUTPUT ""
688 $ WRITE SYS$OUTPUT "Building OpenSSL [.",ARCH,".EXE.ENGINES] Engines."
690 $! Go To The [.ENGINES] Directory.
692 $ SET DEFAULT SYS$DISK:[.ENGINES]
694 $! Build The Application Programs.
696 $ @MAKEENGINES ENGINES 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" 'ISSEVEN' "''BUILDPART'"
698 $! Go Back To The Main Directory.
702 $! That's All, Time To RETURN.
706 $! Check The User's Options.
710 $! Check if there's a "part", and separate it out
712 $ BUILDPART = F$ELEMENT(1,"/",P1)
713 $ IF BUILDPART .EQS. "/"
717 $ P1 = F$EXTRACT(0,F$LENGTH(P1) - F$LENGTH(BUILDPART) - 1, P1)
720 $! Check To See If P1 Is Blank.
725 $! P1 Is ALL, So Build Everything.
727 $ BUILDCOMMAND = "ALL"
733 $! Else, Check To See If P1 Has A Valid Arguement.
735 $ IF (P1.EQS."CONFIG").OR.(P1.EQS."BUILDINF").OR.(P1.EQS."SOFTLINKS") -
736 .OR.(P1.EQS."BUILDALL") -
737 .OR.(P1.EQS."CRYPTO").OR.(P1.EQS."SSL") -
738 .OR.(P1.EQS."SSL_TASK").OR.(P1.EQS."TEST").OR.(P1.EQS."APPS")
741 $! A Valid Arguement.
749 $! Tell The User We Don't Know What They Want.
751 $ WRITE SYS$OUTPUT ""
752 $ WRITE SYS$OUTPUT "The Option ",P1," Is Invalid. The Valid Options Are:"
753 $ WRITE SYS$OUTPUT ""
754 $ WRITE SYS$OUTPUT " ALL : Just Build Everything."
755 $ WRITE SYS$OUTPUT " CONFIG : Just build the [.CRYPTO.''ARCH']OPENSSLCONF.H file."
756 $ WRITE SYS$OUTPUT " BUILDINF : Just build the [.CRYPTO.''ARCH']BUILDINF.H file."
757 $ WRITE SYS$OUTPUT " SOFTLINKS: Just Fix The Unix soft links."
758 $ WRITE SYS$OUTPUT " BUILDALL : Same as ALL, except CONFIG, BUILDINF and SOFTILNKS aren't done."
759 $ WRITE SYS$OUTPUT " CRYPTO : To Build Just The [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library."
760 $ WRITE SYS$OUTPUT " CRYPTO/x : To Build Just The x Part Of The"
761 $ WRITE SYS$OUTPUT " [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library."
762 $ WRITE SYS$OUTPUT " SSL : To Build Just The [.xxx.EXE.SSL]LIBSSL.OLB Library."
763 $ WRITE SYS$OUTPUT " SSL_TASK : To Build Just The [.xxx.EXE.SSL]SSL_TASK.EXE Program."
764 $ WRITE SYS$OUTPUT " TEST : To Build Just The OpenSSL Test Programs."
765 $ WRITE SYS$OUTPUT " APPS : To Build Just The OpenSSL Application Programs."
766 $ WRITE SYS$OUTPUT ""
767 $ WRITE SYS$OUTPUT " Where 'xxx' Stands For:"
768 $ WRITE SYS$OUTPUT ""
769 $ WRITE SYS$OUTPUT " ALPHA : Alpha Architecture."
770 $ WRITE SYS$OUTPUT " IA64 : IA64 Architecture."
771 $ WRITE SYS$OUTPUT " VAX : VAX Architecture."
772 $ WRITE SYS$OUTPUT ""
778 $! End The Valid Argument Check.
786 $! Check To See If P3 Is Blank.
788 $ IF (P3.EQS."NODEBUG")
791 $! P3 Is NODEBUG, So Compile Without Debugger Information.
793 $ DEBUGGER = "NODEBUG"
799 $! Check To See If We Are To Compile With Debugger Information.
801 $ IF (P3.EQS."DEBUG")
804 $! Compile With Debugger Information.
812 $! Tell The User Entered An Invalid Option..
814 $ WRITE SYS$OUTPUT ""
815 $ WRITE SYS$OUTPUT "The Option ",P3," Is Invalid. The Valid Options Are:"
816 $ WRITE SYS$OUTPUT ""
817 $ WRITE SYS$OUTPUT " DEBUG : Compile With The Debugger Information."
818 $ WRITE SYS$OUTPUT " NODEBUG : Compile Without The Debugger Information."
819 $ WRITE SYS$OUTPUT ""
825 $! End The Valid Arguement Check.
833 $! Check To See If P4 Is Blank.
838 $! O.K., The User Didn't Specify A Compiler, Let's Try To
839 $! Find Out Which One To Use.
841 $! Check To See If We Have GNU C.
843 $ IF (F$TRNLNM("GNU_CC").NES."")
846 $! Looks Like GNUC, Set To Use GNUC.
850 $! Tell The User We Are Using GNUC.
852 $ WRITE SYS$OUTPUT "Using GNU 'C' Compiler."
854 $! End The GNU C Compiler Check.
858 $! Check To See If We Have VAXC Or DECC.
860 $ IF (F$GETSYI("CPU").GE.128).OR.(F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC")
863 $! Looks Like DECC, Set To Use DECC.
867 $! Tell The User We Are Using DECC.
869 $ WRITE SYS$OUTPUT "Using DECC 'C' Compiler."
875 $! Looks Like VAXC, Set To Use VAXC.
879 $! Tell The User We Are Using VAX C.
881 $ WRITE SYS$OUTPUT "Using VAXC 'C' Compiler."
883 $! End The DECC & VAXC Compiler Check.
891 $! Check To See If The User Entered A Valid Paramter.
893 $ IF (P4.EQS."VAXC").OR.(P4.EQS."DECC").OR.(P4.EQS."GNUC")!.OR.(P4.EQS."LINK")
896 $! Check To See If The User Wanted To Just LINK.
901 $! Looks Like LINK-only
905 $! Tell The User We Are Only Linking.
907 $ WRITE SYS$OUTPUT "LINK Only. This actually NOT YET SUPPORTED!"
913 $! Check To See If The User Wanted DECC.
918 $! Looks Like DECC, Set To Use DECC.
922 $! Tell The User We Are Using DECC.
924 $ WRITE SYS$OUTPUT "Using DECC 'C' Compiler."
930 $! Check To See If We Are To Use VAXC.
935 $! Looks Like VAXC, Set To Use VAXC.
939 $! Tell The User We Are Using VAX C.
941 $ WRITE SYS$OUTPUT "Using VAXC 'C' Compiler."
947 $! Check To See If We Are To Use GNU C.
952 $! Looks Like GNUC, Set To Use GNUC.
956 $! Tell The User We Are Using GNUC.
958 $ WRITE SYS$OUTPUT "Using GNU 'C' Compiler."
960 $! End The GNU C Check.
964 $! Else The User Entered An Invalid Arguement.
968 $! Tell The User We Don't Know What They Want.
970 $ WRITE SYS$OUTPUT ""
971 $ WRITE SYS$OUTPUT "The Option ",P4," Is Invalid. The Valid Options Are:"
972 $ WRITE SYS$OUTPUT ""
973 $ WRITE SYS$OUTPUT " VAXC : To Compile With VAX C."
974 $ WRITE SYS$OUTPUT " DECC : To Compile With DEC C."
975 $ WRITE SYS$OUTPUT " GNUC : To Compile With GNU C."
976 $ WRITE SYS$OUTPUT ""
982 $! End The Valid Arguement Check.
990 $! Time to check the contents of P5, and to make sure we get the correct library.
992 $ IF P5.EQS."SOCKETSHR" .OR. P5.EQS."MULTINET" .OR. P5.EQS."UCX" -
993 .OR. P5.EQS."TCPIP" .OR. P5.EQS."NONE"
996 $! Check to see if SOCKETSHR was chosen
998 $ IF P5.EQS."SOCKETSHR"
1001 $! Set the library to use SOCKETSHR
1003 $ TCPIP_LIB = "SYS$DISK:[-.VMS]SOCKETSHR_SHR.OPT/OPT"
1007 $ WRITE SYS$OUTPUT "Using SOCKETSHR for TCP/IP"
1009 $! Done with SOCKETSHR
1013 $! Check to see if MULTINET was chosen
1015 $ IF P5.EQS."MULTINET"
1018 $! Set the library to use UCX emulation.
1024 $ WRITE SYS$OUTPUT "Using MultiNet via UCX emulation for TCP/IP"
1026 $! Done with MULTINET
1030 $! Check to see if UCX was chosen
1035 $! Set the library to use UCX.
1037 $ TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_DECC.OPT/OPT"
1041 $ WRITE SYS$OUTPUT "Using UCX or an emulation thereof for TCP/IP"
1047 $! Check to see if TCPIP was chosen
1052 $! Set the library to use TCPIP (post UCX).
1054 $ TCPIP_LIB = "SYS$DISK:[-.VMS]TCPIP_SHR_DECC.OPT/OPT"
1058 $ WRITE SYS$OUTPUT "Using TCPIP (post UCX) for TCP/IP"
1064 $! Check to see if NONE was chosen
1069 $! Do not use a TCPIP library.
1075 $ WRITE SYS$OUTPUT "A specific TCPIP library will not be used."
1081 $! Set the TCPIP_TYPE symbol
1087 $ WRITE SYS$OUTPUT "TCP/IP library spec: ", TCPIP_LIB
1089 $! Else The User Entered An Invalid Arguement.
1095 $! Tell The User We Don't Know What They Want.
1097 $ WRITE SYS$OUTPUT ""
1098 $ WRITE SYS$OUTPUT "The Option ",P5," Is Invalid. The Valid Options Are:"
1099 $ WRITE SYS$OUTPUT ""
1100 $ WRITE SYS$OUTPUT " SOCKETSHR : To link with SOCKETSHR TCP/IP library."
1101 $ WRITE SYS$OUTPUT " UCX : To link with UCX TCP/IP library."
1102 $ WRITE SYS$OUTPUT " TCPIP : To link with TCPIP TCP/IP (post UCX) library."
1103 $ WRITE SYS$OUTPUT " NONE : To not link with a specific TCP/IP library."
1104 $ WRITE SYS$OUTPUT ""
1111 $! If TCPIP is not defined, then hardcode it to make
1112 $! it clear that no TCPIP is desired.
1117 $ TCPIP_TYPE = "NONE"
1120 $! Set the TCPIP_TYPE symbol
1126 $! Done with TCP/IP libraries
1130 $! Special Threads For OpenVMS v7.1 Or Later
1132 $! Written By: Richard Levitte
1133 $! richard@levitte.org
1136 $! Check To See If We Have A Option For P6.
1141 $! Get The Version Of VMS We Are Using.
1144 $ TMP = F$ELEMENT(0,"-",F$EXTRACT(1,4,F$GETSYI("VERSION")))
1145 $ TMP = F$INTEGER(F$ELEMENT(0,".",TMP)+F$ELEMENT(1,".",TMP))
1147 $! Check To See If The VMS Version Is v7.1 Or Later.
1152 $! We Have OpenVMS v7.1 Or Later, So Use The Special Threads.
1154 $ ISSEVEN := ,PTHREAD_USE_D4
1156 $! End The VMS Version Check.
1160 $! End The P6 Check.
1164 $! Time To RETURN...
1169 $ SET DEFAULT 'DEF_ORIG'