# Makefile tail for CCP4 top level. This will be modified by configure. # $Header: /ccp4/ccp4null/repository/ccp4/lib/Makefile.in,v 1.3 2012/01/26 18:12:48 ccb Exp $ SHELL = /bin/sh DIRS = $(rxdir) $(fftwdir) mmdb libccp4 $(ccifdir) $(clipperdir) $(diffimdir) $(lapackdir) $(srsdir) $(ssmdir) data # this is for the benefit of makes that don't pass variable values in # recursive invocations, so that you can override these values on the # command line at the top level # Note: usually not needed with recent versions of make (e.g. GNU # make). It actually can make it quite difficult to pass overall # flags down if we set it here explicitely!. # (Clemens Vonrhein) #MVARS = libdir=$(libdir) bindir=$(bindir) FC="$(FC)" CC="$(CC)" \ # XFFLAGS="$(XFFLAGS)" FOPTIM="$(FOPTIM)" XLDFLAGS=$(XLDFLAGS) \ # CFLAGS="$(CFLAGS)" LNS="$(LNS)" M4="$(M4)" F=$F .PHONY : all-recursive data clean install realclean dist all : all-recursive # the FORCE doesn't have the desired effect on convex, hence libdir # etc., rather than lib... all-recursive: target=`echo $@ | sed s/-recursive//`; \ list='$(DIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ (cd $$subdir && $(MAKE) $(MFLAGS) $$target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done install-recursive: target=`echo $@ | sed s/-recursive//`; \ list='$(DIRS)'; for subdir in $$list; do \ echo "Installing $$target in $$subdir"; \ (cd $$subdir && $(MAKE) $(MFLAGS) $$target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done lapacklib : FORCE if test -n "$(lapackdir)"; then cd $(top_srcdir)/lib/lapack; \ $(MAKE) $(MFLAGS) $(MVARS); else true; fi ccif : FORCE if test -n "$(ccifdir)"; then cd $(ccifdir); \ $(MAKE) $(MFLAGS) $(MVARS); else true; fi; \ $(MAKE) install cctbx: FORCE if test -n "$(cctbxdir)"; then cd $(top_srcdir)/$(cctbxdir); \ ./ccp4_build "$(cctbxopts)"; else true; fi libdir : FORCE lapacklib cciflib mmdb libccp4 clipper ssm ccp4srs diffractionImg libccp4: FORCE cd libccp4; $(MAKE) $(MFLAGS) $(MVARS) ; \ $(MAKE) install mmdb: FORCE cd mmdb; $(MAKE) $(MFLAGS) $(MVARS) ; \ $(MAKE) install clipper: FORCE fftw if test -n "$(clipperdir)"; then cd $(top_srcdir)/lib/clipper/clipper; \ $(MAKE) -i $(MFLAGS) $(MVARS); else true; fi ; \ $(MAKE) install diffractionImg: if test -n "$(diffimdir)"; then cd $(top_srcdir)/$(diffimdir); \ $(MAKE) -i $(MFLAGS) $(MVARS); else true; fi ; \ $(MAKE) install ssm: if test -n "$(ssmdir)"; then cd $(top_srcdir)/$(ssmdir); \ $(MAKE) -i $(MFLAGS) $(MVARS); else true; fi ; \ $(MAKE) install ccp4srs: if test -n "$(srsdir)"; then cd $(top_srcdir)/$(srsdir); \ $(MAKE) -i $(MFLAGS) $(MVARS); else true; fi ; \ $(MAKE) install fftw: FORCE if test -n "$(fftwdir)"; then cd $(top_srcdir)/lib/fftw; \ $(MAKE) -i $(MFLAGS) $(MVARS) install; else true; fi ; \ $(MAKE) install datadir : FORCE libdir cd lib/data; $(MAKE) $(MFLAGS) $(MVARS) empty-targets : clean uninstall : for i in $(DIRS) ; do (if test -f $$i/Makefile; then \ cd $$i; $(MAKE) $(MFLAGS) $(MVARS) $@; \ else true; fi) ; done install : install-recursive # should probably remove created directories eventually, too # fftwdir,clipperdir,ssmdir don't have target realclean # note use of x in case variable empty realclean : clean for i in $(DIRS) ; do (if test -f $$i/Makefile; then \ if test x$$i = x$(fftwdir); then \ true; \ elif test x$$i = x$(clipperdir); then \ true; \ elif test x$$i = x$(ssmdir); then \ true; \ elif test x$$i = x$(srsdir); then \ true; \ elif test x$$i = x$(diffimdir); then \ true; \ else cd $$i; $(MAKE) $(MFLAGS) $(MVARS) realclean; fi; \ else true; fi) ; done distclean : realclean for i in $(DIRS) ; do (if test -f $$i/Makefile; then \ cd $$i; $(MAKE) $(MFLAGS) $(MVARS) distclean; else true; fi) ; done # Remove rxdispencer Makefile here, if it exists if test -f rxdispencer/Makefile; then \ rm -f rxdispencer/Makefile; else true; fi testlib : ; cd libccp4; $(MAKE) $(MFLAGS) $(MVARS) test FORCE : ; # Local Variables: # mode:makefile # End: