! CKVKER.MMS ! Sat Oct 29 14:12:54 1994 ! ! -- MMS description file for building C-Kermit 5A on VMS systems -- ! ! Author: Piet W. Plomp, ICCE, Groningen University, The Netherlands, ! Internet: piet@icce.rug.nl, piet@asterix.icce.rug.nl, October 1992. ! Parts adapted from both ckvker.mak by Terry Kennedy and others, and ! ckvker.com by Lee Tibbert and others. ! Updates for CMU/Tek by Mike Freeman, Bonneville Power Administration, 8/94: ! ! The patches do the following: (1) modify ckvker.mms to build c-Kermit ! 5A(190) (both for shareable and nonshareable C libraries); (2) modify ! ckvker.mms to work with the freeware MMS look-alike MMK (the latter by ! Matt Madison of TGV, INc. and released by him and Hunter Goatley as ! part of their "Mattgoat" software); and (3) modify ckvker.mms to build ! C-Kermit with support for CMU-OpenVMS/IP. I have tested this patched ! file and it works well. ! ! Copyright (C) 1992, 1994, Columbia University. ! ! INSTALLATION NOTES: ! ! Before proceeding, read the instructions below, and also read the file ! ckvker.bwr (the "beware file"). ! - Make sure you have at least 5000 blocks file space available (this ! includes space for the sources). ! - Make sure you have all required sources (ckc*.c, cku*.c, ckv*.c plus ! corresponding ck*.h files as well as ckwart.c and ckcpro.w) in the ! current directory. ! - Rename this file to "DESCRIP.MMS" and put it in the current directory. ! - If you want SHARED LIBRARY SUPPORT (please read NOTES below), ! you must set a global symbol WERMIT_SHARE having any non-empty ! string value (e.g. enter ! WERMIT_SHARE :== "T" ! at the VMS command line prompt before starting MMS). ! If you change your mind and don't want shared library support after all, ! you may delete the symbol by entering ! DEL/SYM/GLO WERMIT_SHARE ! at the VMS prompt. ! - This description file will automatically detect the presence of ! TCP/IP networking products on your system, and builds one of them into ! C-Kermit. ! The following products are recognized (in decreasing order of priority): ! TGV MultiNet TCP/IP, ! Wollongong WIN TCP, ! DEC TCP/IP (UCX) support. ! CMU/Tektronix OpenVMS/IP. ! You may override the automatic detection by setting a global symbol ! net_option, having one of the following string values: ! NET_OPTION :== "NONET" forces omission of network support ! NET_OPTION :== "MULTINET" build with TGV MultiNet ! NET_OPTION :== "WINTCP" build with Wollongong WIN/TCP ! NET_OPTION :== "DEC_TCPIP" build with DEC TCP/IP ! NET_OPTION :== "CMU_TCPIP" build with CMU OpenVMS TCP/IP ! ! The net_option symbol can be deleted by typing ! DEL/SYM/GLO NET_OPTION ! at the VMS prompt. ! ! - You may tailor the defines for the C compiler to meet your own ! requirements. Look at the description before CCDEFS section below ! - Issue: to build: ! MMS WERMIT.EXE ! MMS WERMIT WERMIT.EXE ! MMS CKVCVT CKVCVT.EXE ! MMS ALL both WERMIT.EXE and CKVCVT.EXE ! - set a symbol to the executable as follows: ! WERMIT :== $your$disk:[your.full.path]WERMIT.EXE ! DON'T FORGET THE FIRST '$'. ! Now you can give wermit command-line arguments. ! ! After WERMIT or CKVCVT was built successfully you can run "MMS CLEANUP" ! to remove all .obj files, ckcpro.c and wart.exe. ! ! This description file was developed and tested on a VAX 8650 running ! VMS 5.4, using MMS version 2.5 (type MMS/IDENT to show ! the version and find out if MMS is installed on your VMS system). ! The C-compiler had version 3.2. ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! ! NOTES: ! ! Refer to ckvins.doc for an overview of ways to build C-Kermit for VMS. ! Building C-Kermit for VMS using this file and MMS is just a handy ! alternative. ! It is not meant to be the standard way to build C-Kermit for VMS. ! However, currently only this file offers shared library support. ! ! C-Kermit can also be built for many other systems. ! Refer to ck?ker.mak for details. ! ! This file does not contain support for VMS versions below 5.0 and ! VAX C versions below 3.0. ! ! WARNING: older VMS SHARED LIBRARIES are 'buggy': they may contain ! undocumented public variables that may interfere with kermit's ! own variables. Only the newer ones, that is from VMS version 5.2 ! are reported to be reliable. ! ! If you use shared library support, this description file uses ! a temporary file name "WERSHARE.OPT" as a linker options file ! (this cannot be done through sys$input:, because that is grabbed by MMS). ! After completion all versions of this file will be removed. ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! ! Initialization Section: ! Note: wermit, ckvcvt and all have their own *_first and *_last sections ! (see Dependencies section). There is no .LAST in this file ! .FIRST @ ! echo: write to stdout; tab: some spacing @ echo = "write sys$output" @ tab = " " @ warning = "WARNING: " @ fatal = "FATAL ERROR: " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! ! Macro Section: ! ! CC: use default macro ! ! CCDEFS - ! Some site options you might want to add: ! NOPUSH - Disallow access to DCL from within Kermit. ! NODEBUG - Remove all debugging code to make C-Kermit smaller and faster. ! ! The following site options are used in this file as distributed: ! DYNAMIC - Allocate packet and other buffers dynamically. ! NOJC - Omit Job-Control related code. ! NOSETBUF - Don't make console i/o unbuffered. ! CK_CURSES - Include fullscreen file transfer display. ! KANJI - Include Kanji file transfer translation. ! IFDEBUG - Avoid calls to debug() if debugging not on: faster execution ! but bigger .EXE file. If you don't need debugging, replace ! this by NODEBUG. CCDEFS = - /DEFINE=("DYNAMIC", "NOJC", "NOSETBUF", "CK_CURSES", "KANJI", - "IFDEBUG", - 'net_option,'cc_ver,'vms_ver,'share_opt) CCFLAGS = - /NOLIST/OBJECT=$(MMS$TARGET) /DEBUG/OPTIMIZE $(CCDEFS) - $(MMS$SOURCE) SHAREOPTS = WERSHARE/OPTION OBJECT_MODULES = ckcmai.obj, - ckcfns.obj, ckcfn2.obj, ckcfn3.obj, ckcnet.obj, ckcpro.obj, - ckuusr.obj, ckuus2.obj, ckuus3.obj, ckuus4.obj, ckuus5.obj, - ckuus6.obj, ckuus7.obj, ckuusx.obj, ckuusy.obj, - ckucmd.obj, ckudia.obj, ckuscr.obj, ckuxla.obj, - ckvcon.obj, ckvioc.obj, ckvfio.obj, ckvtio.obj LIBWINTCP = twg$common:[netdist.lib]twglib.olb/library LIBDECTCPIP = sys$library:ucx$ipc.olb/library LIBCMU = cmuip_root:[syslib]libcmu.olb/library !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! ! Rule Section: ! .C.OBJ @ echo tab + "Compiling $(MMS$SOURCE)" @ $(CC) $(CCFLAGS) !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! ! Dependencies Section: ! wermit : ckvker_first wermit_first wermit.exe ckvker_last wermit_last @ continue ckvcvt : ckvker_first ckvcvt_first ckvcvt.exe ckvker_last ckvcvt_last @ continue all : ckvker_first wermit_first wermit.exe ckvcvt_first ckvcvt.exe - ckvker_last all_last @ continue wermit.exe : $(OBJECT_MODULES) @ echo tab + "Linking $(MMS$TARGET_NAME)", - share_text, ", ", net_name, " network support" @ if net_option .eqs. "NONET" .and. share_opt .eqs. "NOVMSSHARE" then - $(LINK) $(LINKFLAGS) - $(OBJECT_MODULES) ! assume lnk$library set @ if net_option .eqs. "NONET" .and. share_opt .eqs. "VMSSHARE" then - $(LINK) $(LINKFLAGS) - $(OBJECT_MODULES), $(SHAREOPTS) @ if net_option .eqs. "MULTINET" then - $(LINK) $(LINKFLAGS) - $(OBJECT_MODULES), $(SHAREOPTS) ! always use options file @ if net_option .eqs. "WINTCP" .and. share_opt .eqs. "NOVMSSHARE" then - $(LINK) $(LINKFLAGS) $(OBJECT_MODULES), - $(LIBWINTCP) ! assume lnk$library set @ if net_option .eqs. "WINTCP" .and. share_opt .eqs. "VMSSHARE" then - $(LINK) $(LINKFLAGS) $(OBJECT_MODULES), $(SHAREOPTS), - $(LIBWINTCP) @ if net_option .eqs. "DEC_TCPIP" .and. share_opt .eqs. "NOVMSSHARE" then - $(LINK) $(LINKFLAGS) $(OBJECT_MODULES), - $(LIBDECTCPIP) ! assume lnk$library set @ if net_option .eqs. "DEC_TCPIP" .and. share_opt .eqs. "VMSSHARE" then - $(LINK) $(LINKFLAGS) $(OBJECT_MODULES), $(SHAREOPTS), - $(LIBDECTCPIP) @ ! Just speculating (pwp 92-10-15); to test comment previous if, then @ ! uncomment next 2 lines and companion section in link section @ ! if net_option .eqs. "DEC_TCPIP" .and. share_opt .eqs. "VMSSHARE" then - ! $(LINK) $(LINKFLAGS) $(OBJECT_MODULES), $(SHAREOPTS) @ if net_option .eqs. "CMU_TCPIP" .and. share_opt .eqs. "NOVMSSHARE" then - $(LINK) $(LINKFLAGS) $(OBJECT_MODULES), - $(LIBCMU) ! assume lnk$library set @ if net_option .eqs. "CMU_TCPIP" .and. share_opt .eqs. "VMSSHARE" then - $(LINK) $(LINKFLAGS) $(OBJECT_MODULES), $(SHAREOPTS), - $(LIBCMU) ckvcvt.exe : ckvcvt.obj @ echo tab + "Linking $(MMS$TARGET_NAME)" @ if share_opt .eqs. "NOVMSSHARE" then - link /exec=ckvcvt.exe ckvcvt.obj ! assume lnk$library logical set @ if share_opt .eqs. "VMSSHARE" then - $(LINK) $(LINKFLAGS) ckvcvt.obj,$(SHAREOPTS) ckvioc.obj : ckvioc.c ckvioc.h ckcdeb.h ckvfio.obj : ckvfio.c ckcdeb.h ckuver.h ckvtio.obj : ckvtio.c ckcdeb.h ckcnet.h ckuver.h ckvcon.obj : ckvcon.c ckcker.h ckcdeb.h ckcasc.h ckcnet.h ckwart.obj : ckwart.c wart.exe : ckwart.obj @ echo tab + "Linking $(MMS$TARGET_NAME)" @ if share_opt .eqs. "NOVMSSHARE" then - link /exec=wart.exe ckwart.obj ! assume lnk$library logical set @ if share_opt .eqs. "VMSSHARE" then - $(LINK) $(LINKFLAGS) ckwart.obj,$(SHAREOPTS) ckcpro.obj : ckcpro.c ckcker.h ckcdeb.h ckcasc.h ckcpro.c : ckcpro.w wart.exe ckcdeb.h ckcasc.h ckcker.h @ echo "WART $(MMS$SOURCE) CKCPRO.C" @ wart = "$" + f$parse("WART.EXE",,,"DEVICE") + - f$parse("WART.EXE",,,"DIRECTORY") + "WART" @ wart ckcpro.w ckcpro.c ckcmai.obj : ckcmai.c ckcker.h ckcdeb.h ckcsym.h ckcasc.h ckcnet.h ckcnet.obj : ckcnet.c ckcker.h ckcdeb.h ckcnet.h ckcfns.obj : ckcfns.c ckcker.h ckcdeb.h ckcsym.h ckcasc.h ckcfn2.obj : ckcfn2.c ckcker.h ckcdeb.h ckcsym.h ckcasc.h ckcfn3.obj : ckcfn3.c ckcker.h ckcdeb.h ckcsym.h ckcasc.h ckuxla.obj : ckuxla.c ckcker.h ckcdeb.h ckcxla.h ckuxla.h ckuusr.obj : ckuusr.c - ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcxla.h ckuxla.h - ckcasc.h ckcnet.h ckuus2.obj : ckuus2.c - ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcxla.h ckuxla.h ckcasc.h ckuus3.obj : ckuus3.c - ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcxla.h ckuxla.h - ckcasc.h ckcnet.h ckuus4.obj : ckuus4.c - ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcxla.h ckuxla.h - ckcasc.h ckcnet.h ckuus5.obj : ckuus5.c - ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcxla.h ckuxla.h ckcasc.h ckuus6.obj : ckuus6.c - ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcasc.h ckuus7.obj : ckuus7.c - ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcxla.h ckuxla.h - ckcasc.h ckcnet.h ckuusx.obj : ckuusx.c ckcker.h ckuusr.h ckcdeb.h ckcasc.h ckuusy.obj : ckuusy.c ckcker.h ckcdeb.h ckcasc.h ckucmd.obj : ckucmd.c ckcasc.h ckucmd.h ckcdeb.h ckudia.obj : ckudia.c ckcker.h ckcdeb.h ckucmd.h ckcasc.h ckuscr.obj : ckuscr.c ckcker.h ckcdeb.h ckcasc.h ckvker_first : @ ! check for the C runtime-library @ ! variable share_opt can get three values: "" (error), @ ! VMSSHARE (shareable lib found), or NOVMSSHARE (Normal lib) @ share_opt = "" ! preset to error (no runtime lib) @ if "''wermit_share'" .and. - f$search("sys$share:vaxcrtl.exe") .nes. "" then - share_opt = "VMSSHARE" ! Shared library support wanted and possible @ if share_opt .eqs. "" .and. - f$search("sys$library:vaxcrtl.olb") .nes. "" - then share_opt = "NOVMSSHARE"! Normal non-shareable library @ if share_opt .eqs. "NOVMSSHARE" then - define lnk$library sys$library:vaxcrtl.olb @ ! abort if neither shareable nor non-shareable run time lib found @ if share_opt .eqs. "" then echo tab + fatal + "No run time library." @ if share_opt .eqs. "" then exit @ ! save pending net_option (may be "") into net_override @ net_override = "''net_option'" @ ! detect and decide on network support -- start with lowest priority @ if f$search("cmuip_root:[syslib]libcmu.olb") .nes. "" then - net_option = "CMU_TCPIP" @ ! next but lowest priority -- may overwrite previous @ if f$search("sys$library:ucx$ipc.olb") .nes. "" then - net_option = "DEC_TCPIP" @ ! next but lowest priority -- may overwrite previous @ if f$search("TWG$COMMON:[NETDIST.LIB]TWGLIB.OLB") .nes. "" then - net_option = "WINTCP" @ ! highest priority -- may overwrit previous @ if f$search("multinet:multinet_socket_library.exe") .nes. "" then - net_option = "MULTINET" @ ! check for override (override automatic detection) @ if net_override .nes. "" then net_option = net_override @ ! if net_option still not set, disable net support @ if "''net_option'" .eqs. "" then net_option = "NONET" @ ! net_option set, now set net_name, describing the product @ if "''net_option'" .eqs. "NONET" then net_name = "no" @ if net_option .eqs. "MULTINET" then net_name = "TGV MultiNet TCP/IP" @ if net_option .eqs. "WINTCP" then net_name = "Wollongong WIN/TCP" @ if net_option .eqs. "DEC_TCPIP" then net_name = "DEC TCP/IP" @ if net_option .eqs. "CMU_TCPIP" then net_name = "CMU-OpenVMS/IP" @ ! if override contained an error, then net_name will not be set @ if "''net_name'" .eqs. "" then - echo tab + fatal , "Invalid net_option ", net_override @ if "''net_name'" .eqs. "" then exit @ ! define some logicals for WINTCP @ if net_option .eqs. "WINTCP" then - define /nolog vaxc$include twg$tcp:[netdist.include],sys$library @ if net_option .eqs. "WINTCP" then - define /nolog sys twg$tcp:[netdist.include.sys] @ ! set linker options file @ wershare_file = "wershare.opt" @ ! set text for banner, default empty string @ share_text = "" @ if share_opt .eqs. "VMSSHARE" then share_text = ", shared library" @ ! open options file, if appropriate @ if share_opt .eqs. "VMSSHARE" .or. net_option .eqs. "MULTINET" then - open/write wermit_opt_file 'wershare_file' ! fail handled by MMS @ if share_opt .eqs. "VMSSHARE" then - write wermit_opt_file "sys$share:vaxcrtl.exe/share" @ if net_option .eqs. "MULTINET" then - write wermit_opt_file "multinet:multinet_socket_library.exe/share" @ ! Just speculating (pwp 92-10-15); @ ! to test uncomment this and companion section in link section @ ! if net_option .eqs. "DEC_TCPIP" then - ! write wermit_opt_file "sys$share:ucx$ipc.exe/share" @ if share_opt .eqs. "VMSSHARE" .or. net_option .eqs. "MULTINET" then - close wermit_opt_file @ ! no need to add WINTCP information to options file @ ! options for shared linking written to options file @ ! detect and decide on operating system version @ _osversion = f$edit(f$getsyi("version"),"compress") @ os_fieldtest = "F" @ if f$extract(0,1,_osversion) .nes. "V" then os_fieldtest = "T" @ if os_fieldtest .eqs. "T" then echo warning + - "You appear to be running a Field Test version of VMS." @ if os_fieldtest .eqs. "T" then echo tab + - "This description file will assume that the operating system" @ if os_fieldtest .eqs. "T" then echo tab + - "version is at least v5.0." @ if os_fieldtest .eqs. "T" then echo "" @ if os_fieldtest .eqs. "T" then _osversion = "V5.0" @ del/sym os_fieldtest @ ! end of if os_fieldtest checks @ _osmajor = 0+f$extract(1,1,_osversion) @ _osminor = 0+f$extract(3,1,_osversion) @ vms_ver = "VMS_V" + f$string(_osmajor) + f$string(_osminor) @ ! detect and decide on C compiler version @ cc_ver = "VAXC030" @ if f$search("sys$library:xabrudef.h") .nes. "" then cc_ver = "VAXC031" @ old_compiler = "F" @ if cc_ver .nes. "VAXC031" then old_compiler = "T" @ if old_compiler .eqs. "T" then echo warning + - "Your system has an older version of the VAX C compiler." @ if old_compiler .eqs. "T" then echo tab + - "VMS C-Kermit was designed to be compiled under VAX C 3.1 or newer." @ if old_compiler .eqs. "T" then echo tab + - "It has not been verified to build properly under this version." @ if old_compiler .eqs. "T" then echo tab + - "Please exercise caution until you've verified proper operation." @ if old_compiler .eqs. "T" then echo "" @ del/sym old_compiler ckvcvt.obj : ckvcvt.c wermit_first : @ echo "Building WERMIT", - share_text, ", ", net_name, " network support", - ", VAX/VMS ", _osversion ckvcvt_first : @ echo "Building CKVCVT", share_text, ", VAX/VMS ", _osversion ckvker_last : @ if f$search(wershare_file) .nes. "" then - del 'wershare_file';* wermit_last : @ echo "WERMIT compilation complete" ckvcvt_last : @ echo "CKVCVT compilation complete" all_last : @ echo "WERMIT and CKVCVT compilation complete" cleanup : @ if f$search("wart.exe") .nes. "" then del wart.exe;* @ if f$search("*.obj") .nes. "" then del *.obj;* @ if f$search("ckcpro.c") .nes. "" then del ckcpro.c;* @ echo "Cleanup done" @ echo "" !! end of ckvker.mms !!