makevms.com 24 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061
  1. $!
  2. $! MAKEVMS.COM
  3. $! Original Author: UNKNOWN
  4. $! Rewritten By: Robert Byer
  5. $! Vice-President
  6. $! A-Com Computing, Inc.
  7. $! byer@mail.all-net.net
  8. $!
  9. $! Changes by Richard Levitte <richard@levitte.org>
  10. $!
  11. $! This procedure creates the SSL libraries of "[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB"
  12. $! "[.xxx.EXE.SSL]LIBSSL.OLB" and if specified "[.xxx.EXE.RSAREF]LIBRSAGLUE.OLB".
  13. $! The "xxx" denotes the machine architecture of AXP or VAX.
  14. $!
  15. $! This procedures accepts two command line options listed below.
  16. $!
  17. $! Specify one of the following build options for P1.
  18. $!
  19. $! ALL Just build "everything".
  20. $! CONFIG Just build the "[.CRYPTO]OPENSSLCONF.H" file.
  21. $! BUILDINF Just build the "[.CRYPTO]BUILDINF.H" file.
  22. $! SOFTLINKS Just fix the Unix soft links.
  23. $! BUILDALL Same as ALL, except CONFIG, BUILDINF and SOFTILNKS aren't done.
  24. $! RSAREF Just build the "[.xxx.EXE.RSAREF]LIBRSAGLUE.OLB" library.
  25. $! CRYPTO Just build the "[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB" library.
  26. $! CRYPTO/x Just build the x part of the
  27. $! "[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB" library.
  28. $! SSL Just build the "[.xxx.EXE.SSL]LIBSSL.OLB" library.
  29. $! SSL_TASK Just build the "[.xxx.EXE.SSL]SSL_TASK.EXE" program.
  30. $! TEST Just build the "[.xxx.EXE.TEST]" test programs for OpenSSL.
  31. $! APPS Just build the "[.xxx.EXE.APPS]" application programs for OpenSSL.
  32. $!
  33. $!
  34. $! Specify RSAREF as P2 to compile using the RSAREF Library.
  35. $! If you specify NORSAREF, it will compile without using RSAREF.
  36. $! (If in the United States, You Must Compile Using RSAREF).
  37. $!
  38. $! Note: The RSAREF libraries are NOT INCLUDED and you have to
  39. $! download it from "ftp://ftp.rsa.com/rsaref". You have to
  40. $! get the ".tar-Z" file as the ".zip" file dosen't have the
  41. $! directory structure stored. You have to extract the file
  42. $! into the [.RSAREF] directory as that is where the scripts
  43. $! will look for the files.
  44. $!
  45. $! Speficy DEBUG or NODEBUG as P3 to compile with or without debugging
  46. $! information.
  47. $!
  48. $! Specify which compiler at P4 to try to compile under.
  49. $!
  50. $! VAXC For VAX C.
  51. $! DECC For DEC C.
  52. $! GNUC For GNU C.
  53. $! LINK To only link the programs from existing object files.
  54. $! (not yet implemented)
  55. $!
  56. $! If you don't speficy a compiler, it will try to determine which
  57. $! "C" compiler to use.
  58. $!
  59. $! P5, if defined, sets a TCP/IP library to use, through one of the following
  60. $! keywords:
  61. $!
  62. $! UCX for UCX or UCX emulation
  63. $! SOCKETSHR for SOCKETSHR+NETLIB
  64. $!
  65. $! P6, if defined, sets a compiler thread NOT needed on OpenVMS 7.1 (and up)
  66. $!
  67. $!
  68. $! Check if we're in a batch job, and make sure we get to
  69. $! the directory this script is in
  70. $!
  71. $ IF F$MODE() .EQS. "BATCH"
  72. $ THEN
  73. $ COMNAME=F$ENVIRONMENT("PROCEDURE")
  74. $ COMPATH=F$PARSE("A.;",COMNAME) - "A.;"
  75. $ SET DEF 'COMPATH'
  76. $ ENDIF
  77. $!
  78. $! Check Which Architecture We Are Using.
  79. $!
  80. $ IF (F$GETSYI("CPU").GE.128)
  81. $ THEN
  82. $!
  83. $! The Architecture Is AXP.
  84. $!
  85. $ ARCH := AXP
  86. $!
  87. $! Else...
  88. $!
  89. $ ELSE
  90. $!
  91. $! The Architecture Is VAX.
  92. $!
  93. $ ARCH := VAX
  94. $!
  95. $! End The Architecture Check.
  96. $!
  97. $ ENDIF
  98. $!
  99. $! Check To Make Sure We Have Valid Command Line Parameters.
  100. $!
  101. $ GOSUB CHECK_OPTIONS
  102. $!
  103. $! Check To See What We Are To Do.
  104. $!
  105. $ IF (BUILDCOMMAND.EQS."ALL")
  106. $ THEN
  107. $!
  108. $! Start with building the OpenSSL configuration file.
  109. $!
  110. $ GOSUB CONFIG
  111. $!
  112. $! Create The "BUILDINF.H" Include File.
  113. $!
  114. $ GOSUB BUILDINF
  115. $!
  116. $! Fix The Unix Softlinks.
  117. $!
  118. $ GOSUB SOFTLINKS
  119. $!
  120. $ ENDIF
  121. $!
  122. $ IF (BUILDCOMMAND.EQS."ALL".OR.BUILDCOMMAND.EQS."BUILDALL")
  123. $ THEN
  124. $!
  125. $! Check To See If We Are Going To Be Building The
  126. $! [.xxx.EXE.RSAREF]LIBRSAGLUE.OLB Library.
  127. $!
  128. $ IF (RSAREF.EQS."RSAREF")
  129. $ THEN
  130. $!
  131. $! Build The [.xxx.EXE.RSAREF]LIBRSAGLUE.OLB Library.
  132. $!
  133. $ GOSUB RSAREF
  134. $!
  135. $! End The RSAREF Check.
  136. $!
  137. $ ENDIF
  138. $!
  139. $! Build The [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library.
  140. $!
  141. $ GOSUB CRYPTO
  142. $!
  143. $! Build The [.xxx.EXE.SSL]LIBSSL.OLB Library.
  144. $!
  145. $ GOSUB SSL
  146. $!
  147. $! Build The [.xxx.EXE.SSL]SSL_TASK.EXE DECNet SSL Engine.
  148. $!
  149. $ GOSUB SSL_TASK
  150. $!
  151. $! Build The [.xxx.EXE.TEST] OpenSSL Test Utilities.
  152. $!
  153. $ GOSUB TEST
  154. $!
  155. $! Build The [.xxx.EXE.APPS] OpenSSL Application Utilities.
  156. $!
  157. $ GOSUB APPS
  158. $!
  159. $! Else...
  160. $!
  161. $ ELSE
  162. $!
  163. $! Build Just What The User Wants Us To Build.
  164. $!
  165. $ GOSUB 'BUILDCOMMAND'
  166. $!
  167. $ ENDIF
  168. $!
  169. $! Time To EXIT.
  170. $!
  171. $ EXIT
  172. $!
  173. $! Rebuild The "[.CRYPTO]OPENSSLCONF.H" file.
  174. $!
  175. $ CONFIG:
  176. $!
  177. $! Tell The User We Are Creating The [.CRYPTO]OPENSSLCONF.H File.
  178. $!
  179. $ WRITE SYS$OUTPUT "Creating [.CRYPTO]OPENSSLCONF.H Include File."
  180. $!
  181. $! Create The [.CRYPTO]OPENSSLCONF.H File.
  182. $!
  183. $ OPEN/WRITE H_FILE SYS$DISK:[.CRYPTO]OPENSSLCONF.H
  184. $!
  185. $! Write The [.CRYPTO]OPENSSLCONF.H File.
  186. $!
  187. $ WRITE H_FILE "/* This file was automatically built using makevms.com */"
  188. $ WRITE H_FILE "/* and [.CRYPTO]OPENSSLCONF.H_IN */"
  189. $
  190. $! Different tar version may have named the file differently
  191. $ IF F$SEARCH("[.CRYPTO]OPENSSLCONF.H_IN") .NES. ""
  192. $ THEN
  193. $ TYPE [.CRYPTO]OPENSSLCONF.H_IN /OUTPUT=H_FILE:
  194. $ ELSE
  195. $ IF F$SEARCH("[.CRYPTO]OPENSSLCONF_H.IN") .NES. ""
  196. $ THEN
  197. $ TYPE [.CRYPTO]OPENSSLCONF_H.IN /OUTPUT=H_FILE:
  198. $ ELSE
  199. $ WRITE SYS$ERROR "Couldn't find a [.CRYPTO]OPENSSLCONF.H_IN. Exiting!"
  200. $ EXIT 0
  201. $ ENDIF
  202. $ ENDIF
  203. $!
  204. $ IF ARCH .EQS. "AXP"
  205. $ THEN
  206. $!
  207. $! Write the Alpha specific data
  208. $!
  209. $ WRITE H_FILE "#if defined(HEADER_RC4_H)"
  210. $ WRITE H_FILE "#undef RC4_INT"
  211. $ WRITE H_FILE "#define RC4_INT unsigned int"
  212. $ WRITE H_FILE "#undef RC4_CHUNK"
  213. $ WRITE H_FILE "#define RC4_CHUNK unsigned long long"
  214. $ WRITE H_FILE "#endif"
  215. $!
  216. $ WRITE H_FILE "#if defined(HEADER_DES_LOCL_H)"
  217. $ WRITE H_FILE "#undef DES_LONG"
  218. $ WRITE H_FILE "#define DES_LONG unsigned int"
  219. $ WRITE H_FILE "#undef DES_PTR"
  220. $ WRITE H_FILE "#define DES_PTR"
  221. $ WRITE H_FILE "#undef DES_RISC1"
  222. $ WRITE H_FILE "#undef DES_RISC2"
  223. $ WRITE H_FILE "#define DES_RISC1"
  224. $ WRITE H_FILE "#undef DES_UNROLL"
  225. $ WRITE H_FILE "#define DES_UNROLL"
  226. $ WRITE H_FILE "#endif"
  227. $!
  228. $ WRITE H_FILE "#if defined(HEADER_BN_H)"
  229. $ WRITE H_FILE "#undef SIXTY_FOUR_BIT_LONG"
  230. $ WRITE H_FILE "#undef SIXTY_FOUR_BIT"
  231. $ WRITE H_FILE "#define SIXTY_FOUR_BIT"
  232. $ WRITE H_FILE "#undef THIRTY_TWO_BIT"
  233. $ WRITE H_FILE "#undef SIXTEEN_BIT"
  234. $ WRITE H_FILE "#undef EIGHT_BIT"
  235. $ WRITE H_FILE "#endif"
  236. $!
  237. $! Else...
  238. $!
  239. $ ELSE
  240. $!
  241. $! Write the VAX specific data
  242. $!
  243. $ WRITE H_FILE "#if defined(HEADER_RC4_H)"
  244. $ WRITE H_FILE "#undef RC4_INT"
  245. $ WRITE H_FILE "#define RC4_INT unsigned char"
  246. $ WRITE H_FILE "#undef RC4_CHUNK"
  247. $ WRITE H_FILE "#define RC4_CHUNK unsigned long"
  248. $ WRITE H_FILE "#endif"
  249. $!
  250. $ WRITE H_FILE "#if defined(HEADER_DES_LOCL_H)"
  251. $ WRITE H_FILE "#undef DES_LONG"
  252. $ WRITE H_FILE "#define DES_LONG unsigned long"
  253. $ WRITE H_FILE "#undef DES_PTR"
  254. $ WRITE H_FILE "#define DES_PTR"
  255. $ WRITE H_FILE "#undef DES_RISC1"
  256. $ WRITE H_FILE "#undef DES_RISC2"
  257. $ WRITE H_FILE "#undef DES_UNROLL"
  258. $ WRITE H_FILE "#endif"
  259. $!
  260. $ WRITE H_FILE "#if defined(HEADER_BN_H)"
  261. $ WRITE H_FILE "#undef SIXTY_FOUR_BIT_LONG"
  262. $ WRITE H_FILE "#undef SIXTY_FOUR_BIT"
  263. $ WRITE H_FILE "#undef THIRTY_TWO_BIT"
  264. $ WRITE H_FILE "#define THIRTY_TWO_BIT"
  265. $ WRITE H_FILE "#undef SIXTEEN_BIT"
  266. $ WRITE H_FILE "#undef EIGHT_BIT"
  267. $ WRITE H_FILE "#endif"
  268. $!
  269. $! End
  270. $!
  271. $ ENDIF
  272. $!
  273. $! Close the [.CRYPTO]OPENSSLCONF.H file
  274. $!
  275. $ CLOSE H_FILE
  276. $!
  277. $! That's All, Time To RETURN.
  278. $!
  279. $ RETURN
  280. $!
  281. $! Rebuild The "[.CRYPTO]BUILDINF.H" file.
  282. $!
  283. $ BUILDINF:
  284. $!
  285. $! Tell The User We Are Creating The [.CRYPTO]BUILDINF.H File.
  286. $!
  287. $ WRITE SYS$OUTPUT "Creating [.CRYPTO]BUILDINF.H Include File."
  288. $!
  289. $! Create The [.CRYPTO]BUILDINF.H File.
  290. $!
  291. $ OPEN/WRITE H_FILE SYS$DISK:[.CRYPTO]BUILDINF.H
  292. $!
  293. $! Get The Current Date & Time.
  294. $!
  295. $ TIME = F$TIME()
  296. $!
  297. $! Write The [.CRYPTO]BUILDINF.H File.
  298. $!
  299. $ WRITE H_FILE "#define CFLAGS """" /* Not filled in for now */"
  300. $ WRITE H_FILE "#define PLATFORM ""VMS"""
  301. $ WRITE H_FILE "#define DATE ""''TIME'"" "
  302. $!
  303. $! Close The [.CRYPTO]BUILDINF.H File.
  304. $!
  305. $ CLOSE H_FILE
  306. $!
  307. $! That's All, Time To RETURN.
  308. $!
  309. $ RETURN
  310. $!
  311. $! Copy a lot of files around.
  312. $!
  313. $ SOFTLINKS:
  314. $!
  315. $! Tell The User We Are Partly Rebuilding The [.TEST] Directory.
  316. $!
  317. $ WRITE SYS$OUTPUT "Rebuilding The '[.APPS]MD5.C' And '[.APPS]RMD160.C' Files."
  318. $!
  319. $ DELETE SYS$DISK:[.APPS]MD4.C;*,MD5.C;*,RMD160.C;*
  320. $!
  321. $! Copy MD4.C from [.CRYPTO.MD4] into [.APPS]
  322. $!
  323. $ COPY SYS$DISK:[.CRYPTO.MD4]MD4.C SYS$DISK:[.APPS]
  324. $!
  325. $! Copy MD5.C from [.CRYPTO.MD5] into [.APPS]
  326. $!
  327. $ COPY SYS$DISK:[.CRYPTO.MD5]MD5.C SYS$DISK:[.APPS]
  328. $!
  329. $! Copy RMD160.C from [.CRYPTO.RIPEMD] into [.APPS]
  330. $!
  331. $ COPY SYS$DISK:[.CRYPTO.RIPEMD]RMD160.C SYS$DISK:[.APPS]
  332. $!
  333. $! Tell The User We Are Partly Rebuilding The [.TEST] Directory.
  334. $!
  335. $ WRITE SYS$OUTPUT "Rebuilding The '[.TEST]*.C' Files."
  336. $!
  337. $! First, We Have To "Rebuild" The "[.TEST]" Directory, So Delete
  338. $! All The "C" Files That Are Currently There Now.
  339. $!
  340. $ DELETE SYS$DISK:[.TEST]*.C;*
  341. $!
  342. $! Copy all the *TEST.C files from [.CRYPTO...] into [.TEST]
  343. $!
  344. $ COPY SYS$DISK:[.CRYPTO.*]%*TEST.C SYS$DISK:[.TEST]
  345. $!
  346. $! Copy all the *TEST.C files from [.SSL...] into [.TEST]
  347. $!
  348. $ COPY SYS$DISK:[.SSL]%*TEST.C SYS$DISK:[.TEST]
  349. $!
  350. $! Tell The User We Are Rebuilding The [.INCLUDE.OPENSSL] Directory.
  351. $!
  352. $ WRITE SYS$OUTPUT "Rebuilding The '[.INCLUDE.OPENSSL]' Directory."
  353. $!
  354. $! First, make sure the directory exists
  355. $!
  356. $ IF F$PARSE("SYS$DISK:[.INCLUDE.OPENSSL]") .EQS. "" THEN -
  357. CREATE/DIRECTORY SYS$DISK:[.INCLUDE.OPENSSL]
  358. $!
  359. $! Copy All The ".H" Files From The Main Directory.
  360. $!
  361. $ EXHEADER := e_os.h,e_os2.h
  362. $ COPY 'EXHEADER' SYS$DISK:[.INCLUDE.OPENSSL]
  363. $!
  364. $! Copy All The ".H" Files From The [.CRYPTO] Directory Tree.
  365. $!
  366. $ SDIRS := ,MD2,MD4,MD5,SHA,MDC2,HMAC,RIPEMD,-
  367. DES,RC2,RC4,RC5,IDEA,BF,CAST,-
  368. BN,RSA,DSA,DH,DSO,ENGINE,RIJNDAEL,-
  369. BUFFER,BIO,STACK,LHASH,RAND,ERR,OBJECTS,-
  370. EVP,ASN1,PEM,X509,X509V3,CONF,TXT_DB,PKCS7,PKCS12,COMP
  371. $ EXHEADER_ := crypto.h,tmdiff.h,opensslv.h,opensslconf.h,ebcdic.h,symhacks.h
  372. $ EXHEADER_MD2 := md2.h
  373. $ EXHEADER_MD4 := md4.h
  374. $ EXHEADER_MD5 := md5.h
  375. $ EXHEADER_SHA := sha.h
  376. $ EXHEADER_MDC2 := mdc2.h
  377. $ EXHEADER_HMAC := hmac.h
  378. $ EXHEADER_RIPEMD := ripemd.h
  379. $ EXHEADER_DES := des.h
  380. $ EXHEADER_RC2 := rc2.h
  381. $ EXHEADER_RC4 := rc4.h
  382. $ EXHEADER_RC5 := rc5.h
  383. $ EXHEADER_IDEA := idea.h
  384. $ EXHEADER_BF := blowfish.h
  385. $ EXHEADER_CAST := cast.h
  386. $ EXHEADER_BN := bn.h
  387. $ EXHEADER_RSA := rsa.h
  388. $ EXHEADER_DSA := dsa.h
  389. $ EXHEADER_DH := dh.h
  390. $ EXHEADER_DSO := dso.h
  391. $ EXHEADER_ENGINE := engine.h
  392. $ EXHEADER_RIJNDAEL := rd_fst.h,rijndael.h
  393. $ EXHEADER_BUFFER := buffer.h
  394. $ EXHEADER_BIO := bio.h
  395. $ EXHEADER_STACK := stack.h,safestack.h
  396. $ EXHEADER_LHASH := lhash.h
  397. $ EXHEADER_RAND := rand.h
  398. $ EXHEADER_ERR := err.h
  399. $ EXHEADER_OBJECTS := objects.h,obj_mac.h
  400. $ EXHEADER_EVP := evp.h
  401. $ EXHEADER_ASN1 := asn1.h,asn1_mac.h,asn1t.h
  402. $ EXHEADER_PEM := pem.h,pem2.h
  403. $ EXHEADER_X509 := x509.h,x509_vfy.h
  404. $ EXHEADER_X509V3 := x509v3.h
  405. $ EXHEADER_CONF := conf.h,conf_api.h
  406. $ EXHEADER_TXT_DB := txt_db.h
  407. $ EXHEADER_PKCS7 := pkcs7.h
  408. $ EXHEADER_PKCS12 := pkcs12.h
  409. $ EXHEADER_COMP := comp.h
  410. $
  411. $ I = 0
  412. $ LOOP_SDIRS:
  413. $ D = F$EDIT(F$ELEMENT(I, ",", SDIRS),"TRIM")
  414. $ I = I + 1
  415. $ IF D .EQS. "," THEN GOTO LOOP_SDIRS_END
  416. $ tmp = EXHEADER_'D'
  417. $ IF D .EQS. ""
  418. $ THEN
  419. $ COPY [.CRYPTO]'tmp' SYS$DISK:[.INCLUDE.OPENSSL] !/LOG
  420. $ ELSE
  421. $ COPY [.CRYPTO.'D']'tmp' SYS$DISK:[.INCLUDE.OPENSSL] !/LOG
  422. $ ENDIF
  423. $ GOTO LOOP_SDIRS
  424. $ LOOP_SDIRS_END:
  425. $!
  426. $! Copy All The ".H" Files From The [.RSAREF] Directory.
  427. $!
  428. $! EXHEADER := rsaref.h
  429. $! COPY SYS$DISK:[.RSAREF]'EXHEADER' SYS$DISK:[.INCLUDE.OPENSSL]
  430. $!
  431. $! Copy All The ".H" Files From The [.SSL] Directory.
  432. $!
  433. $ EXHEADER := ssl.h,ssl2.h,ssl3.h,ssl23.h,tls1.h,kssl.h
  434. $ COPY SYS$DISK:[.SSL]'EXHEADER' SYS$DISK:[.INCLUDE.OPENSSL]
  435. $!
  436. $! Purge all doubles
  437. $!
  438. $ PURGE SYS$DISK:[.INCLUDE.OPENSSL]*.H
  439. $!
  440. $! That's All, Time To RETURN.
  441. $!
  442. $ RETURN
  443. $!
  444. $! Build The "[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB" Library.
  445. $!
  446. $ CRYPTO:
  447. $!
  448. $! Tell The User What We Are Doing.
  449. $!
  450. $ WRITE SYS$OUTPUT ""
  451. $ WRITE SYS$OUTPUT "Building The [.",ARCH,".EXE.CRYPTO]LIBCRYPTO.OLB Library."
  452. $!
  453. $! Go To The [.CRYPTO] Directory.
  454. $!
  455. $ SET DEFAULT SYS$DISK:[.CRYPTO]
  456. $!
  457. $! Build The [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library.
  458. $!
  459. $ @CRYPTO-LIB LIBRARY 'RSAREF' 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" "''ISSEVEN'" "''BUILDPART'"
  460. $!
  461. $! Build The [.xxx.EXE.CRYPTO]*.EXE Test Applications.
  462. $!
  463. $ @CRYPTO-LIB APPS 'RSAREF' 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" 'ISSEVEN'
  464. $!
  465. $! Go Back To The Main Directory.
  466. $!
  467. $ SET DEFAULT [-]
  468. $!
  469. $! Time To RETURN.
  470. $!
  471. $ RETURN
  472. $!
  473. $! Build The [.xxx.EXE.RSAREF]LIBRSAGLUE Library.
  474. $!
  475. $ RSAREF:
  476. $ WRITE SYS$OUTPUT ""
  477. $ WRITE SYS$OUTPUT "RSAref glue library not built, since it's no longer needed"
  478. $ RETURN
  479. $!
  480. $! Tell The User What We Are Doing.
  481. $!
  482. $ WRITE SYS$OUTPUT ""
  483. $ WRITE SYS$OUTPUT "Building The [.",ARCH,".EXE.RSAREF]LIBRSAGLUE.OLB Library."
  484. $!
  485. $! Go To The [.RSAREF] Directory.
  486. $!
  487. $ SET DEFAULT SYS$DISK:[.RSAREF]
  488. $!
  489. $! Build The [.xxx.EXE.RSAREF]LIBRSAGLUE.OLB Library.
  490. $!
  491. $ @RSAREF-LIB LIBRARY 'DEBUGGER' "''COMPILER'" 'ISSEVEN'
  492. $!
  493. $! Go Back To The Main Directory.
  494. $!
  495. $ SET DEFAULT [-]
  496. $!
  497. $! Time To Return.
  498. $!
  499. $ RETURN
  500. $!
  501. $! Build The "[.xxx.EXE.SSL]LIBSSL.OLB" Library.
  502. $!
  503. $ SSL:
  504. $!
  505. $! Tell The User What We Are Doing.
  506. $!
  507. $ WRITE SYS$OUTPUT ""
  508. $ WRITE SYS$OUTPUT "Building The [.",ARCH,".EXE.SSL]LIBSSL.OLB Library."
  509. $!
  510. $! Go To The [.SSL] Directory.
  511. $!
  512. $ SET DEFAULT SYS$DISK:[.SSL]
  513. $!
  514. $! Build The [.xxx.EXE.SSL]LIBSSL.OLB Library.
  515. $!
  516. $ @SSL-LIB LIBRARY 'RSAREF' 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" 'ISSEVEN'
  517. $!
  518. $! Go Back To The Main Directory.
  519. $!
  520. $ SET DEFAULT [-]
  521. $!
  522. $! Time To Return.
  523. $!
  524. $ RETURN
  525. $!
  526. $! Build The "[.xxx.EXE.SSL]SSL_TASK.EXE" Program.
  527. $!
  528. $ SSL_TASK:
  529. $!
  530. $! Tell The User What We Are Doing.
  531. $!
  532. $ WRITE SYS$OUTPUT ""
  533. $ WRITE SYS$OUTPUT "Building DECNet Based SSL Engine, [.",ARCH,".EXE.SSL]SSL_TASK.EXE"
  534. $!
  535. $! Go To The [.SSL] Directory.
  536. $!
  537. $ SET DEFAULT SYS$DISK:[.SSL]
  538. $!
  539. $! Build The [.xxx.EXE.SSL]SSL_TASK.EXE
  540. $!
  541. $ @SSL-LIB SSL_TASK 'RSAREF' 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" 'ISSEVEN'
  542. $!
  543. $! Go Back To The Main Directory.
  544. $!
  545. $ SET DEFAULT [-]
  546. $!
  547. $! That's All, Time To RETURN.
  548. $!
  549. $ RETURN
  550. $!
  551. $! Build The OpenSSL Test Programs.
  552. $!
  553. $ TEST:
  554. $!
  555. $! Tell The User What We Are Doing.
  556. $!
  557. $ WRITE SYS$OUTPUT ""
  558. $ WRITE SYS$OUTPUT "Building The OpenSSL [.",ARCH,".EXE.TEST] Test Utilities."
  559. $!
  560. $! Go To The [.TEST] Directory.
  561. $!
  562. $ SET DEFAULT SYS$DISK:[.TEST]
  563. $!
  564. $! Build The Test Programs.
  565. $!
  566. $ @MAKETESTS 'RSAREF' 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" 'ISSEVEN'
  567. $!
  568. $! Go Back To The Main Directory.
  569. $!
  570. $ SET DEFAULT [-]
  571. $!
  572. $! That's All, Time To RETURN.
  573. $!
  574. $ RETURN
  575. $!
  576. $! Build The OpenSSL Application Programs.
  577. $!
  578. $ APPS:
  579. $!
  580. $! Tell The User What We Are Doing.
  581. $!
  582. $ WRITE SYS$OUTPUT ""
  583. $ WRITE SYS$OUTPUT "Building OpenSSL [.",ARCH,".EXE.APPS] Applications."
  584. $!
  585. $! Go To The [.APPS] Directory.
  586. $!
  587. $ SET DEFAULT SYS$DISK:[.APPS]
  588. $!
  589. $! Build The Application Programs.
  590. $!
  591. $ @MAKEAPPS 'RSAREF' 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" 'ISSEVEN'
  592. $!
  593. $! Go Back To The Main Directory.
  594. $!
  595. $ SET DEFAULT [-]
  596. $!
  597. $! That's All, Time To RETURN.
  598. $!
  599. $ RETURN
  600. $!
  601. $! Check The User's Options.
  602. $!
  603. $ CHECK_OPTIONS:
  604. $!
  605. $! Check if there's a "part", and separate it out
  606. $!
  607. $ BUILDPART = F$ELEMENT(1,"/",P1)
  608. $ IF BUILDPART .EQS. "/"
  609. $ THEN
  610. $ BUILDPART = ""
  611. $ ELSE
  612. $ P1 = F$EXTRACT(0,F$LENGTH(P1) - F$LENGTH(BUILDPART) - 1, P1)
  613. $ ENDIF
  614. $!
  615. $! Check To See If P1 Is Blank.
  616. $!
  617. $ IF (P1.EQS."ALL")
  618. $ THEN
  619. $!
  620. $! P1 Is ALL, So Build Everything.
  621. $!
  622. $ BUILDCOMMAND = "ALL"
  623. $!
  624. $! Else...
  625. $!
  626. $ ELSE
  627. $!
  628. $! Else, Check To See If P1 Has A Valid Arguement.
  629. $!
  630. $ IF (P1.EQS."CONFIG").OR.(P1.EQS."BUILDINF").OR.(P1.EQS."SOFTLINKS") -
  631. .OR.(P1.EQS."BUILDALL") -
  632. .OR.(P1.EQS."CRYPTO").OR.(P1.EQS."SSL").OR.(P1.EQS."RSAREF") -
  633. .OR.(P1.EQS."SSL_TASK").OR.(P1.EQS."TEST").OR.(P1.EQS."APPS")
  634. $ THEN
  635. $!
  636. $! A Valid Arguement.
  637. $!
  638. $ BUILDCOMMAND = P1
  639. $!
  640. $! Else...
  641. $!
  642. $ ELSE
  643. $!
  644. $! Tell The User We Don't Know What They Want.
  645. $!
  646. $ WRITE SYS$OUTPUT ""
  647. $ WRITE SYS$OUTPUT "The Option ",P1," Is Invalid. The Valid Options Are:"
  648. $ WRITE SYS$OUTPUT ""
  649. $ WRITE SYS$OUTPUT " ALL : Just Build Everything."
  650. $ WRITE SYS$OUTPUT " CONFIG : Just build the [.CRYPTO]OPENSSLCONF.H file."
  651. $ WRITE SYS$OUTPUT " BUILDINF : Just build the [.CRYPTO]BUILDINF.H file."
  652. $ WRITE SYS$OUTPUT " SOFTLINKS: Just Fix The Unix soft links."
  653. $ WRITE SYS$OUTPUT " BUILDALL : Same as ALL, except CONFIG, BUILDINF and SOFTILNKS aren't done."
  654. $ WRITE SYS$OUTPUT " CRYPTO : To Build Just The [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library."
  655. $ WRITE SYS$OUTPUT " CRYPTO/x : To Build Just The x Part Of The"
  656. $ WRITE SYS$OUTPUT " [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library."
  657. $ WRITE SYS$OUTPUT " SSL : To Build Just The [.xxx.EXE.SSL]LIBSSL.OLB Library."
  658. $ WRITE SYS$OUTPUT " SSL_TASK : To Build Just The [.xxx.EXE.SSL]SSL_TASK.EXE Program."
  659. $ WRITE SYS$OUTPUT " TEST : To Build Just The OpenSSL Test Programs."
  660. $ WRITE SYS$OUTPUT " APPS : To Build Just The OpenSSL Application Programs."
  661. $ WRITE SYS$OUTPUT ""
  662. $ WRITE SYS$OUTPUT " Where 'xxx' Stands For:"
  663. $ WRITE SYS$OUTPUT ""
  664. $ WRITE SYS$OUTPUT " AXP : Alpha Architecture."
  665. $ WRITE SYS$OUTPUT " VAX : VAX Architecture."
  666. $ WRITE SYS$OUTPUT ""
  667. $!
  668. $! Time To EXIT.
  669. $!
  670. $ EXIT
  671. $!
  672. $! End The Valid Argument Check.
  673. $!
  674. $ ENDIF
  675. $!
  676. $! End The P1 Check.
  677. $!
  678. $ ENDIF
  679. $!
  680. $! Check To See If P2 Is Blank.
  681. $!
  682. $ P2 = "NORSAREF"
  683. $ IF (P2.EQS."NORSAREF")
  684. $ THEN
  685. $!
  686. $! P2 Is NORSAREF, So Compile Without RSAREF.
  687. $!
  688. $ RSAREF = "NORSAREF"
  689. $!
  690. $! Else...
  691. $!
  692. $ ELSE
  693. $!
  694. $! Check To See If We Are To Compile Using The RSAREF Library.
  695. $!
  696. $ IF (P2.EQS."RSAREF")
  697. $ THEN
  698. $!
  699. $! Compile With RSAREF Library.
  700. $!
  701. $ RSAREF = "RSAREF"
  702. $!
  703. $! Else...
  704. $!
  705. $ ELSE
  706. $!
  707. $! Tell The User Entered An Invalid Option..
  708. $!
  709. $ WRITE SYS$OUTPUT ""
  710. $ WRITE SYS$OUTPUT "The Option ",P2," Is Invalid. The Valid Options Are:"
  711. $ WRITE SYS$OUTPUT ""
  712. $ WRITE SYS$OUTPUT " RSAREF : To Compile With The RSAREF Library."
  713. $ WRITE SYS$OUTPUT " NORSAREF : To Compile With The Regular RSA Library."
  714. $ WRITE SYS$OUTPUT ""
  715. $!
  716. $! Time To EXIT.
  717. $!
  718. $ EXIT
  719. $!
  720. $! End The Valid Arguemnt Check.
  721. $!
  722. $ ENDIF
  723. $!
  724. $! End The P2 Check.
  725. $!
  726. $ ENDIF
  727. $!
  728. $! Check To See If P3 Is Blank.
  729. $!
  730. $ IF (P3.EQS."NODEBUG")
  731. $ THEN
  732. $!
  733. $! P3 Is NODEBUG, So Compile Without Debugger Information.
  734. $!
  735. $ DEBUGGER = "NODEBUG"
  736. $!
  737. $! Else...
  738. $!
  739. $ ELSE
  740. $!
  741. $! Check To See If We Are To Compile With Debugger Information.
  742. $!
  743. $ IF (P3.EQS."DEBUG")
  744. $ THEN
  745. $!
  746. $! Compile With Debugger Information.
  747. $!
  748. $ DEBUGGER = "DEBUG"
  749. $!
  750. $! Else...
  751. $!
  752. $ ELSE
  753. $!
  754. $! Tell The User Entered An Invalid Option..
  755. $!
  756. $ WRITE SYS$OUTPUT ""
  757. $ WRITE SYS$OUTPUT "The Option ",P3," Is Invalid. The Valid Options Are:"
  758. $ WRITE SYS$OUTPUT ""
  759. $ WRITE SYS$OUTPUT " DEBUG : Compile With The Debugger Information."
  760. $ WRITE SYS$OUTPUT " NODEBUG : Compile Without The Debugger Information."
  761. $ WRITE SYS$OUTPUT ""
  762. $!
  763. $! Time To EXIT.
  764. $!
  765. $ EXIT
  766. $!
  767. $! End The Valid Arguement Check.
  768. $!
  769. $ ENDIF
  770. $!
  771. $! End The P3 Check.
  772. $!
  773. $ ENDIF
  774. $!
  775. $! Check To See If P4 Is Blank.
  776. $!
  777. $ IF (P4.EQS."")
  778. $ THEN
  779. $!
  780. $! O.K., The User Didn't Specify A Compiler, Let's Try To
  781. $! Find Out Which One To Use.
  782. $!
  783. $! Check To See If We Have GNU C.
  784. $!
  785. $ IF (F$TRNLNM("GNU_CC").NES."")
  786. $ THEN
  787. $!
  788. $! Looks Like GNUC, Set To Use GNUC.
  789. $!
  790. $ COMPILER = "GNUC"
  791. $!
  792. $! Tell The User We Are Using GNUC.
  793. $!
  794. $ WRITE SYS$OUTPUT "Using GNU 'C' Compiler."
  795. $!
  796. $! End The GNU C Compiler Check.
  797. $!
  798. $ ENDIF
  799. $!
  800. $! Check To See If We Have VAXC Or DECC.
  801. $!
  802. $ IF (F$GETSYI("CPU").GE.128).OR.(F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC")
  803. $ THEN
  804. $!
  805. $! Looks Like DECC, Set To Use DECC.
  806. $!
  807. $ COMPILER = "DECC"
  808. $!
  809. $! Tell The User We Are Using DECC.
  810. $!
  811. $ WRITE SYS$OUTPUT "Using DECC 'C' Compiler."
  812. $!
  813. $! Else...
  814. $!
  815. $ ELSE
  816. $!
  817. $! Looks Like VAXC, Set To Use VAXC.
  818. $!
  819. $ COMPILER = "VAXC"
  820. $!
  821. $! Tell The User We Are Using VAX C.
  822. $!
  823. $ WRITE SYS$OUTPUT "Using VAXC 'C' Compiler."
  824. $!
  825. $! End The DECC & VAXC Compiler Check.
  826. $!
  827. $ ENDIF
  828. $!
  829. $! Else...
  830. $!
  831. $ ELSE
  832. $!
  833. $! Check To See If The User Entered A Valid Paramter.
  834. $!
  835. $ IF (P4.EQS."VAXC").OR.(P4.EQS."DECC").OR.(P4.EQS."GNUC")!.OR.(P4.EQS."LINK")
  836. $ THEN
  837. $!
  838. $! Check To See If The User Wanted To Just LINK.
  839. $!
  840. $ IF (P4.EQS."LINK")
  841. $ THEN
  842. $!
  843. $! Looks Like LINK-only
  844. $!
  845. $ COMPILER = "LINK"
  846. $!
  847. $! Tell The User We Are Only Linking.
  848. $!
  849. $ WRITE SYS$OUTPUT "LINK Only. This actually NOT YET SUPPORTED!"
  850. $!
  851. $! End LINK Check.
  852. $!
  853. $ ENDIF
  854. $!
  855. $! Check To See If The User Wanted DECC.
  856. $!
  857. $ IF (P4.EQS."DECC")
  858. $ THEN
  859. $!
  860. $! Looks Like DECC, Set To Use DECC.
  861. $!
  862. $ COMPILER = "DECC"
  863. $!
  864. $! Tell The User We Are Using DECC.
  865. $!
  866. $ WRITE SYS$OUTPUT "Using DECC 'C' Compiler."
  867. $!
  868. $! End DECC Check.
  869. $!
  870. $ ENDIF
  871. $!
  872. $! Check To See If We Are To Use VAXC.
  873. $!
  874. $ IF (P4.EQS."VAXC")
  875. $ THEN
  876. $!
  877. $! Looks Like VAXC, Set To Use VAXC.
  878. $!
  879. $ COMPILER = "VAXC"
  880. $!
  881. $! Tell The User We Are Using VAX C.
  882. $!
  883. $ WRITE SYS$OUTPUT "Using VAXC 'C' Compiler."
  884. $!
  885. $! End VAXC Check
  886. $!
  887. $ ENDIF
  888. $!
  889. $! Check To See If We Are To Use GNU C.
  890. $!
  891. $ IF (P4.EQS."GNUC")
  892. $ THEN
  893. $!
  894. $! Looks Like GNUC, Set To Use GNUC.
  895. $!
  896. $ COMPILER = "GNUC"
  897. $!
  898. $! Tell The User We Are Using GNUC.
  899. $!
  900. $ WRITE SYS$OUTPUT "Using GNU 'C' Compiler."
  901. $!
  902. $! End The GNU C Check.
  903. $!
  904. $ ENDIF
  905. $!
  906. $! Else The User Entered An Invalid Arguement.
  907. $!
  908. $ ELSE
  909. $!
  910. $! Tell The User We Don't Know What They Want.
  911. $!
  912. $ WRITE SYS$OUTPUT ""
  913. $ WRITE SYS$OUTPUT "The Option ",P4," Is Invalid. The Valid Options Are:"
  914. $ WRITE SYS$OUTPUT ""
  915. $ WRITE SYS$OUTPUT " VAXC : To Compile With VAX C."
  916. $ WRITE SYS$OUTPUT " DECC : To Compile With DEC C."
  917. $ WRITE SYS$OUTPUT " GNUC : To Compile With GNU C."
  918. $ WRITE SYS$OUTPUT ""
  919. $!
  920. $! Time To EXIT.
  921. $!
  922. $ EXIT
  923. $!
  924. $! End The Valid Arguement Check.
  925. $!
  926. $ ENDIF
  927. $!
  928. $! End The P4 Check.
  929. $!
  930. $ ENDIF
  931. $!
  932. $! Time to check the contents of P5, and to make sure we get the correct library.
  933. $!
  934. $ IF P5.EQS."SOCKETSHR" .OR. P5.EQS."MULTINET" .OR. P5.EQS."UCX"
  935. $ THEN
  936. $!
  937. $! Check to see if SOCKETSHR was chosen
  938. $!
  939. $ IF P5.EQS."SOCKETSHR"
  940. $ THEN
  941. $!
  942. $! Set the library to use SOCKETSHR
  943. $!
  944. $ TCPIP_LIB = "[-.VMS]SOCKETSHR_SHR.OPT/OPT"
  945. $!
  946. $! Tell the user
  947. $!
  948. $ WRITE SYS$OUTPUT "Using SOCKETSHR for TCP/IP"
  949. $!
  950. $! Done with SOCKETSHR
  951. $!
  952. $ ENDIF
  953. $!
  954. $! Check to see if MULTINET was chosen
  955. $!
  956. $ IF P5.EQS."MULTINET"
  957. $ THEN
  958. $!
  959. $! Set the library to use UCX emulation.
  960. $!
  961. $ P5 = "UCX"
  962. $!
  963. $! Tell the user
  964. $!
  965. $ WRITE SYS$OUTPUT "Using MultiNet via UCX emulation for TCP/IP"
  966. $!
  967. $! Done with MULTINET
  968. $!
  969. $ ENDIF
  970. $!
  971. $! Check to see if UCX was chosen
  972. $!
  973. $ IF P5.EQS."UCX"
  974. $ THEN
  975. $!
  976. $! Set the library to use UCX.
  977. $!
  978. $ TCPIP_LIB = "[-.VMS]UCX_SHR_DECC.OPT/OPT"
  979. $!
  980. $! Tell the user
  981. $!
  982. $ WRITE SYS$OUTPUT "Using UCX or an emulation thereof for TCP/IP"
  983. $!
  984. $! Done with UCX
  985. $!
  986. $ ENDIF
  987. $!
  988. $! Set the TCPIP_TYPE symbol
  989. $!
  990. $ TCPIP_TYPE = P5
  991. $!
  992. $! Print info
  993. $!
  994. $ WRITE SYS$OUTPUT "TCP/IP library spec: ", TCPIP_LIB
  995. $!
  996. $! Else The User Entered An Invalid Arguement.
  997. $!
  998. $ ELSE
  999. $ IF P5 .NES. ""
  1000. $ THEN
  1001. $!
  1002. $! Tell The User We Don't Know What They Want.
  1003. $!
  1004. $ WRITE SYS$OUTPUT ""
  1005. $ WRITE SYS$OUTPUT "The Option ",P5," Is Invalid. The Valid Options Are:"
  1006. $ WRITE SYS$OUTPUT ""
  1007. $ WRITE SYS$OUTPUT " SOCKETSHR : To link with SOCKETSHR TCP/IP library."
  1008. $ WRITE SYS$OUTPUT " UCX : To link with UCX TCP/IP library."
  1009. $ WRITE SYS$OUTPUT ""
  1010. $!
  1011. $! Time To EXIT.
  1012. $!
  1013. $ EXIT
  1014. $ ELSE
  1015. $!
  1016. $! Set the TCPIP_TYPE symbol
  1017. $!
  1018. $ TCPIP_TYPE = P5
  1019. $ ENDIF
  1020. $!
  1021. $! Done with TCP/IP libraries
  1022. $!
  1023. $ ENDIF
  1024. $!
  1025. $! Special Threads For OpenVMS v7.1 Or Later
  1026. $!
  1027. $! Written By: Richard Levitte
  1028. $! richard@levitte.org
  1029. $!
  1030. $!
  1031. $! Check To See If We Have A Option For P6.
  1032. $!
  1033. $ IF (P6.EQS."")
  1034. $ THEN
  1035. $!
  1036. $! Get The Version Of VMS We Are Using.
  1037. $!
  1038. $ ISSEVEN :=
  1039. $ TMP = F$ELEMENT(0,"-",F$EXTRACT(1,4,F$GETSYI("VERSION")))
  1040. $ TMP = F$INTEGER(F$ELEMENT(0,".",TMP)+F$ELEMENT(1,".",TMP))
  1041. $!
  1042. $! Check To See If The VMS Version Is v7.1 Or Later.
  1043. $!
  1044. $ IF (TMP.GE.71)
  1045. $ THEN
  1046. $!
  1047. $! We Have OpenVMS v7.1 Or Later, So Use The Special Threads.
  1048. $!
  1049. $ ISSEVEN := ,PTHREAD_USE_D4
  1050. $!
  1051. $! End The VMS Version Check.
  1052. $!
  1053. $ ENDIF
  1054. $!
  1055. $! End The P6 Check.
  1056. $!
  1057. $ ENDIF
  1058. $!
  1059. $! Time To RETURN...
  1060. $!
  1061. $ RETURN