home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / archives / ckc190.zip / ckvaxp.com < prev    next >
Text File  |  1994-11-01  |  9KB  |  249 lines

  1. $ The_Default = F$Environment("DEFAULT")
  2. $ On Control_Y Then Goto The_Exit
  3. $ On Error Then Goto The_Exit
  4. $ hw_arch := "VAX"
  5. $ if (f$getsyi("CPU") .eq. 128)
  6. $ then
  7. $ hw_arch := "''f$getsyi("Arch_Name")'"
  8. $ if ("''hw_arch'" .nes. "Alpha")
  9. $ then
  10. $ if (f$locate("ALPHA", f$edit("''hw_arch'","UPCASE"))-
  11.         .lt. f$length("''hw_arch'"))
  12. $ then
  13. $ hw_arch := "Alpha"
  14. $ else
  15. $ write sys$output "Unknown hardware architecture ''hw_arch'"
  16. $ exit %x10000004
  17. $ endif
  18. $ endif
  19. $ endif
  20. $ cc_ver = "VAXC023"
  21. $ if f$search("sys$library:fscndef.h") .nes. "" then cc_ver = "VAXC024"
  22. $ if f$search("sys$library:ppl$routines.h") .nes. "" then cc_ver = "VAXC030"
  23. $ if f$search("sys$library:xabrudef.h") .nes. "" then cc_ver = "VAXC031"
  24. $ sys_ver = f$edit(f$getsyi("version"),"compress")
  25. $ if f$extract(0,1,sys_ver) .nes. "V"
  26. $ then
  27. $ type sys$input
  28. You appear to be running a Field Test version of VMS. This script will 
  29. assume that the operating system version is at least V5.0. 
  30.  
  31. $ sys_ver = "V5.0"
  32. $ endif
  33. $ sys_maj = 0+f$extract(1,1,sys_ver)
  34. $ sys_min = 0+f$extract(3,1,sys_ver)
  35. $ if sys_maj .lt. 5 then if (sys_min/2)*2 .ne. sys_min then-
  36.     sys_min = sys_min - 1
  37. $ vms_ver = "VMS_V''sys_maj'''sys_min'"
  38. $ if ("''net_option'" .eqs. "")
  39. $ then
  40. $ net_option = "NONET"
  41. $ library_dir = "SYS$LIBRARY"
  42. $ if f$search("SYS$LIBRARY:UCX$IPC.OLB") .nes. ""
  43. $ then
  44. $ net_option = "DEC_TCPIP"
  45. $ endif
  46. $ if f$search("SYS$SHARE:UCX$IPC_SHR.EXE") .nes. ""
  47. $ then
  48. $ net_option = "DEC_TCPIP"
  49. $ endif
  50. $ if f$search("TCPWARE:UCX$IPC.OLB") .nes. ""
  51. $ then
  52. $ net_option = "TCPWARE"
  53. $ library_dir = "TCPWARE"
  54. $ endif
  55. $ if f$search("multinet:multinet_socket_library.exe") .nes. "" then-
  56.       net_option = "MULTINET"
  57. $ if f$search("TWG$COMMON:[NETDIST.LIB]TWGLIB.OLB") .nes. ""
  58. $ then
  59. $ net_option = "WINTCP"
  60. $ define /nolog vaxc$include twg$tcp:[netdist.include],sys$library
  61. $ define /nolog sys twg$tcp:[netdist.include.sys]
  62. $ endif
  63. $ if f$search("multinet:multinet_socket_library.exe") .nes. "" then-
  64.       net_option = "MULTINET"
  65. $ endif
  66. $ if net_option .eqs. "NONET" then net_name = "no"
  67. $ if net_option .eqs. "MULTINET" then net_name = "MultiNet"
  68. $ if net_option .eqs. "WINTCP" then net_name = "WIN/TCP"
  69. $ if net_option .eqs. "DEC_TCPIP"
  70. $ then
  71. $ if (hw_arch .eqs. "Alpha")
  72. $ then
  73. $   net_name = "DEC TCP/IP Services for OpenVMS AXP(tm)"
  74. $ else
  75. $   net_name = "DEC TCP/IP Services for OpenVMS VAX(tm)"
  76. $ endif
  77. $ if net_option .eqs. "TCPWARE"
  78. $ then
  79. $ net_name = "Process Software TCPware"
  80. $ net_option = "DEC_TCPIP"
  81. $ endif
  82. $ if sys_maj .lt. 5
  83. $ then
  84. $ write sys$output "You are running VMS V''sys_ver'."
  85. $ type sys$input
  86. VMS C-Kermit has not been verified to build properly under this version, 
  87. although pre-built versions will run properly. Please exercise caution 
  88. until you have verified proper operation. 
  89.  
  90. $ endif
  91. $ if cc_ver .nes. "VAXC031"
  92. $ then
  93. $ type sys$input
  94. Your system has an older version of the VAX C compiler. VMS C-Kermit was 
  95. designed to be compiled under VAX C V3.1 or newer. It has not been ver- 
  96. ified to build properly under this version, although pre-built versions 
  97. will run properly. Please exercise caution until you have verified proper 
  98. operation. 
  99.  
  100. $ endif
  101. $ VAX_CC: Subroutine
  102. $ On Control_Y Then $exit %x10000004
  103. $ On Warning Then   $exit $status
  104. $ write sys$output "  Compiling ''P1' at ''f$time()"
  105. $ cc/debug/optimize/define=("DYNAMIC", "NOJC", "NOSETBUF", "CK_CURSES", "KANJI",-
  106.   "IFDEBUG", "''net_option'", "''cc_ver'", "''vms_ver'")/obj='P1'.obj 'localopts' 'P1'.c
  107. $ library/replace wermit.olb 'P1'.obj
  108. $ delete 'P1'.obj.*
  109. $ exit
  110. $ EndSubroutine
  111. $ GNU_CC: Subroutine
  112. $ On Control_Y Then $exit %x10000004
  113. $ On Warning Then   $exit $status
  114. $ write sys$output "  Compiling ''P1' at ''f$time()"
  115. $ gcc/optimize/define=("DYNAMIC", "NOJC", "NOSETBUF", "CK_CURSES", "KANJI",-
  116.   "IFDEBUG", "''net_option'", "''cc_ver'", "''vms_ver'")/obj='P1'.obj 'P1'.c
  117. $ library/replace wermit.olb 'P1'.obj
  118. $ delete 'P1'.obj.*
  119. $ exit
  120. $ EndSubroutine
  121. $ ALPHA_CC: Subroutine
  122. $ On Control_Y Then $exit %x10000004
  123. $ On Warning Then   $exit $status
  124. $ write sys$output "  Compiling ''P1' at ''f$time()"
  125. $ cc/'debug'/standard='lint_standard'/'optimize'-
  126.     /define=("DEBUG", "TLOG", "DYNAMIC", "CK_CURSES", "IFDEBUG", "KANJI",-
  127.     "''net_option'", "''cc_ver'", "''vms_ver'") 'P1'
  128. $ exit
  129. $ EndSubroutine
  130. $ axp_cc := "DECC_AXP"
  131. $ if (hw_arch .eqs. "Alpha") then cc_ver = "''axp_cc'"
  132. $ debug  := debug
  133. $ Link_Debug  := nodebug
  134. $ optimize := optimize=level=4
  135. $ lint_standard := VAXC
  136. $ if p1 .eqs. "CKVCVT" then goto do_ckvcvt
  137. $ write sys$output "Rebuilding WERMIT with ''net_name' network support"
  138. $ if f$type(localopts) .eqs. "" then localopts = ""
  139. $ call 'hw_arch'_cc ckvioc
  140. $ call 'hw_arch'_cc ckcfn2
  141. $ call 'hw_arch'_cc ckcfn3
  142. $ call 'hw_arch'_cc ckcfns
  143. $ call 'hw_arch'_cc ckcmai
  144. $ write sys$output "  Compiling CKWART at ''f$time()"
  145. $ cc/debug/optimize/define=("DYNAMIC", "NOJC", "NOSETBUF", "CK_CURSES", "KANJI",-
  146.   "IFDEBUG", "''net_option'", "''cc_ver'", "''vms_ver'")/obj=ckwart.obj 'localopts' ckwart.c
  147. $ write sys$output "  Linking CKWART at ''f$time()"
  148. $ link/map/full/sym/exec=ckwart ckwart.obj, sys$share:vaxcrtl.olb/library
  149. $ purge ckwart.obj
  150. $ write sys$output "Running CKWART at ''f$time()"
  151. $ ckwart = "$" +f$parse("CKWART.EXE",,,"DEVICE") +-
  152.     f$parse("CKWART.EXE",,,"DIRECTORY") + "CKWART"
  153. $ ckwart ckcpro.w ckcpro.c
  154. $ purge ckcpro.c
  155. $ call 'hw_arch'_cc ckcpro
  156. $ call 'hw_arch'_cc ckucmd
  157. $ call 'hw_arch'_cc ckudia
  158. $ call 'hw_arch'_cc ckuscr
  159. $ call 'hw_arch'_cc ckuus2
  160. $ call 'hw_arch'_cc ckuus3
  161. $ call 'hw_arch'_cc ckuus4
  162. $ call 'hw_arch'_cc ckuus5
  163. $ call 'hw_arch'_cc ckuus6
  164. $ call 'hw_arch'_cc ckuus7
  165. $ call 'hw_arch'_cc ckuusr
  166. $ call 'hw_arch'_cc ckuusx
  167. $ call 'hw_arch'_cc ckuusy
  168. $ call 'hw_arch'_cc ckcnet
  169. $ call 'hw_arch'_cc ckvfio
  170. $ call 'hw_arch'_cc ckvtio
  171. $ call 'hw_arch'_cc ckuxla
  172. $ call 'hw_arch'_cc ckvcon
  173. $ write sys$output "  Linking WERMIT at ''f$time()"
  174. $ if (hw_arch .eqs. "Alpha")
  175. $ then
  176. $ if net_option .eqs. "DEC_TCPIP"
  177. $ then
  178. $ link/'link_debug' /exec=wermit.exe-
  179.      ckcmai, ckcfn2, ckcfn3, ckcfns, ckcpro, ckucmd, ckudia,-
  180.     ckuscr, ckuus2, ckuus3, ckuus4, ckuus5, ckuus6, ckuus7,-
  181.     ckuusr, ckuusx, ckuusy, ckuxla, ckvcon, ckcnet, ckvfio,-
  182.     ckvtio, ckvioc, sys$input: /opt
  183. SYS$SHARE:UCX$IPC_SHR.EXE /SHARE
  184. $ else
  185. $ link/'link_debug' /exec=wermit.exe-
  186.      ckcmai, ckcfn2, ckcfn3, ckcfns, ckcpro, ckucmd, ckudia,-
  187.     ckuscr, ckuus2, ckuus3, ckuus4, ckuus5, ckuus6, ckuus7,-
  188.     ckuusr, ckuusx, ckuusy, ckuxla, ckvcon, ckcnet, ckvfio,-
  189.     ckvtio, ckvioc
  190. $ endif
  191. $ else
  192. $ if net_option .eqs. "MULTINET"
  193. $ then
  194. $ link/map/full/sym wermit.olb/library/include=(ckcfn2, ckcfn3, ckcfns,-
  195.     ckcmai, ckcpro, ckucmd, ckudia, ckuscr, ckuus2, ckuus3, ckuus4, ckuus5,-
  196.     ckuus6, ckuus7, ckuusr, ckuxla, ckvcon, ckcnet, ckvfio, ckvtio),-
  197.     sys$share:vaxcrtl.olb/library/exec=wermit.exe, sys$input:/options
  198. multinet:multinet_socket_library.exe/share 
  199. $ else
  200. $ if net_option .eqs. "WINTCP"
  201. $ then
  202. $ link/sym wermit.olb/library/include=(ckcfn2, ckcfn3, ckcfns,-
  203.     ckcmai, ckcpro, ckucmd, ckudia, ckuscr, ckuus2, ckuus3, ckuus4, ckuus5,-
  204.     ckuus6, ckuus7, ckuusr, ckuxla, ckvcon, ckcnet, ckvfio, ckvtio),-
  205.     twg$common:[netdist.lib]twglib.olb/library,-
  206.     sys$share:vaxcrtl.olb/library/exec=wermit.exe
  207. $ else
  208. $ if net_option .eqs. "DEC_TCPIP"
  209. $ then
  210. $ link wermit.olb/exec=wermit.exe/library-
  211.     /include=(ckcfn2, ckcfn3, ckcfns,-
  212.     ckcmai, ckcpro, ckucmd, ckudia, ckuscr, ckuus2, ckuus3, ckuus4, ckuus5,-
  213.     ckuus6, ckuus7, ckuusr, ckuxla, ckvcon, ckcnet, ckvfio, ckvtio, ckvioc),-
  214.     'library_dir':ucx$ipc.olb/library,-
  215.     sys$share:vaxcrtl.olb/library
  216. $ else
  217. $ link/map/full/sym wermit.olb/library/include=(ckcfn2, ckcfn3, ckcfns,-
  218.     ckcmai, ckcpro, ckucmd, ckudia, ckuscr, ckuus2, ckuus3, ckuus4, ckuus5,-
  219.     ckuus6, ckuus7, ckuusr, ckuxla, ckvcon, ckcnet, ckvfio, ckvtio),-
  220.     sys$share:vaxcrtl.olb/library/exec=wermit.exe
  221. $ endif
  222. $ endif
  223. $ endif
  224. $ endif
  225. $ set file/protection=(g:re,w:re) wermit.exe
  226. $ write sys$output "Done rebuilding WERMIT"
  227. $ do_ckvcvt:
  228. $ write sys$output "Rebuilding CKVCVT"
  229. $ write sys$output "  Compiling CKVCVT at ''f$time()"
  230. $ if (hw_arch .eqs. "Alpha")
  231. $ then
  232. $ cc /debug/optimize/define=("DYNAMIC", "NOJC","NOSETBUF", "CK_CURSES", "KANJI",-
  233.   "IFDEBUG", "''net_option'","''cc_ver'", "''vms_ver'") /obj=ckvcvt.obj -
  234.   'localopts' /standard='lint_standard' ckvcvt.c
  235. $ else
  236. $ cc/debug/optimize/define=("DYNAMIC", "NOJC", "NOSETBUF", "CK_CURSES", "KANJI",-
  237.   "IFDEBUG", "''net_option'", "''cc_ver'", "''vms_ver'")/obj=ckvcvt.obj -
  238.  'localopts' ckvcvt.c
  239. $ endif
  240. $ write sys$output "  Linking CKVCVT at ''f$time()"
  241. $ link/map/full/sym/exec=ckvcvt ckvcvt.obj, sys$share:vaxcrtl.olb/library
  242. $ set file/protection=(g:re,w:re) ckvcvt.exe
  243. $ purge ckvcvt.obj
  244. $ write sys$output "Done rebuilding CKVCVT"
  245. $The_Exit:
  246. $ Save_Status = $STATUS
  247. $ Set Default 'The_Default'
  248. $ exit Save_Status
  249.