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>
10 $! Zoltan Arpadffy <zoli@polarhome.com>
12 $! This procedure creates the SSL libraries of "[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB"
13 $! "[.xxx.EXE.SSL]LIBSSL.OLB"
14 $! The "xxx" denotes the machine architecture of ALPHA, IA64 or VAX.
16 $! This procedures accepts two command line options listed below.
18 $! Specify one of the following build options for P1.
20 $! ALL Just build "everything".
21 $! CONFIG Just build the "[.xxx.CRYPTO]OPENSSLCONF.H" file.
22 $! BUILDINF Just build the "[.xxx.CRYPTO]BUILDINF.H" file.
23 $! SOFTLINKS Just fix the Unix soft links.
24 $! BUILDALL Same as ALL, except CONFIG, BUILDINF and SOFTILNKS aren't done.
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.
32 $! ENGINES Just build the "[.xxx.EXE.ENGINES]" application programs for OpenSSL.
35 $! P2 is ignored (it was used to denote if RSAref should be used or not,
36 $! and is simply kept so surrounding scripts don't get confused)
38 $! Speficy DEBUG or NODEBUG as P3 to compile with or without debugging
41 $! Specify which compiler as P4 to try to compile under.
46 $! LINK To only link the programs from existing object files.
47 $! (not yet implemented)
49 $! If you don't speficy a compiler, it will try to determine which
50 $! "C" compiler to use.
52 $! P5, if defined, sets a TCP/IP library to use, through one of the following
55 $! UCX for UCX or UCX emulation
56 $! TCPIP for TCP/IP Services or TCP/IP Services emulation
57 $! (this is prefered over UCX)
58 $! SOCKETSHR for SOCKETSHR+NETLIB
59 $! NONE to avoid specifying which TCP/IP implementation to
60 $! use at build time (this works with DEC C). This is
63 $! P6, if defined, sets a compiler thread NOT needed on OpenVMS 7.1 (and up)
66 $ DEF_ORIG = F$ENVIRONMENT( "DEFAULT")
67 $ ON ERROR THEN GOTO TIDY
68 $ ON CONTROL_C THEN GOTO TIDY
70 $! Check if we're in a batch job, and make sure we get to
71 $! the directory this script is in
73 $ IF F$MODE() .EQS. "BATCH"
75 $ COMNAME=F$ENVIRONMENT("PROCEDURE")
76 $ COMPATH=F$PARSE("A.;",COMNAME) - "A.;"
80 $! Check What Architecture We Are Using.
82 $ IF (F$GETSYI("CPU").LT.128)
85 $! The Architecture Is VAX.
93 $! The Architecture Is Alpha, IA64 or whatever comes in the future.
95 $ ARCH = F$EDIT( F$GETSYI( "ARCH_NAME"), "UPCASE")
96 $ IF (ARCH .EQS. "") THEN ARCH = "UNK"
98 $! End The Architecture Check.
102 $! Check To Make Sure We Have Valid Command Line Parameters.
104 $ GOSUB CHECK_OPTIONS
106 $! Check To See What We Are To Do.
108 $ IF (BUILDCOMMAND.EQS."ALL")
111 $! Start with building the OpenSSL configuration file.
115 $! Create The "BUILDINF.H" Include File.
119 $! Fix The Unix Softlinks.
125 $ IF (BUILDCOMMAND.EQS."ALL".OR.BUILDCOMMAND.EQS."BUILDALL")
128 $! Build The [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library.
132 $! Build The [.xxx.EXE.SSL]LIBSSL.OLB Library.
136 $! Build The [.xxx.EXE.SSL]SSL_TASK.EXE DECNet SSL Engine.
140 $! Build The [.xxx.EXE.TEST] OpenSSL Test Utilities.
144 $! Build The [.xxx.EXE.APPS] OpenSSL Application Utilities.
148 $! Build The [.xxx.EXE.ENGINES] OpenSSL Shareable Engines.
156 $! Build Just What The User Wants Us To Build.
158 $ GOSUB 'BUILDCOMMAND'
166 $! Rebuild The [.xxx.CRYPTO]OPENSSLCONF.H" file.
170 $! Tell The User We Are Creating The [.xxx.CRYPTO]OPENSSLCONF.H File.
172 $ WRITE SYS$OUTPUT "Creating [.''ARCH'.CRYPTO]OPENSSLCONF.H Include File."
174 $! First, make sure the directory exists.
176 $ IF F$PARSE("SYS$DISK:[.''ARCH'.CRYPTO]") .EQS. "" THEN -
177 CREATE/DIRECTORY SYS$DISK:[.'ARCH'.CRYPTO]
179 $! Create The [.xxx.CRYPTO]OPENSSLCONF.H File.
180 $! Make sure it has the right format.
182 $ OSCH_NAME = "SYS$DISK:[.''ARCH'.CRYPTO]OPENSSLCONF.H"
183 $ CREATE /FDL=SYS$INPUT: 'OSCH_NAME'
186 $ OPEN /APPEND H_FILE 'OSCH_NAME'
188 $! Write The [.xxx.CRYPTO]OPENSSLCONF.H File.
190 $ WRITE H_FILE "/* This file was automatically built using makevms.com */"
191 $ WRITE H_FILE "/* and [.''ARCH'.CRYPTO]OPENSSLCONF.H_IN */"
193 $! Write a few macros that indicate how this system was built.
196 $ WRITE H_FILE "#ifndef OPENSSL_SYS_VMS"
197 $ WRITE H_FILE "# define OPENSSL_SYS_VMS"
198 $ WRITE H_FILE "#endif"
199 $ CONFIG_LOGICALS := NO_ASM,NO_RSA,NO_DSA,NO_DH,NO_MD2,NO_MD5,NO_RIPEMD,WHRLPOOL,-
200 NO_SHA,NO_SHA0,NO_SHA1,NO_DES/NO_MDC2;NO_MDC2,NO_RC2,NO_RC4,NO_RC5,-
201 NO_IDEA,NO_BF,NO_CAST,NO_CAMELLIA,NO_SEED,NO_HMAC,NO_SSL2
204 $ CONFIG_LOG_E1 = F$ELEMENT(CONFIG_LOG_I,",",CONFIG_LOGICALS)
205 $ CONFIG_LOG_I = CONFIG_LOG_I + 1
206 $ IF CONFIG_LOG_E1 .EQS. "" THEN GOTO CONFIG_LOG_LOOP
207 $ IF CONFIG_LOG_E1 .EQS. "," THEN GOTO CONFIG_LOG_LOOP_END
208 $ CONFIG_LOG_E2 = F$EDIT(CONFIG_LOG_E1,"TRIM")
209 $ CONFIG_LOG_E1 = F$ELEMENT(0,";",CONFIG_LOG_E2)
210 $ CONFIG_LOG_E2 = F$ELEMENT(1,";",CONFIG_LOG_E2)
211 $ CONFIG_LOG_E0 = F$ELEMENT(0,"/",CONFIG_LOG_E1)
212 $ CONFIG_LOG_E1 = F$ELEMENT(1,"/",CONFIG_LOG_E1)
213 $ IF F$TRNLNM("OPENSSL_"+CONFIG_LOG_E0)
215 $ WRITE H_FILE "#ifndef OPENSSL_",CONFIG_LOG_E0
216 $ WRITE H_FILE "# define OPENSSL_",CONFIG_LOG_E0
217 $ WRITE H_FILE "#endif"
218 $ IF CONFIG_LOG_E1 .NES. "/"
220 $ WRITE H_FILE "#ifndef OPENSSL_",CONFIG_LOG_E1
221 $ WRITE H_FILE "# define OPENSSL_",CONFIG_LOG_E1
222 $ WRITE H_FILE "#endif"
225 $ IF CONFIG_LOG_E2 .NES. ";"
227 $ IF F$TRNLNM("OPENSSL_"+CONFIG_LOG_E2)
229 $ WRITE H_FILE "#ifndef OPENSSL_",CONFIG_LOG_E2
230 $ WRITE H_FILE "# define OPENSSL_",CONFIG_LOG_E2
231 $ WRITE H_FILE "#endif"
235 $ GOTO CONFIG_LOG_LOOP
236 $ CONFIG_LOG_LOOP_END:
237 $ WRITE H_FILE "#ifndef OPENSSL_NO_STATIC_ENGINE"
238 $ WRITE H_FILE "# define OPENSSL_NO_STATIC_ENGINE"
239 $ WRITE H_FILE "#endif"
240 $ WRITE H_FILE "#ifndef OPENSSL_THREADS"
241 $ WRITE H_FILE "# define OPENSSL_THREADS"
242 $ WRITE H_FILE "#endif"
243 $ WRITE H_FILE "#ifndef OPENSSL_NO_KRB5"
244 $ WRITE H_FILE "# define OPENSSL_NO_KRB5"
245 $ WRITE H_FILE "#endif"
248 $! Different tar version may have named the file differently
249 $ IF F$SEARCH("[.CRYPTO]OPENSSLCONF.H_IN") .NES. ""
251 $ TYPE [.CRYPTO]OPENSSLCONF.H_IN /OUTPUT=H_FILE:
253 $ IF F$SEARCH("[.CRYPTO]OPENSSLCONF_H.IN") .NES. ""
255 $ TYPE [.CRYPTO]OPENSSLCONF_H.IN /OUTPUT=H_FILE:
258 $ IF F$SEARCH("[.CRYPTO]OPENSSLCONF.H.IN") .NES. ""
260 $ TYPE [.CRYPTO]OPENSSLCONF.H.IN /OUTPUT=H_FILE:
262 $ WRITE SYS$ERROR "Couldn't find a [.CRYPTO]OPENSSLCONF.H_IN. Exiting!"
263 $ $STATUS = %X00018294 ! "%RMS-F-FNF, file not found".
268 $ IF ARCH .NES. "VAX"
271 $! Write the non-VAX specific data
273 $ WRITE H_FILE "#if defined(HEADER_RC4_H)"
274 $ WRITE H_FILE "#undef RC4_INT"
275 $ WRITE H_FILE "#define RC4_INT unsigned int"
276 $ WRITE H_FILE "#undef RC4_CHUNK"
277 $ WRITE H_FILE "#define RC4_CHUNK unsigned long long"
278 $ WRITE H_FILE "#endif"
280 $ WRITE H_FILE "#if defined(HEADER_DES_LOCL_H)"
281 $ WRITE H_FILE "#undef DES_LONG"
282 $ WRITE H_FILE "#define DES_LONG unsigned int"
283 $ WRITE H_FILE "#undef DES_PTR"
284 $ WRITE H_FILE "#define DES_PTR"
285 $ WRITE H_FILE "#undef DES_RISC1"
286 $ WRITE H_FILE "#undef DES_RISC2"
287 $ WRITE H_FILE "#define DES_RISC1"
288 $ WRITE H_FILE "#undef DES_UNROLL"
289 $ WRITE H_FILE "#define DES_UNROLL"
290 $ WRITE H_FILE "#endif"
292 $ WRITE H_FILE "#if defined(HEADER_BN_H)"
293 $ WRITE H_FILE "#undef BN_LLONG" ! Never define with SIXTY_FOUR_BIT
294 $ WRITE H_FILE "#undef SIXTY_FOUR_BIT_LONG"
295 $ WRITE H_FILE "#undef SIXTY_FOUR_BIT"
296 $ WRITE H_FILE "#define SIXTY_FOUR_BIT"
297 $ WRITE H_FILE "#undef THIRTY_TWO_BIT"
298 $ WRITE H_FILE "#undef SIXTEEN_BIT"
299 $ WRITE H_FILE "#undef EIGHT_BIT"
300 $ WRITE H_FILE "#endif"
302 $ WRITE H_FILE "#undef OPENSSL_EXPORT_VAR_AS_FUNCTION"
308 $! Write the VAX specific data
310 $ WRITE H_FILE "#if defined(HEADER_RC4_H)"
311 $ WRITE H_FILE "#undef RC4_INT"
312 $ WRITE H_FILE "#define RC4_INT unsigned char"
313 $ WRITE H_FILE "#undef RC4_CHUNK"
314 $ WRITE H_FILE "#define RC4_CHUNK unsigned long"
315 $ WRITE H_FILE "#endif"
317 $ WRITE H_FILE "#if defined(HEADER_DES_LOCL_H)"
318 $ WRITE H_FILE "#undef DES_LONG"
319 $ WRITE H_FILE "#define DES_LONG unsigned long"
320 $ WRITE H_FILE "#undef DES_PTR"
321 $ WRITE H_FILE "#define DES_PTR"
322 $ WRITE H_FILE "#undef DES_RISC1"
323 $ WRITE H_FILE "#undef DES_RISC2"
324 $ WRITE H_FILE "#undef DES_UNROLL"
325 $ WRITE H_FILE "#endif"
327 $ WRITE H_FILE "#if defined(HEADER_BN_H)"
328 $ WRITE H_FILE "#undef BN_LLONG" ! VAX C/DEC C doesn't have long long
329 $ WRITE H_FILE "#undef SIXTY_FOUR_BIT_LONG"
330 $ WRITE H_FILE "#undef SIXTY_FOUR_BIT"
331 $ WRITE H_FILE "#undef THIRTY_TWO_BIT"
332 $ WRITE H_FILE "#define THIRTY_TWO_BIT"
333 $ WRITE H_FILE "#undef SIXTEEN_BIT"
334 $ WRITE H_FILE "#undef EIGHT_BIT"
335 $ WRITE H_FILE "#endif"
337 $! Oddly enough, the following symbol is tested in crypto/sha/sha512.c
338 $! before sha.h gets included (and HEADER_SHA_H defined), so we will not
339 $! protect this one...
340 $ WRITE H_FILE "#undef OPENSSL_NO_SHA512"
341 $ WRITE H_FILE "#define OPENSSL_NO_SHA512"
343 $ WRITE H_FILE "#undef OPENSSL_EXPORT_VAR_AS_FUNCTION"
344 $ WRITE H_FILE "#define OPENSSL_EXPORT_VAR_AS_FUNCTION"
350 $! Close the [.xxx.CRYPTO]OPENSSLCONF.H file
354 $! Purge The [.xxx.CRYPTO]OPENSSLCONF.H file
356 $ PURGE SYS$DISK:[.'ARCH'.CRYPTO]OPENSSLCONF.H
358 $! That's All, Time To RETURN.
362 $! Rebuild The "[.xxx.CRYPTO]BUILDINF.H" file.
366 $! Tell The User We Are Creating The [.xxx.CRYPTO]BUILDINF.H File.
368 $ WRITE SYS$OUTPUT "Creating [.''ARCH'.CRYPTO]BUILDINF.H Include File."
370 $! Create The [.xxx.CRYPTO]BUILDINF.H File.
372 $ BIH_NAME = "SYS$DISK:[.''ARCH'.CRYPTO]BUILDINF.H"
373 $ CREATE /FDL=SYS$INPUT: 'BIH_NAME'
377 $ OPEN /APPEND H_FILE 'bih_name'
379 $! Get The Current Date & Time.
383 $! Write The [.xxx.CRYPTO]BUILDINF.H File.
385 $ WRITE H_FILE "#define CFLAGS """" /* Not filled in for now */"
386 $ WRITE H_FILE "#define PLATFORM ""VMS ''ARCH' ''VMS_VER'"""
387 $ WRITE H_FILE "#define DATE ""''TIME'"" "
389 $! Close The [.xxx.CRYPTO]BUILDINF.H File.
393 $! Purge The [.xxx.CRYPTO]BUILDINF.H File.
395 $ PURGE SYS$DISK:[.'ARCH'.CRYPTO]BUILDINF.H
397 $! That's All, Time To RETURN.
401 $! Copy a lot of files around.
405 $! Tell The User We Are Partly Rebuilding The [.APPS] Directory.
407 $ WRITE SYS$OUTPUT "Rebuilding The '[.APPS]MD4.C', '[.APPS]MD5.C' And '[.APPS]RMD160.C' Files."
409 $ DELETE SYS$DISK:[.APPS]MD4.C;*,MD5.C;*,RMD160.C;*
411 $! Copy MD4.C from [.CRYPTO.MD4] into [.APPS]
413 $ COPY SYS$DISK:[.CRYPTO.MD4]MD4.C SYS$DISK:[.APPS]
415 $! Copy MD5.C from [.CRYPTO.MD5] into [.APPS]
417 $ COPY SYS$DISK:[.CRYPTO.MD5]MD5.C SYS$DISK:[.APPS]
419 $! Copy RMD160.C from [.CRYPTO.RIPEMD] into [.APPS]
421 $ COPY SYS$DISK:[.CRYPTO.RIPEMD]RMD160.C SYS$DISK:[.APPS]
423 $! Tell The User We Are Partly Rebuilding The [.TEST] Directory.
425 $ WRITE SYS$OUTPUT "Rebuilding The '[.TEST]*.C' Files."
427 $! First, We Have To "Rebuild" The "[.TEST]" Directory, So Delete
428 $! All The "C" Files That Are Currently There Now.
430 $ DELETE SYS$DISK:[.TEST]*.C;*
431 $ DELETE SYS$DISK:[.TEST]EVPTESTS.TXT;*
433 $! Copy all the *TEST.C files from [.CRYPTO...] into [.TEST]
435 $ COPY SYS$DISK:[.CRYPTO.*]%*TEST.C SYS$DISK:[.TEST]
436 $ COPY SYS$DISK:[.CRYPTO.SHA]SHA%%%T.C SYS$DISK:[.TEST]
437 $ COPY SYS$DISK:[.CRYPTO.EVP]EVPTESTS.TXT SYS$DISK:[.TEST]
439 $! Copy all the *TEST.C files from [.SSL...] into [.TEST]
441 $ COPY SYS$DISK:[.SSL]%*TEST.C SYS$DISK:[.TEST]
443 $! Tell The User We Are Rebuilding The [.INCLUDE.OPENSSL] Directory.
445 $ WRITE SYS$OUTPUT "Rebuilding The '[.INCLUDE.OPENSSL]' Directory."
447 $! First, make sure the directory exists
449 $ IF F$PARSE("SYS$DISK:[.INCLUDE.OPENSSL]") .EQS. "" THEN -
450 CREATE/DIRECTORY SYS$DISK:[.INCLUDE.OPENSSL]
452 $! Copy All The ".H" Files From The Main Directory.
454 $ EXHEADER := e_os2.h
455 $ COPY 'EXHEADER' SYS$DISK:[.INCLUDE.OPENSSL]
457 $! Copy All The ".H" Files From The [.CRYPTO] Directory Tree.
462 MD2,MD4,MD5,SHA,MDC2,HMAC,RIPEMD,WHRLPOOL,-
463 DES,AES,RC2,RC4,RC5,IDEA,BF,CAST,CAMELLIA,SEED,MODES,-
464 BN,EC,RSA,DSA,ECDSA,DH,ECDH,DSO,ENGINE,-
465 BUFFER,BIO,STACK,LHASH,RAND,ERR,-
466 EVP,ASN1,PEM,X509,X509V3,CONF,TXT_DB,PKCS7,PKCS12,COMP,OCSP,UI,KRB5,-
467 STORE,CMS,PQUEUE,TS,JPAKE
468 $ EXHEADER_ := crypto.h,opensslv.h,ebcdic.h,symhacks.h,ossl_typ.h
469 $ EXHEADER__'ARCH' := opensslconf.h
470 $ EXHEADER_OBJECTS := objects.h,obj_mac.h
471 $ EXHEADER_MD2 := md2.h
472 $ EXHEADER_MD4 := md4.h
473 $ EXHEADER_MD5 := md5.h
474 $ EXHEADER_SHA := sha.h
475 $ EXHEADER_MDC2 := mdc2.h
476 $ EXHEADER_HMAC := hmac.h
477 $ EXHEADER_RIPEMD := ripemd.h
478 $ EXHEADER_WHRLPOOL := whrlpool.h
479 $ EXHEADER_DES := des.h,des_old.h
480 $ EXHEADER_AES := aes.h
481 $ EXHEADER_RC2 := rc2.h
482 $ EXHEADER_RC4 := rc4.h
483 $ EXHEADER_RC5 := rc5.h
484 $ EXHEADER_IDEA := idea.h
485 $ EXHEADER_BF := blowfish.h
486 $ EXHEADER_CAST := cast.h
487 $ EXHEADER_CAMELLIA := camellia.h
488 $ EXHEADER_SEED := seed.h
489 $ EXHEADER_MODES := modes.h
490 $ EXHEADER_BN := bn.h
491 $ EXHEADER_EC := ec.h
492 $ EXHEADER_RSA := rsa.h
493 $ EXHEADER_DSA := dsa.h
494 $ EXHEADER_ECDSA := ecdsa.h
495 $ EXHEADER_DH := dh.h
496 $ EXHEADER_ECDH := ecdh.h
497 $ EXHEADER_DSO := dso.h
498 $ EXHEADER_ENGINE := engine.h
499 $ EXHEADER_BUFFER := buffer.h
500 $ EXHEADER_BIO := bio.h
501 $ EXHEADER_STACK := stack.h,safestack.h
502 $ EXHEADER_LHASH := lhash.h
503 $ EXHEADER_RAND := rand.h
504 $ EXHEADER_ERR := err.h
505 $ EXHEADER_EVP := evp.h
506 $ EXHEADER_ASN1 := asn1.h,asn1_mac.h,asn1t.h
507 $ EXHEADER_PEM := pem.h,pem2.h
508 $ EXHEADER_X509 := x509.h,x509_vfy.h
509 $ EXHEADER_X509V3 := x509v3.h
510 $ EXHEADER_CONF := conf.h,conf_api.h
511 $ EXHEADER_TXT_DB := txt_db.h
512 $ EXHEADER_PKCS7 := pkcs7.h
513 $ EXHEADER_PKCS12 := pkcs12.h
514 $ EXHEADER_COMP := comp.h
515 $ EXHEADER_OCSP := ocsp.h
516 $ EXHEADER_UI := ui.h,ui_compat.h
517 $ EXHEADER_KRB5 := krb5_asn.h
518 $!EXHEADER_STORE := store.h,str_compat.h
519 $ EXHEADER_STORE := store.h
520 $ EXHEADER_CMS := cms.h
521 $ EXHEADER_PQUEUE := pqueue.h
522 $ EXHEADER_TS := ts.h
523 $ EXHEADER_JPAKE := jpake.h
527 $ D = F$EDIT(F$ELEMENT(I, ",", SDIRS),"TRIM")
529 $ IF D .EQS. "," THEN GOTO LOOP_SDIRS_END
533 $ COPY [.CRYPTO]'tmp' SYS$DISK:[.INCLUDE.OPENSSL] !/LOG
535 $ IF D .EQS. "_''ARCH'"
537 $ COPY [.'ARCH'.CRYPTO]'tmp' SYS$DISK:[.INCLUDE.OPENSSL] !/LOG
539 $ COPY [.CRYPTO.'D']'tmp' SYS$DISK:[.INCLUDE.OPENSSL] !/LOG
545 $! Copy All The ".H" Files From The [.SSL] Directory.
547 $ EXHEADER := ssl.h,ssl2.h,ssl3.h,ssl23.h,tls1.h,dtls1.h,kssl.h
548 $ COPY SYS$DISK:[.SSL]'EXHEADER' SYS$DISK:[.INCLUDE.OPENSSL]
552 $ PURGE SYS$DISK:[.INCLUDE.OPENSSL]*.H
554 $! That's All, Time To RETURN.
558 $! Build The "[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB" Library.
562 $! Tell The User What We Are Doing.
564 $ WRITE SYS$OUTPUT ""
565 $ WRITE SYS$OUTPUT "Building The [.",ARCH,".EXE.CRYPTO]LIBCRYPTO.OLB Library."
567 $! Go To The [.CRYPTO] Directory.
569 $ SET DEFAULT SYS$DISK:[.CRYPTO]
571 $! Build The [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library.
573 $ @CRYPTO-LIB LIBRARY 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" "''ISSEVEN'" "''BUILDPART'"
575 $! Build The [.xxx.EXE.CRYPTO]*.EXE Test Applications.
577 $ @CRYPTO-LIB APPS 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" 'ISSEVEN' "''BUILDPART'"
579 $! Go Back To The Main Directory.
587 $! Build The "[.xxx.EXE.SSL]LIBSSL.OLB" Library.
591 $! Tell The User What We Are Doing.
593 $ WRITE SYS$OUTPUT ""
594 $ WRITE SYS$OUTPUT "Building The [.",ARCH,".EXE.SSL]LIBSSL.OLB Library."
596 $! Go To The [.SSL] Directory.
598 $ SET DEFAULT SYS$DISK:[.SSL]
600 $! Build The [.xxx.EXE.SSL]LIBSSL.OLB Library.
602 $ @SSL-LIB LIBRARY 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" 'ISSEVEN'
604 $! Go Back To The Main Directory.
612 $! Build The "[.xxx.EXE.SSL]SSL_TASK.EXE" Program.
616 $! Tell The User What We Are Doing.
618 $ WRITE SYS$OUTPUT ""
619 $ WRITE SYS$OUTPUT "Building DECNet Based SSL Engine, [.",ARCH,".EXE.SSL]SSL_TASK.EXE"
621 $! Go To The [.SSL] Directory.
623 $ SET DEFAULT SYS$DISK:[.SSL]
625 $! Build The [.xxx.EXE.SSL]SSL_TASK.EXE
627 $ @SSL-LIB SSL_TASK 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" 'ISSEVEN'
629 $! Go Back To The Main Directory.
633 $! That's All, Time To RETURN.
637 $! Build The OpenSSL Test Programs.
641 $! Tell The User What We Are Doing.
643 $ WRITE SYS$OUTPUT ""
644 $ WRITE SYS$OUTPUT "Building The OpenSSL [.",ARCH,".EXE.TEST] Test Utilities."
646 $! Go To The [.TEST] Directory.
648 $ SET DEFAULT SYS$DISK:[.TEST]
650 $! Build The Test Programs.
652 $ @MAKETESTS 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" 'ISSEVEN'
654 $! Go Back To The Main Directory.
658 $! That's All, Time To RETURN.
662 $! Build The OpenSSL Application Programs.
666 $! Tell The User What We Are Doing.
668 $ WRITE SYS$OUTPUT ""
669 $ WRITE SYS$OUTPUT "Building OpenSSL [.",ARCH,".EXE.APPS] Applications."
671 $! Go To The [.APPS] Directory.
673 $ SET DEFAULT SYS$DISK:[.APPS]
675 $! Build The Application Programs.
677 $ @MAKEAPPS 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" 'ISSEVEN'
679 $! Go Back To The Main Directory.
683 $! That's All, Time To RETURN.
687 $! Build The OpenSSL Application Programs.
691 $! Tell The User What We Are Doing.
693 $ WRITE SYS$OUTPUT ""
694 $ WRITE SYS$OUTPUT "Building OpenSSL [.",ARCH,".EXE.ENGINES] Engines."
696 $! Go To The [.ENGINES] Directory.
698 $ SET DEFAULT SYS$DISK:[.ENGINES]
700 $! Build The Application Programs.
702 $ @MAKEENGINES ENGINES 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" 'ISSEVEN' "''BUILDPART'"
704 $! Go Back To The Main Directory.
708 $! That's All, Time To RETURN.
712 $! Check The User's Options.
716 $! Check if there's a "part", and separate it out
718 $ BUILDPART = F$ELEMENT(1,"/",P1)
719 $ IF BUILDPART .EQS. "/"
723 $ P1 = F$EXTRACT(0,F$LENGTH(P1) - F$LENGTH(BUILDPART) - 1, P1)
726 $! Check To See If P1 Is Blank.
731 $! P1 Is ALL, So Build Everything.
733 $ BUILDCOMMAND = "ALL"
739 $! Else, Check To See If P1 Has A Valid Arguement.
741 $ IF (P1.EQS."CONFIG").OR.(P1.EQS."BUILDINF").OR.(P1.EQS."SOFTLINKS") -
742 .OR.(P1.EQS."BUILDALL") -
743 .OR.(P1.EQS."CRYPTO").OR.(P1.EQS."SSL") -
744 .OR.(P1.EQS."SSL_TASK").OR.(P1.EQS."TEST").OR.(P1.EQS."APPS") -
745 .OR.(P1.EQS."ENGINES")
748 $! A Valid Arguement.
756 $! Tell The User We Don't Know What They Want.
758 $ WRITE SYS$OUTPUT ""
759 $ WRITE SYS$OUTPUT "USAGE: @MAKEVMS.COM [Target] [not-used option] [Debug option] <Compiler>"
760 $ WRITE SYS$OUTPUT ""
761 $ WRITE SYS$OUTPUT "Example: @MAKEVMS.COM ALL """" NODEBUG "
762 $ WRITE SYS$OUTPUT ""
763 $ WRITE SYS$OUTPUT "The Target ",P1," Is Invalid. The Valid Target Options Are:"
764 $ WRITE SYS$OUTPUT ""
765 $ WRITE SYS$OUTPUT " ALL : Just Build Everything."
766 $ WRITE SYS$OUTPUT " CONFIG : Just build the [.xxx.CRYPTO]OPENSSLCONF.H file."
767 $ WRITE SYS$OUTPUT " BUILDINF : Just build the [.xxx.CRYPTO]BUILDINF.H file."
768 $ WRITE SYS$OUTPUT " SOFTLINKS: Just Fix The Unix soft links."
769 $ WRITE SYS$OUTPUT " BUILDALL : Same as ALL, except CONFIG, BUILDINF and SOFTILNKS aren't done."
770 $ WRITE SYS$OUTPUT " CRYPTO : To Build Just The [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library."
771 $ WRITE SYS$OUTPUT " CRYPTO/x : To Build Just The x Part Of The"
772 $ WRITE SYS$OUTPUT " [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library."
773 $ WRITE SYS$OUTPUT " SSL : To Build Just The [.xxx.EXE.SSL]LIBSSL.OLB Library."
774 $ WRITE SYS$OUTPUT " SSL_TASK : To Build Just The [.xxx.EXE.SSL]SSL_TASK.EXE Program."
775 $ WRITE SYS$OUTPUT " TEST : To Build Just The OpenSSL Test Programs."
776 $ WRITE SYS$OUTPUT " APPS : To Build Just The OpenSSL Application Programs."
777 $ WRITE SYS$OUTPUT " ENGINES : To Build Just The ENGINES"
778 $ WRITE SYS$OUTPUT ""
779 $ WRITE SYS$OUTPUT " Where 'xxx' Stands For:"
780 $ WRITE SYS$OUTPUT ""
781 $ WRITE SYS$OUTPUT " ALPHA : Alpha Architecture."
782 $ WRITE SYS$OUTPUT " IA64 : IA64 Architecture."
783 $ WRITE SYS$OUTPUT " VAX : VAX Architecture."
784 $ WRITE SYS$OUTPUT ""
790 $! End The Valid Argument Check.
798 $! Check To See If P3 Is Blank.
800 $ IF (P3.EQS."NODEBUG")
803 $! P3 Is NODEBUG, So Compile Without Debugger Information.
805 $ DEBUGGER = "NODEBUG"
811 $! Check To See If We Are To Compile With Debugger Information.
813 $ IF (P3.EQS."DEBUG")
816 $! Compile With Debugger Information.
824 $! Tell The User Entered An Invalid Option..
826 $ WRITE SYS$OUTPUT ""
827 $ WRITE SYS$OUTPUT "The Option ",P3," Is Invalid. The Valid Options Are:"
828 $ WRITE SYS$OUTPUT ""
829 $ WRITE SYS$OUTPUT " DEBUG : Compile With The Debugger Information."
830 $ WRITE SYS$OUTPUT " NODEBUG : Compile Without The Debugger Information."
831 $ WRITE SYS$OUTPUT ""
837 $! End The Valid Arguement Check.
845 $! Check To See If P4 Is Blank.
850 $! O.K., The User Didn't Specify A Compiler, Let's Try To
851 $! Find Out Which One To Use.
853 $! Check To See If We Have GNU C.
855 $ IF (F$TRNLNM("GNU_CC").NES."")
858 $! Looks Like GNUC, Set To Use GNUC.
862 $! Tell The User We Are Using GNUC.
864 $ WRITE SYS$OUTPUT "Using GNU 'C' Compiler."
866 $! End The GNU C Compiler Check.
870 $! Check To See If We Have VAXC Or DECC.
872 $ IF (F$GETSYI("CPU").GE.128).OR.(F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC")
875 $! Looks Like DECC, Set To Use DECC.
879 $! Tell The User We Are Using DECC.
881 $ WRITE SYS$OUTPUT "Using DECC 'C' Compiler."
887 $! Looks Like VAXC, Set To Use VAXC.
891 $! Tell The User We Are Using VAX C.
893 $ WRITE SYS$OUTPUT "Using VAXC 'C' Compiler."
895 $! End The DECC & VAXC Compiler Check.
903 $! Check To See If The User Entered A Valid Paramter.
905 $ IF (P4.EQS."VAXC").OR.(P4.EQS."DECC").OR.(P4.EQS."GNUC")!.OR.(P4.EQS."LINK")
908 $! Check To See If The User Wanted To Just LINK.
913 $! Looks Like LINK-only
917 $! Tell The User We Are Only Linking.
919 $ WRITE SYS$OUTPUT "LINK Only. This actually NOT YET SUPPORTED!"
925 $! Check To See If The User Wanted DECC.
930 $! Looks Like DECC, Set To Use DECC.
934 $! Tell The User We Are Using DECC.
936 $ WRITE SYS$OUTPUT "Using DECC 'C' Compiler."
942 $! Check To See If We Are To Use VAXC.
947 $! Looks Like VAXC, Set To Use VAXC.
951 $! Tell The User We Are Using VAX C.
953 $ WRITE SYS$OUTPUT "Using VAXC 'C' Compiler."
959 $! Check To See If We Are To Use GNU C.
964 $! Looks Like GNUC, Set To Use GNUC.
968 $! Tell The User We Are Using GNUC.
970 $ WRITE SYS$OUTPUT "Using GNU 'C' Compiler."
972 $! End The GNU C Check.
976 $! Else The User Entered An Invalid Arguement.
980 $! Tell The User We Don't Know What They Want.
982 $ WRITE SYS$OUTPUT ""
983 $ WRITE SYS$OUTPUT "The Option ",P4," Is Invalid. The Valid Options Are:"
984 $ WRITE SYS$OUTPUT ""
985 $ WRITE SYS$OUTPUT " VAXC : To Compile With VAX C."
986 $ WRITE SYS$OUTPUT " DECC : To Compile With DEC C."
987 $ WRITE SYS$OUTPUT " GNUC : To Compile With GNU C."
988 $ WRITE SYS$OUTPUT ""
994 $! End The Valid Arguement Check.
1002 $! Time to check the contents of P5, and to make sure we get the correct library.
1004 $ IF P5.EQS."SOCKETSHR" .OR. P5.EQS."MULTINET" .OR. P5.EQS."UCX" -
1005 .OR. P5.EQS."TCPIP" .OR. P5.EQS."NONE"
1008 $! Check to see if SOCKETSHR was chosen
1010 $ IF P5.EQS."SOCKETSHR"
1013 $! Set the library to use SOCKETSHR
1015 $ TCPIP_LIB = "SYS$DISK:[-.VMS]SOCKETSHR_SHR.OPT/OPT"
1019 $ WRITE SYS$OUTPUT "Using SOCKETSHR for TCP/IP"
1021 $! Done with SOCKETSHR
1025 $! Check to see if MULTINET was chosen
1027 $ IF P5.EQS."MULTINET"
1030 $! Set the library to use UCX emulation.
1036 $ WRITE SYS$OUTPUT "Using MultiNet via UCX emulation for TCP/IP"
1038 $! Done with MULTINET
1042 $! Check to see if UCX was chosen
1047 $! Set the library to use UCX.
1049 $ TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_DECC.OPT/OPT"
1053 $ WRITE SYS$OUTPUT "Using UCX or an emulation thereof for TCP/IP"
1059 $! Check to see if TCPIP was chosen
1064 $! Set the library to use TCPIP (post UCX).
1066 $ TCPIP_LIB = "SYS$DISK:[-.VMS]TCPIP_SHR_DECC.OPT/OPT"
1070 $ WRITE SYS$OUTPUT "Using TCPIP (post UCX) for TCP/IP"
1076 $! Check to see if NONE was chosen
1081 $! Do not use a TCPIP library.
1087 $ WRITE SYS$OUTPUT "A specific TCPIP library will not be used."
1093 $! Set the TCPIP_TYPE symbol
1099 $ WRITE SYS$OUTPUT "TCP/IP library spec: ", TCPIP_LIB
1101 $! Else The User Entered An Invalid Arguement.
1107 $! Tell The User We Don't Know What They Want.
1109 $ WRITE SYS$OUTPUT ""
1110 $ WRITE SYS$OUTPUT "The Option ",P5," Is Invalid. The Valid Options Are:"
1111 $ WRITE SYS$OUTPUT ""
1112 $ WRITE SYS$OUTPUT " SOCKETSHR : To link with SOCKETSHR TCP/IP library."
1113 $ WRITE SYS$OUTPUT " UCX : To link with UCX TCP/IP library."
1114 $ WRITE SYS$OUTPUT " TCPIP : To link with TCPIP TCP/IP (post UCX) library."
1115 $ WRITE SYS$OUTPUT " NONE : To not link with a specific TCP/IP library."
1116 $ WRITE SYS$OUTPUT ""
1123 $! If TCPIP is not defined, then hardcode it to make
1124 $! it clear that no TCPIP is desired.
1129 $ TCPIP_TYPE = "NONE"
1132 $! Set the TCPIP_TYPE symbol
1138 $! Done with TCP/IP libraries
1142 $! Special Threads For OpenVMS v7.1 Or Later
1144 $! Written By: Richard Levitte
1145 $! richard@levitte.org
1148 $! Check To See If We Have A Option For P6.
1153 $! Get The Version Of VMS We Are Using.
1156 $ TMP = F$ELEMENT(0,"-",F$EXTRACT(1,4,F$GETSYI("VERSION")))
1157 $ TMP = F$INTEGER(F$ELEMENT(0,".",TMP)+F$ELEMENT(1,".",TMP))
1159 $! Check To See If The VMS Version Is v7.1 Or Later.
1164 $! We Have OpenVMS v7.1 Or Later, So Use The Special Threads.
1166 $ ISSEVEN := ,PTHREAD_USE_D4
1168 $! End The VMS Version Check.
1172 $! End The P6 Check.
1176 $! Time To RETURN...
1181 $ SET DEFAULT 'DEF_ORIG'