# Makefile tail for CCP4 programs. This will be modified by configure. # $Id: Makefile.in,v 1.4 2011/07/27 09:38:42 ccb Exp $ # variables which should be set by configure: top_srcdir, CC, CFLAGS, # FC, FFLAGS, F, LNS, SETFLAGS, EVAL, LDFLAGS, INSTALL_PROGRAM SHELL = /bin/sh srcdir = $(top_srcdir)/prerelease incdir = $(top_srcdir)/include LIB_DIR = ../lib/# where to pick up libccp4.a AR = ar r fsplit_dir = $(top_srcdir)/lib/src # The following is for the benefit of Alliant, which is the only # system I know where you can't use -L to specify the load path. # (This works since make variables are defined in the environment in # Alliant (GNU) make.) We'd like to use $(LIB_DIR) instead of `../lib/src' # here, but can't since that would require `:=' instead of `=' and # confuse other makes. LD_PATH = ../lib/src /lib /usr/lib /usr/local/lib # On some systems (Concentrix, for instance), for files with trailing # comments, fsplit generates a file containing only comments and the # compiler barfs on it. Here's an abbreviation for deleting any such # files generated, assuming two possible forms of the name generated: # caveat naming routines! Always use this after fsplit for safety... RMEMPTY = rm -f ZZZ*.f zzz*.f # targets built from .f sources: (NB update the dependencies at the # end if adding to this list) TARGETS = refmac_sad all : $(TARGETS) .PHONY : all install instsome clean realclean distclean install : all # pwd necessary if INSTALL_PROGRAM is ln -s # || true avoids error return, but isn't good enough in convex make, hence - -for i in $(TARGETS); do \ test -s $$i && $(INSTALL_PROGRAM) `pwd`/$$i $(bindir)/$$i || true ;\ done # install any available programs without requiring them all to be built instsome : -for i in $(TARGETS); do \ test -s $$i && $(INSTALL_PROGRAM) `pwd`/$$i $(bindir)/$$i || true; \ done clean : ; -rm -f core *.o *~ a.out *.orig *.rej *.il realclean : clean -rm -f $(TARGETS) distclean : realclean ; -rm -f Makefile uninstall : for i in $(TARGETS) $(SCRIPTS); do \ rm -f $(bindir)/$$i ;\ done # this leaves empty, non executable files in place of the targets which have # been built, saving space in the build directory, but enabling re-building # contingent on the empty files being out-of-date with respect to their # dependencies. install mustn't shift the empty files! empty-targets : -for i in $(TARGETS); do \ test -s $$i && rm -f $$i && touch $$i || true ;\ done # Here are the things which have their own source directories at present # Where include files are used, we have to do the compilation in the source # directory, since we can't necessarily dictate the path for fortran includes. # In case you're tempted to do the compilation and linking together, note # that it might attempt to create a .o in the source directory which we don't # want to touch -- it might not even be writeable. Compilation and linking # are separated to do the linking in the build directory (for which the # $(LDFLAGS) are appropriate). ### refmac_sad refmacdir = $(srcdir)/refmac_sad_ reflibobjs5 = i0.o i1.o chbevl.o reflibobjs6 = bridge.o refmac5objs = refmac_xml.o solvent_contr_mask.o hkon_secder_tch.o \ fast_hessian_tabulation.o subvag.o lsq_symm_symm.o oppro_allocate.o \ rcard_tor1.o subcf_scale1.o subag_scale_hessian.o extra_eigen.o \ rigid_allocate.o aniso_ref_eigen.o linalgebra.o make_CIF.o \ make_subr.o make_subr_refmac.o tls_allocate.o vdw_and_contacts.o \ vdw_flexible.o make_lib11.o make_lib12.o make_lib2.o \ make_crd1.o make_crd2.o make_new1.o make_new2.o set_num.o \ make_rst1.o make_rst2.o make_PDB.o makecif.o make_refmac_dummy.o \ ls_scaling_double.o interpolate_mod.o rharvest.o newentry_idealise.o \ ml_scaling_double.o gaussian_int.o subnumrec.o math_refmac.o \ read_extra_restraints.o inout_routines.o errwrt.o xml_writer.o \ ncs_rest.o occupancy_only_refine.o cell_symm_subrs.o iheap_sort.o \ heavy.o enm_restraints.o wave2f2prime.o lnumrec.o refpre_twin.o \ refall_twin.o ls_scaling_twin_save.o max_with_ints.o ml_params_refine.o \ block_organization.o merohedr_twin.o decide_twin_opers_0.o read_data.o \ asym_list.o calc_stats_twin.o mtz_write_twin.o libT.o messy_pdb.o $(refmac5objs): # dependencies at end @$(SETFLAGS) pwd=`pwd` ; \ cd $(refmacdir); \ echo $(FC) $${refmac5_FLAGS-"$(FFLAGS)"} -c -o $$pwd/$@ $(refmacdir)/`basename $@ .o`.f ;\ eval $(FC) $${refmac5_FLAGS-"$(FFLAGS)"} -c -o $$pwd/$@ $(refmacdir)/`basename $@ .o`.f $(reflibobjs5): # @$(SETFLAGS) pwd=`pwd` ; \ cd $(refmacdir); \ echo $(CC) $(CFLAGS) -I. -c -o $$pwd/$@ $(refmacdir)/`basename $@ .o`.c ;\ eval $(CC) $(CFLAGS) -I. -c -o $$pwd/$@ $(refmacdir)/`basename $@ .o`.c $(reflibobjs6): # @$(SETFLAGS) pwd=`pwd` ; \ cd $(refmacdir); \ echo $(CXX) $(CXXFLAGS) -I. -c -o $$pwd/$@ $(refmacdir)/`basename $@ .o`.cpp ;\ eval $(CXX) $(CXXFLAGS) -I. -c -o $$pwd/$@ $(refmacdir)/`basename $@ .o`.cpp refmac_sad: $(reflibobjs5) $(reflibobjs6) $(refmac5objs) @$(SETFLAGS) pwd=`pwd` ; \ rm -f refmac_sad ;\ echo $(FC) $${refmac5_FLAGS-"$(FFLAGS)"} -o $@ $(reflibobjs5) $(reflibobjs6) $(refmac5objs) $(LDFLAGS) ;\ eval $(FC) $${refmac5_FLAGS-"$(FFLAGS)"} -o $@ $(reflibobjs5) $(reflibobjs6) $(refmac5objs) $(LDFLAGS) FORCE : ; # Local Variables: # mode:makefile # End: