$ save_ver = 'f$verify(0)' $! $ PUBLIC_DOMAIN_NOTICE: $! $! Copyright (c) 1996 David P. Murphy for Datametrics Systems Corporation --- $! please send all comments and bug reports to murphy@connor.datametrics.com $! $! Permission is granted to any individual or institution to use, copy, or $! redistribute this software so long as all of the original files are included, $! that it is not sold for profit, and that this copyright notice is retained. $! Use at your own risk. Neither Murphy nor Datametrics assumes responsibility. $! Do not taunt Happy Fun Ball. $! $ where = f$environment("DEFAULT") $ fs = f$environment("PROCEDURE") $ path = f$parse(fs,,,"DEVICE") + f$parse(fs,,,"DIRECTORY") $ set default 'path' $! $ isvax = f$getsyi("CPU") .lt. 128 $ isaxp = f$getsyi("CPU") .ge. 128 $! $ if p2 .eqs. "DEBUG" $ then $ cc_opts := /debug /nolist /nooptimize $ mar_opts := /debug /nolist $ link_opts := /trace /debug /nomap $ else $ cc_opts := /nodebug /nolist /optimize $ mar_opts := /nodebug /nolist $ link_opts := /notrace /nodebug /map /full /cross $ endif $ if isaxp then cc_opts = cc_opts + "/PREFIX_LIBRARY_ENTRIES=ALL_ENTRIES" $! $ if isvax then fx1 = "moot" $ if isaxp then fx1 = "" $ fx2 = "" $ fx3 = "" $ fx4 = "" $ fx5 = "" $ if p1 .nes. "FORCE_COMPILE" $ then $ if isvax then prefix = "VAX" $ if isaxp then prefix = "AXP" $ if f$search("*.''prefix'_OBJ") .nes. "" then copy /nolog *.'prefix'_obj *.obj;0 $ if isaxp then fx1 = f$search("MIKE.OBJ") $ fx2 = f$search("SHERLOCK.OBJ") $ fx3 = f$search("HOLMESTEST.OBJ") $ fx4 = f$search("MYCROFT.OBJ") $ fx5 = f$search("DPMDEF.MLB") $ endif $ if fx1 .eqs. "" .or. fx2 .eqs. "" .or. fx3 .eqs. "" .or. fx4 .eqs. "" $ then $ write sys$output "compiling..." $ if fx1 .eqs. "" then cc 'cc_opts' mike.c + sys$library:sys$lib_c.tlb /library $ if fx2 .eqs. "" then cc 'cc_opts' sherlock.c $ if fx3 .eqs. "" then cc 'cc_opts' holmestest.c $ if fx4 .eqs. "" $ then $ if fx5 .eqs. "" then library /nolog /create /macro dpmdef.mlb dpmdef.mar,icbdef.mar $ macro 'mar_opts' mycroft.mar $ endif $ endif $! $ write sys$output "linking MYCROFT..." $ open /write optchan mycroft.opt $ write optchan "name=""MYCROFT""" $ write optchan "ident=""V1.0""" $ write optchan "gsmatch=LEQUAL,1,0" $ if isvax $ then $ write optchan "universal=MH_GetChannelInfo" $ write optchan "universal=MH_GetLockInfo" $ write optchan "universal=MH_GetTimerInfo" $ write optchan "cluster=$$$transfer_vector,,,mycroft.obj" $ write optchan "sys$system:sys.stb/select" $ else $ write optchan "symbol_vector=(MH_GetChannelInfo=procedure)" $ write optchan "symbol_vector=(MH_GetLockInfo=procedure)" $ write optchan "symbol_vector=(MH_GetTimerInfo=procedure)" $ write optchan "mycroft.obj" $ write optchan "mike.obj" $ write optchan "psect_attr=USER_SERVICES,VEC,NOWRT,NOEXE" $ write optchan "collect=PLV,USER_SERVICES" $ link_opts = link_opts + " /SYSEXE=SELECTIVE" $ endif $ close optchan $ link 'link_opts' /share=mycroft /protect /nosysshr mycroft.opt/opt $ mikefs = f$search("MYCROFT.EXE;0") $ if mikefs .eqs. "" then goto CLEANUP $! $ write sys$output "linking SHERLOCK..." $ open /write optchan sherlock.opt $ write optchan "name=""SHERLOCK""" $ write optchan "ident=""V1.0""" $ if isvax $ then $ write optchan "universal=SH_Show" $ write optchan "universal=SH_Interactive" $ else $ write optchan "symbol_vector=(SH_Show = procedure)" $ write optchan "symbol_vector=(SH_Interactive = procedure)" $ endif $ write optchan "sherlock.obj" $ write optchan "mycroft_holmes/share" $ if isvax then write optchan "sys$share:vaxcrtl/share" $ write optchan "gsmatch=LEQUAL,1,0" $ write optchan "psect_attr=$CHAR_STRING_CONSTANTS,SHR,NOWRT" $ close optchan $ define /user mycroft_holmes 'mikefs' $ link 'link_opts' /share=sherlock.exe sherlock.opt/opt $ sherfs = f$search("SHERLOCK.EXE;0") $ if sherfs .eqs. "" then goto CLEANUP $! $ write sys$output "linking HOLMESTEST..." $ open /write optchan holmestest.opt $ write optchan "name=""HOLMESTEST""" $ write optchan "ident=""V1.0""" $ write optchan "holmestest.obj" $ if isvax then write optchan "sys$share:vaxcrtl/share" $ write optchan "psect_attr=$CHAR_STRING_CONSTANTS,SHR,NOWRT" $ close optchan $ link 'link_opts' /exe=holmestest.exe holmestest.opt/opt $! $ write sys$output "all done." $! $ CLEANUP: $ if p3 .nes. "KEEP" $ then $ call DELETE_FILE sherlock.obj $ call DELETE_FILE sherlock.opt $ call DELETE_FILE mike.obj $ call DELETE_FILE mycroft.obj $ call DELETE_FILE mycroft.opt $ call DELETE_FILE dpmdef.mlb $ call DELETE_FILE holmestest.obj $ call DELETE_FILE holmestest.opt $ endif $! $ LEAVE: $ set default 'where' $ exit 1 + 0 * f$verify(save_ver) $! $ DELETE_FILE: $ subroutine $ if f$search(p1) .nes. "" then delete /nolog 'p1';* $ exit 1 $ endsubroutine