! MAKEFILE for VMS C-Kermit (WERMIT) and labeled file decoded (CKVCVT) ! ! Written by Terry Kennedy, 13-Apr-1991 ! ! Revision history: ! ! 13-Apr-1991 - tmk - Original version ! ! Site dependencies - these may need to be changed. Don't fiddle with the ! net_option, cc_ver, or vms_ver fields - they are auto- ! magicly set up for you when this is executed. ! siteopts = /define=("DEBUG","TLOG","DYNAMIC", \ "''net_option'", "''cc_ver'", "''vms_ver'") ! ! Compiler and linker options ! link_switches = /map/full/sym library_switches = /replace cc_switches = /list/debug/optimize ! unconditional_relink = makefile. ! ! Uncomment the next line to force unconditional relinking ! ! unconditional_relink = dummy_target ! ! Define the master target list - these can be rebuilt on any system that ! has VAX C. ! all : wermit \ ckvcvt ! wermit : check_stuff \ wermit_start \ wermit.exe write sys$output "Done rebuilding WERMIT" ! ckvcvt : check_stuff \ ckvcvt_start \ ckvcvt.exe write sys$output "Done rebuilding CKVCVT" ! ! And here are the individual targets ! check_stuff : cc_ver = "VAXC023" if f$search("sys$library:fscndef.h") .nes. "" then cc_ver = "VAXC024" if f$search("sys$library:ppl$routines.h") .nes. "" then cc_ver = "VAXC030" if f$search("sys$library:xabrudef.h") .nes. "" then cc_ver = "VAXC031" sys_ver = f$edit(f$getsyi("version"),"compress") if f$extract(0,1,sys_ver) .nes. "V" then type sys$input You appear to be running a Field Test version of VMS. This script will $ assume that the operating system version is at least V5.0. $ $ sys_ver = "V5.0" endif sys_maj = 0+f$extract(1,1,sys_ver) sys_min = 0+f$extract(3,1,sys_ver) if sys_maj .lt. 5 then if (sys_min/2)*2 .ne. sys_min then \ sys_min = sys_min - 1 vms_ver = "VMS_V''sys_maj'''sys_min'" net_option = "NONET" if f$search("multinet:multinet_socket_library.exe") .nes. "" then \ net_option = "MULTINET" if net_option .eqs. "NONET" then net_name = "no" if net_option .eqs. "MULTINET" then net_name = "MultiNet" if sys_maj .lt. 5 then write sys$output "You are running VMS V''sys_ver'." type sys$input VMS C-Kermit has not been verified to build properly under this version, $ although pre-built versions will run properly. Please exercise caution $ until you have verified proper operation. $ $ endif if cc_ver .nes. "VAXC031" then type sys$input Your system has an older version of the VAX C compiler. VMS C-Kermit was $ designed to be compiled under VAX C V3.1 or newer. It has not been ver- $ ified to build properly under this version, although pre-built versions $ will run properly. Please exercise caution until you have verified proper $ operation. $ $ endif ! wermit_start : write sys$output "Rebuilding WERMIT with ''net_name' network support" ! ckvcvt_start : write sys$output "Rebuilding CKVCVT" ! dummy_target : write sys$output "" ! wermit.olb : if f$search("wermit.olb") .eqs. "" then libr/create/object wermit.olb ! wermit.exe : wermit.olb(ckcfn2) \ wermit.olb(ckcfn3) wermit.olb(ckcfns) wermit.olb(ckcmai) \ wermit.olb(ckcpro) wermit.olb(ckucmd) wermit.olb(ckudia) \ wermit.olb(ckuscr) wermit.olb(ckuus2) wermit.olb(ckuus3) \ wermit.olb(ckuus4) wermit.olb(ckuus5) wermit.olb(ckuus6) \ wermit.olb(ckuusr) wermit.olb(ckuusx) wermit.olb(ckuusy) \ wermit.olb(ckcnet) wermit.olb(ckvfio) wermit.olb(ckvtio) \ wermit.olb(ckuxla) wermit.olb(ckvcon) \ $(unconditional_relink) write sys$output " Linking WERMIT" if net_option .eqs. "MULTINET" then link$(link_switches) wermit.olb/library/include=(ckcfn2, ckcfn3, ckcfns, \ ckcmai, ckcpro, ckucmd, ckudia, ckuscr, ckuus2, ckuus3, ckuus4, ckuus5, \ ckuus6, ckuusr, ckuxla, ckvcon, ckcnet, ckvfio, ckvtio), \ sys$share:vaxcrtl.olb/library/exec=wermit.exe, sys$input:/options multinet:multinet_socket_library.exe/share $ else link$(link_switches) wermit.olb/library/include=(ckcfn2, ckcfn3, ckcfns, \ ckcmai, ckcpro, ckucmd, ckudia, ckuscr, ckuus2, ckuus3, ckuus4, ckuus5, \ ckuus6, ckuusr, ckuxla, ckvcon, ckcnet, ckvfio, ckvtio), \ sys$share:vaxcrtl.olb/library/exec=wermit.exe endif ! ! First, make sure we have a current CKWART ! ckwart.exe : ckwart.c write sys$output " Compiling CKWART" cc$(cc_switches)$(siteopts)/obj=ckwart.obj ckwart.c write sys$output " Linking CKWART" link$(link_switches)/exec=ckwart ckwart.obj, sys$share:vaxcrtl.olb/library purge ckwart.obj ! ! Next, see if CKCPRO.C is current ! ckcpro.c : ckcpro.w \ ckwart.exe ckcdeb.h ckcasc.h ckcker.h write sys$output "Running CKWART" ckwart = "$" +f$parse("CKWART.EXE",,,"DEVICE") + \ f$parse("CKWART.EXE",,,"DIRECTORY") + "CKWART" ckwart ckcpro.w ckcpro.c purge ckcpro.c ! wermit.olb(ckcfn2) : ckcfn2.c \ ckcker.h ckcdeb.h ckcsym.h ckcasc.h ckcxla.h ckuxla.h write sys$output " Compiling CKCFN2" cc$(cc_switches)$(siteopts)/obj=ckcfn2.obj ckcfn2.c library$(library_switches) wermit.olb ckcfn2.obj delete ckcfn2.obj.* ! wermit.olb(ckcfn3) : ckcfn3.c \ ckcker.h ckcdeb.h ckcsym.h ckcasc.h ckcxla.h ckuxla.h write sys$output " Compiling CKCFN3" cc$(cc_switches)$(siteopts)/obj=ckcfn3.obj ckcfn3.c library$(library_switches) wermit.olb ckcfn3.obj delete ckcfn3.obj.* ! wermit.olb(ckcfns) : ckcfns.c \ ckcker.h ckcdeb.h ckcsym.h ckcasc.h ckcxla.h ckuxla.h write sys$output " Compiling CKCFNS" cc$(cc_switches)$(siteopts)/obj=ckcfns.obj ckcfns.c library$(library_switches) wermit.olb ckcfns.obj delete ckcfns.obj.* ! wermit.olb(ckcmai) : ckcmai.c \ ckcker.h ckcdeb.h ckcsym.h ckcasc.h ckcnet.h write sys$output " Compiling CKCMAI" cc$(cc_switches)$(siteopts)/obj=ckcmai.obj ckcmai.c library$(library_switches) wermit.olb ckcmai.obj delete ckcmai.obj.* ! wermit.olb(ckcpro) : ckcpro.c \ ckcker.h ckcdeb.h ckcasc.h write sys$output " Compiling CKCPRO" cc$(cc_switches)$(siteopts)/obj=ckcpro.obj ckcpro.c library$(library_switches) wermit.olb ckcpro.obj delete ckcpro.obj.* ! wermit.olb(ckucmd) : ckucmd.c \ ckcasc.h ckucmd.h ckcdeb.h write sys$output " Compiling CKUCMD" cc$(cc_switches)$(siteopts)/obj=ckucmd.obj ckucmd.c library$(library_switches) wermit.olb ckucmd.obj delete ckucmd.obj.* ! wermit.olb(ckudia) : ckudia.c \ ckcker.h ckcdeb.h ckucmd.h ckcasc.h write sys$output " Compiling CKUDIA" cc$(cc_switches)$(siteopts)/obj=ckudia.obj ckudia.c library$(library_switches) wermit.olb ckudia.obj delete ckudia.obj.* ! wermit.olb(ckuscr) : ckuscr.c \ ckcker.h ckcdeb.h ckcasc.h write sys$output " Compiling CKUSCR" cc$(cc_switches)$(siteopts)/obj=ckuscr.obj ckuscr.c library$(library_switches) wermit.olb ckuscr.obj delete ckuscr.obj.* ! wermit.olb(ckuus2) : ckuus2.c \ ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcxla.h ckuxla.h \ ckcasc.h write sys$output " Compiling CKUUS2" cc$(cc_switches)$(siteopts)/obj=ckuus2.obj ckuus2.c library$(library_switches) wermit.olb ckuus2.obj delete ckuus2.obj.* ! wermit.olb(ckuus3) : ckuus3.c \ ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcxla.h ckuxla.h \ ckcasc.h ckcnet.h write sys$output " Compiling CKUUS3" cc$(cc_switches)$(siteopts)/obj=ckuus3.obj ckuus3.c library$(library_switches) wermit.olb ckuus3.obj delete ckuus3.obj.* ! wermit.olb(ckuus4) : ckuus4.c \ ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcxla.h ckuxla.h \ ckcasc.h ckcnet.h write sys$output " Compiling CKUUS4" cc$(cc_switches)$(siteopts)/obj=ckuus4.obj ckuus4.c library$(library_switches) wermit.olb ckuus4.obj delete ckuus4.obj.* ! wermit.olb(ckuus5) : ckuus5.c \ ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcasc.h write sys$output " Compiling CKUUS5" cc$(cc_switches)$(siteopts)/obj=ckuus5.obj ckuus5.c library$(library_switches) wermit.olb ckuus5.obj delete ckuus5.obj.* ! wermit.olb(ckuus6) : ckuus6.c \ ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcasc.h write sys$output " Compiling CKUUS6" cc$(cc_switches)$(siteopts)/obj=ckuus6.obj ckuus6.c library$(library_switches) wermit.olb ckuus6.obj delete ckuus6.obj.* ! wermit.olb(ckuusr) : ckuusr.c \ ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcxla.h ckuxla.h \ ckcasc.h ckcnet.h write sys$output " Compiling CKUUSR" cc$(cc_switches)$(siteopts)/obj=ckuusr.obj ckuusr.c library$(library_switches) wermit.olb ckuusr.obj delete ckuusr.obj.* ! wermit.olb(ckuusx) : ckuusx.c \ ckcker.h ckuusr.h ckcdeb.h ckcasc.h write sys$output " Compiling CKUUSX" cc$(cc_switches)$(siteopts)/obj=ckuusx.obj ckuusx.c library$(library_switches) wermit.olb ckuusx.obj delete ckuusx.obj.* ! wermit.olb(ckuusy) : ckuusy.c \ ckcker.h ckcdeb.h ckcasc.h write sys$output " Compiling CKUUSY" cc$(cc_switches)$(siteopts)/obj=ckuusy.obj ckuusy.c library$(library_switches) wermit.olb ckuusy.obj delete ckuusy.obj.* ! wermit.olb(ckuxla) : ckuxla.c \ ckcker.h ckcdeb.h ckcxla.h ckuxla.h write sys$output " Compiling CKUXLA" cc$(cc_switches)$(siteopts)/obj=ckuxla.obj ckuxla.c library$(library_switches) wermit.olb ckuxla.obj delete ckuxla.obj.* ! wermit.olb(ckvcon) : ckvcon.c \ ckcdeb.h ckcasc.h ckcker.h ckcnet.h ckvvms.h ckcxla.h write sys$output " Compiling CKVCON" cc$(cc_switches)$(siteopts)/obj=ckvcon.obj ckvcon.c library$(library_switches) wermit.olb ckvcon.obj delete ckvcon.obj.* ! wermit.olb(ckcnet) : ckcnet.c \ ckcdeb.h ckcker.h ckcnet.h write sys$output " Compiling CKCNET" cc$(cc_switches)$(siteopts)/obj=ckcnet.obj ckcnet.c library$(library_switches) wermit.olb ckcnet.obj delete ckcnet.obj.* ! wermit.olb(ckvfio) : ckvfio.c \ ckcdeb.h ckcasc.h ckcker.h ckvvms.h write sys$output " Compiling CKVFIO" cc$(cc_switches)$(siteopts)/obj=ckvfio.obj ckvfio.c library$(library_switches) wermit.olb ckvfio.obj delete ckvfio.obj.* ! wermit.olb(ckvtio) : ckvtio.c \ ckcdeb.h ckcasc.h ckcker.h ckvvms.h write sys$output " Compiling CKVTIO" cc$(cc_switches)$(siteopts)/obj=ckvtio.obj ckvtio.c library$(library_switches) wermit.olb ckvtio.obj delete ckvtio.obj.* ! ckvcvt.exe : ckvcvt.c write sys$output " Compiling CKVCVT" cc$(cc_switches)$(siteopts)/obj=ckvcvt.obj ckvcvt.c write sys$output " Linking CKVCVT" link$(link_switches)/exec=ckvcvt ckvcvt.obj, sys$share:vaxcrtl.olb/library purge ckvcvt.obj ! ! All done... !