$ set noverify $! Makefile for all programs in cprog directory $ stdir = f$environment("DEFAULT") $ iflg = 0 $ doall = "" $! $ arch = f$getsyi("arch_name") $ if arch .eqs. "Alpha" $ then $ FOR := fortran/nolist/nowarn/assume=(dummy_aliases) $ deass sys$output $ write sys$output "Assuming DEC Fortran" $ else $ deass sys$output $ for:=fortran/nolist/nowarn $ endif $ lin:=link/nomap $ cprog $ $! We should check whether we're using DEC C (as opposed to VAX C) to $! know whether to link against vaxcrtl. The only foolproof way seems $! to be actually to run the thing... (This can be overridden by editing $! the makefile at the $!** line.) C is only relevant for pltdev and $! procheck/nb. $ write sys$output "Testing for DEC C..." $ ass/nolog nl: sys$output $ cc/prep=cc.tmp sys$input __DECC $ search cc.tmp __DECC $ if $severity .eq. 1 $ then c := VAXC $ else c := decc $ endif $ deass sys$output $ del cc.tmp; $! $! manual override $!** c := VAXC or c := decc $ $! $! If override is a paramerter then all sources will be compiled. $! Useful if you change the libraries. $! If you specify a program the program will be compiled. If RSPS, DM, STEREO $! and PROCHECK are parameters the '.F' is not required. $! eg @makefile watpeak.f $! @makefile dm $! $ if p1 .nes. "" $ then $ doall=f$extract(0,4,p1) $ if doall.eqs."OVER" then goto NEXT $ iflg = 1 $ doall = "OVER" $ if p1 .eqs. "RSPS" then goto STRSPS $ if p1 .eqs. "DM" then goto STDM $ if p1 .eqs. "DMMULTI" then goto STDMMULTI $ if p1 .eqs. "STEREO" then goto STSTER $ if p1 .eqs. "PROCHECK" then goto STPRO $ if p1 .eqs. "SOLOMON" then goto STSOL $ if p1 .eqs. "REFMAC5" then goto STMAC $ if p1 .eqs. "LIBCHECK" then goto STMAC $ if p1 .eqs. "MOLREP" then goto STMOLR $ if p1 .eqs. "SFCHECK" then goto STSFCH $ if p1 .eqs. "TOPP" then goto STTOPP $ if p1 .eqs. "FFFEAR" then goto STFFFEAR $ if p1 .eqs. "MAPMASK.F" then set def [.mapmask_] $ if p1 .eqs. "NCSMASK.F" then set def [.ncsmask_] $ if p1 .eqs. "SC.F" then set def [.sc_] $ if p1 .eqs. "SCALA.F" then set def [.scala_] $ if p1 .eqs. "SFTOOLS.F" then set def [.sftools_] $ if p1 .eqs. "DYNDOM.F" then set def [.dyndom_] $ if p1 .eqs. "TOPLIST.F" then set def [.topp_] $ if p1 .eqs. "PDBHTF.C" then set def [.topp_] $ if p1 .eqs. "RESTRAIN.F" then set def [.restrain_] $ if p1 .eqs. "TLSANL.F" then set def [.restrain_] $ if p1 .eqs. "RDENT.F" then set def [.restrain_] $ if p1 .eqs. "MAPROT.F" then set def [.maprot_] $ if p1 .eqs. "ARP_WARP.F" then set def [.arp_warp_] $ if p1 .eqs. "PREFORM.F" then set def [.arp_warp_] $ if p1 .eqs. "PREPSHEL.F" then set def [.arp_warp_] $ if p1 .eqs. "T_SHIFT.F" then set def [.arp_warp_] $ if p1 .eqs. "COMBAT.F" then set def [.combat_] $ f=p1 $ gosub make $ goto END $ endif $! $! First compile all fortran programs $! $ NEXT: $ f=f$search("*.f",1) $ if f.nes."" $ then $ gosub make $ goto NEXT $ endif $! $ STRSPS: $ set def ccp4_master:[ccp4.src.rsps_] $ if f$search("cbin:rsps.exe").nes."" $ then $ if doall.eqs."OVER" then goto RSPS2 $ RSPS1: $ f=f$search("*.f",2) $ if f.eqs."" $ then $ write sys$output f$fao("!(12AS) is up to date.","RSPS") $ goto RSPSEND $ endif $ if f$cvtime(f$file(f,"CDT")).lts.- f$cvtime(f$file("cbin:rsps.exe","CDT")) then goto RSPS1 $ endif $! $ RSPS2: $ WRITE SYS$OUTPUT "Compiling RSPS" $ for rsps.f,errlib.f,veclib.f,forlib.f,hlptxt.f $ ON ERROR THEN CONTINUE ! esp. if programs are too big too link... $ link/nomap/exe=cbin:rsps rsps,errlib,veclib,forlib,hlptxt,ccp4_lib:libccp4/l $ delete *.obj;* $ RSPSEND: $ if iflg .eq. 1 then goto END $! $ STDM: $ set def ccp4_master:[ccp4.src.dm_] $ if f$search("cbin:dm.exe").nes."" $ then $ if doall.eqs."OVER" then goto DM2 $ DM1: $ f=f$search("*.f",2) $ if f.eqs."" $ then $ write sys$output f$fao("!(12AS) is up to date.","DM") $ goto DMEND $ endif $ if f$cvtime(f$file(f,"CDT")).lts.f$cvtime(f$file("cbin:dm.exe","CDT")) - then goto DM1 $ endif $! $ DM2: $ WRITE SYS$OUTPUT "Compiling DM" $ for denmod.f,dmaver.f,dmlib.f,dmmain.f,fftkdc.f,maptree.f,mathkdc.f,- phcomb.f,xtlkdc.f,freemask.f,ncsautomask.f,gamma.f $ ON ERROR THEN CONTINUE ! esp. if programs are too big too link... $ link/nomap/exe=cbin:dm denmod,dmaver,dmlib,dmmain,fftkdc,maptree,- mathkdc,phcomb,xtlkdc,freemask,ncsautomask,gamma,ccp4_lib:libccp4/l $ delete *.obj;* $ DMEND: $ if iflg .eq. 1 then goto END $! $ STDMMULTI: $ set def ccp4_master:[ccp4.src.dmmulti_] $ if f$search("cbin:dmmulti.exe").nes."" $ then $ if doall.eqs."OVER" then goto DMMULTI2 $ DMMULTI1: $ f=f$search("*.f",2) $ if f.eqs."" $ then $ write sys$output f$fao("!(12AS) is up to date.","DMMULTI") $ goto DMMULTIEND $ endif $ if f$cvtime(f$file(f,"CDT")).lts.f$cvtime(f$file("cbin:dmmulti.exe","CDT")) - then goto DMMULTI1 $ endif $! $ DMMULTI2: $ WRITE SYS$OUTPUT "Compiling DMMULTI" $ for dmmulti_denmod.f,dmmulti_dmaver.f,dmmulti_dmlib.f,dmmulti.f,- dmmulti_fftkdc.f,dmmulti_maptree.f,dmmulti_mathkdc.f,- dmmulti_phcomb.f,dmmulti_xtlkdc.f $ ON ERROR THEN CONTINUE ! esp. if programs are too big too link... $ link/nomap/exe=cbin:dmmulti dmmulti_denmod,dmmulti_dmaver,dmmulti_dmlib,- dmmulti,dmmulti_fftkdc,dmmulti_maptree,- dmmulti_mathkdc,dmmulti_phcomb,dmmulti_xtlkdc,ccp4_lib:libccp4/l $ delete *.obj;* $ DMMULTIEND: $ if iflg .eq. 1 then goto END $! $ STSOL: $ set def ccp4_master:[ccp4.src.solomon_] $ if f$search("cbin:solomon.exe").nes."" $ then $ if doall.eqs."OVER" then goto SOL3 $ SOL1: $ f=f$search("*.f",2) $ if f.eqs."" then goto SOL2 $ if f$cvtime(f$file(f,"CDT")).gts.- f$cvtime(f$file("cbin:solomon.exe","CDT")) then goto SOL3 $ goto SOL1 $! $ SOL2: $ f=f$search("*.c",2) $ if f.eqs."" $ then $ write sys$output f$fao("!(12AS) is up to date.","SOLOMON") $ goto SOLEND $ endif $ if f$cvtime(f$file(f,"CDT")).lts.- f$cvtime(f$file("cbin:solomon.exe","CDT")) then goto SOL2 $ endif $ SOL3: $ WRITE SYS$OUTPUT "Compiling SOLOMON" $ for cmap_f.f,solmain.f $ cc/names=as_is/include=(CLIBS,[])/define=PROTOTYPE - solomon.c,cmap_io.c,matrix.c,cmap_calc.c,cmsk_io.c $ ON ERROR THEN CONTINUE ! esp. if programs are too big too link... $ link/nomap/exe=cbin:solomon.exe solomon,solmain,cmap_io,cmsk_io,matrix,- cmap_calc,cmap_f,ccp4_lib:libccp4/l $ delete *.obj;* $ SOLEND: $ if iflg .eq. 1 then goto END $ $ STSTER: $ set def ccp4_master:[ccp4.src.stereo_] $ if f$search("cbin:stereo.exe").nes."" $ then $ if doall.eqs."OVER" then goto STER2 $ STER1: $ f=f$search("*.f",2) $ if f.eqs."" $ then $ write sys$output f$fao("!(12AS) is up to date.","STEREO") $ goto STEREND $ endif $ if f$cvtime(f$file(f,"CDT")).lts.- f$cvtime(f$file("cbin:stereo.exe","CDT")) then goto STER1 $ endif $! $ STER2: $ for astereo.f, central.f, lineq1, helix.f, refine.f $ ON ERROR THEN CONTINUE ! esp. if programs are too big too link... $ lin/exe=cbin:stereo.exe astereo,central,lineq1,helix,refine,- ccp4_lib:libccp4/l $ delete *.obj;* $ STEREND: $ if iflg .eq. 1 then goto END $! $ STMAC: $ set def ccp4_master:[ccp4.src.refmac5_] $ if f$search("cbin:refmac5.exe").nes."" $ then $ if doall.eqs."OVER" then goto MAC2 $ MAC1: $ f=f$search("*.f",2) $ if f.eqs."" $ then $ write sys$output f$fao("!(12AS) is up to date.","REFMAC5") $ goto MACEND $ endif $ if f$cvtime(f$file(f,"CDT")).lts.- f$cvtime(f$file("cbin:refmac5.exe","CDT")) then goto MAC1 $ endif $! $ MAC2: $ for refmac_newdic,solvent_contr_rob,hkon_scale,subvag,- lsq_newdic_rest,oppro_newdic_rest,- rcard_scale,subcf_scale1,subag_scale,- extra_newdic_scale,sigandscale,- rigid_body_newdic,aniso_refi_hd1,linalgebra,- make_subr_refmac,tls_newdic,vdw_list_newdic,- make_rst,makecif,make_refmac_dummy,- ls_scaling,interpolate,rharvest,newentry_idealise,- make_subr,make_lib,make_PDB,make_CIF,make_new,make_crd,- main_libcheck,make_subr_2,libcheck,make_DPDB,- make_set_path,make_unix,emin,emin_subr,libcheck_min $ ON ERROR THEN CONTINUE ! esp. if programs are too big too link... $ lin/exe=cbin:refmac5.exe make_subr,make_lib,make_PDB,make_CIF,make_new,- make_crd,refmac_newdic,solvent_contr_rob,hkon_scale,subvag,- lsq_newdic_rest,oppro_newdic_rest,- rcard_scale,subcf_scale1,subag_scale,- extra_newdic_scale,sigandscale,- rigid_body_newdic,aniso_refi_hd1,linalgebra,- make_subr_refmac,tls_newdic,vdw_list_newdic,- make_rst,makecif,make_refmac_dummy,- ls_scaling,interpolate,rharvest,newentry_idealise,ccp4_lib:libccp4/l $ lin/exe=cbin:libcheck.exe make_subr,make_lib,make_PDB,make_CIF,- make_new,make_crd,main_libcheck,make_subr_2,libcheck,make_DPDB,- make_set_path,make_unix,emin,emin_subr,libcheck_min,ccp4_lib:libccp4/l $ delete *.obj;* $ MACEND: $ if iflg .eq. 1 then goto END $! $ STTOPP: $ set def ccp4_master:[ccp4.src.topp_] $ if f$search("cbin:topp.exe").nes."" $ then $ if doall.eqs."OVER" then goto TOPP2 $ TOPP1: $ f=f$search("*.f",2) $ if f.eqs."" $ then $ write sys$output f$fao("!(12AS) is up to date.","TOPP") $ goto TOPPEND $ endif $ if f$cvtime(f$file(f,"CDT")).lts.- f$cvtime(f$file("cbin:topp.exe","CDT")) then goto TOPP1 $ endif $! $ TOPP2: $ for topp,autosnd $ ON ERROR THEN CONTINUE ! esp. if programs are too big too link... $ lin/exe=cbin:topp.exe topp,autosnd,ccp4_lib:libccp4/l $ delete *.obj;* $ TOPPEND: $ if iflg .eq. 1 then goto END $! $ STFFFEAR: $ set def ccp4_master:[ccp4.src.fffear_] $ if f$search("cbin:fffear.exe").nes."" $ then $ if doall.eqs."OVER" then goto FFFEAR2 $ DM1: $ f=f$search("*.f",2) $ if f.eqs."" $ then $ write sys$output f$fao("!(12AS) is up to date.","FFFEAR") $ goto FFFEAREND $ endif $ if f$cvtime(f$file(f,"CDT")).lts.f$cvtime(f$file("cbin:fffear.exe","CDT")) - then goto FFFEAR1 $ endif $! $ FFFEAR2: $ WRITE SYS$OUTPUT "Compiling FFFEAR" $ for fffear.f,searcher.f,srchfft.f,filter.f,fffear_dmlib.f,fffear_fftkdc.f,- fffear_xtlkdc.f,fffear_mathkdc.f $ ON ERROR THEN CONTINUE ! esp. if programs are too big too link... $ link/nomap/exe=cbin:fffear fffear,searcher,srchfft,filter,fffear_dmlib,- fffear_fftkdc,fffear_xtlkdc,fffear_mathkdc,ccp4_lib:libccp4/l $ delete *.obj;* $ FFFEAREND: $ if iflg .eq. 1 then goto END $! $ STMOLR: $ set def ccp4_master:[ccp4.src.molrep_] $ if f$search("cbin:molrep.exe").nes."" $ then $ if doall.eqs."OVER" then goto MOLREP2 $ MOLREP1: $ f=f$search("*.f",2) $ if f.eqs."" $ then $ write sys$output f$fao("!(12AS) is up to date.","MOLREP") $ goto MOLREPEND $ endif $ if f$cvtime(f$file(f,"CDT")).lts.- f$cvtime(f$file("cbin:molrep.exe","CDT")) then goto MOLREP1 $ endif $! $ MOLREP2: $ for main_molrep_mtz,molrep,molrep1,molrep_prog,molrep_subr, molrep_vms $ ON ERROR THEN CONTINUE ! esp. if programs are too big too link... $ lin/exe=cbin:molrep.exe main_molrep_mtz,molrep,molrep1,molrep_prog, - molrep_subr, molrep_vms, ccp4_lib:libccp4/l $ delete *.obj;* $ MOLREPEND: $ if iflg .eq. 1 then goto END $! $ STSFCH: $ set def ccp4_master:[ccp4.src.sfcheck_] $ if f$search("cbin:sfcheck.exe").nes."" $ then $ if doall.eqs."OVER" then goto SFCH2 $ SFCH1: $ f=f$search("*.f",2) $ if f.eqs."" $ then $ write sys$output f$fao("!(12AS) is up to date.","SFCHECK") $ goto SFCHEND $ endif $ if f$cvtime(f$file(f,"CDT")).lts.- f$cvtime(f$file("cbin:sfcheck.exe","CDT")) then goto SFCH1 $ endif $! $ SFCH2: $ for main_sfcheck_mtz,sfcheck,sfch_prog,sfch_graph_1, - sfch_graph_2,sfch_graph_3,sfch_graph_4,sfch_graph_5,sfch_subr, sfch_vms $ ON ERROR THEN CONTINUE ! esp. if programs are too big too link... $ lin/exe=cbin:sfcheck.exe main_sfcheck_mtz,sfcheck,sfch_prog, - sfch_graph_1,sfch_graph_2,sfch_graph_3,sfch_graph_4,sfch_graph_5, - sfch_subr, sfch_vms, ccp4_lib:libccp4/l $ delete *.obj;* $ SFCHEND: $ if iflg .eq. 1 then goto END $! $ set def ccp4_master:[ccp4.src.sc_] $ f:=sc.f $ gosub make $! $ set def ccp4_master:[ccp4.src.scala_] $ f:=scala.f $ gosub make $! $ set def ccp4_master:[ccp4.src.sftools_] $ f:=sftools.f $ gosub make $! $ set def ccp4_master:[ccp4.src.dyndom_] $ f:=dyndom.f $ gosub make $! $ set def ccp4_master:[ccp4.src.mapmask_] $ f:=mapmask.f $ gosub make $! $ set def ccp4_master:[ccp4.src.ncsmask_] $ f:=ncsmask.f $ gosub make $! $ set def ccp4_master:[ccp4.src.restrain_] $ f:=restrain.f $ gosub make $ f:=tlsanl.f $ gosub make $ f:=rdent.f $ gosub make $! $ set def ccp4_master:[ccp4.src.topp_] $ f:=toplist.f $ gosub make $ f:=pdbhtf.c $ gosub make $! $ set def ccp4_master:[ccp4.src.maprot_] $ f:=maprot.f $ gosub make $! $ set def ccp4_master:[ccp4.src.arp_warp_] $ f:=arp_warp.f $ gosub make $ f:=prepform.f $ gosub make $ f:=prepshel.f $ gosub make $ f:=t_shift.f $ gosub make $! $ set def ccp4_master:[ccp4.src.combat_] $ f:=combat.f $ gosub make $! $ STPRO: $ set def ccp4_master:[ccp4.src.procheck] $ f=f$search("anglen.f",2) $ if f .nes. "" then goto convert $ f=f$search("clean.f",2) $ if f .nes. "" then goto convert $ f=f$search("pplot.f",2) $ if f .nes. "" then goto convert $ f=f$search("gfac2pdb.f",2) $ if f .nes. "" then goto convert $ f=f$search("secstr.f",2) $ if f .nes. "" then goto convert $ f=f$search("mplot.f",2) $ if f .nes. "" then goto convert $ f=f$search("ps.f",2) $ if f .nes. "" then goto convert $ f=f$search("rmsdev.f",2) $ if f .nes. "" then goto convert $ f=f$search("tplot.f",2) $ if f .nes. "" then goto convert $ goto PROSTART $ CONVERT: $ for convax.f $ lin convax $ run convax $ PROSTART: $ for ps $ PROCHECK: $ f=f$search("*.f*",3) $ if f.nes."" $ then $ n=f$parse(f,,,"name") $ o=n $ if n .eqs. "PS" then goto procheck $ if n .eqs. "BPLOT" then n = "PROBPLOT" $ if n .eqs. "CLEAN" then n = "PROCLEAN" $ if n .eqs. "CONVAX" then goto procheck $ if f$search("cbin:''n'.exe").nes."" .and. doall.nes."OVER" $ then $ if f$cvtime(f$file(f,"CDT")).lts.- f$cvtime(f$file("cbin:''n'.exe","CDT")) $ then $ write sys$output f$fao("!(12AS) is up to date.",n) $ goto procheck $ endif $ endif $ WRITE SYS$OUTPUT "Compiling ''f'" $ for 'f $ if o .eqs. "TPLOT" then goto ELSEMAKE $ if o .eqs. "MPLOT" then goto ELSEMAKE $ if o .eqs. "PPLOT" then goto ELSEMAKE $ if o .eqs. "GFAC2PDB" then goto ELSEMAKE $ if o .eqs. "BPLOT" then goto ELSEMAKE $ WRITE SYS$OUTPUT "Linking ''n'" $ ON ERROR THEN CONTINUE ! esp. if programs are too big too link... $ lin/exe=cbin:'n' 'o' $ delete 'o'.obj;* $ goto PROCHECK $ ELSEMAKE: $ WRITE SYS$OUTPUT "Linking ''n'" $ ON ERROR THEN CONTINUE ! esp. if programs are too big too link... $ lin/exe=cbin:'n' 'o',ps $ delete 'o'.obj;* $ goto PROCHECK $ endif $ del ps.obj;* $ $ f:=nb.c $ gosub make $ if iflg .eq. 1 then goto END $ $ cprog $ f:=pltdev.c $ gosub make $! $ END: $ set def 'stdir' $ exit $ $ make: $ n=f$parse(f,,,"name") $ if f$search("cbin:''n'.exe").nes."" .and. doall.nes."OVER" $ then $ if f$cvtime(f$file(f,"CDT")).lts.- f$cvtime(f$file("cbin:''n'.exe","CDT")) $ then $ write sys$output f$fao("!(12AS) is up to date.",n) $ return $ endif $ endif $ $ WRITE SYS$OUTPUT "Compiling ''f'" $ t=f$parse(f,,,"type") $ if t.eqs.".F" $ then for 'f $ else $ if t.eqs.".C" $ then cc/include=(CLIBS,[])/define=PROTOTYPE 'n $ else return $ endif $ endif $ $ WRITE SYS$OUTPUT "Linking ''n'" $ ON ERROR THEN CONTINUE ! esp. if programs are too big too link... $ if t.eqs.".C" .and. c.eqs."VAXC" $ then $ lin/exe=cbin:'n' 'n',sys$input/opt SYS$LIBRARY:VAXCRTL/share $ else $ lin/exe=cbin:'n' 'n',ccp4_lib:libccp4/l,ccp4_lib:libccif-static/l $ endif $ delete 'n'.obj';* $ return