# # Generic Makefile for the Client Display Library V1.0 # # Mike Fitzpatrick, National Optical Astronomy Observatories, IRAF project. # Apr 1997 EXTRA_CFLAGS = CDEBUGFLAGS = -g LDLIBS = AR = ar r ARADD = ar rul RANLIB = ranlib RM = rm SUBDIRS = test MATHLIB = -lm SRCS = cdl.c cdlmark.c cdlfits.c cdliraf.c cdlzscale.c cdl_f77.c \ cdl_spp.c eps.c comm.c imd.c OBJS = cdl.o cdlmark.o cdlfits.o cdliraf.o cdlzscale.o cdl_f77.o \ cdl_spp.o eps.o comm.o imd.o CDL_INCLUDES = cdl.h cdlP.h cdlProto.h cdl_f77.h cdlfont.h eps.h World:: @echo "Building Release 1.6 of the IRAF CLient Display Library" @echo "" ; date ; echo "" $(MAKE) $(MFLAGS) all @echo "Done." ; date ; echo "" .c.o: $(RM) -f $@ $(CC) -c $(EXTRA_CFLAGS) $(CFLAGS) $*.c all:: libcdl.a vximtool libcdl.a: $(OBJS) $(CDL_INCLUDES) $(RM) -f libcdl.a $(AR) libcdl.a $(OBJS) $(RANLIB) libcdl.a vximtool: vximtool.o $(RM) -f vximtool $(CC) -o vximtool -DHAVE_CDL vximtool.o libcdl.a $(MATHLIB) $(LDLIBS) vximtool.o: $(CC) -c $(CFLAGS) -DHAVE_CDL vximtool.c $(SUBDIRS): FRC @cd $@ ; echo "making all in $(CURRENT_DIR)/$@..."; \ $(MAKE) $(MFLAGS) 'CDEBUGFLAGS=$(CDEBUGFLAGS)' all FRC: all:: @case '${MFLAGS}' in *[ik]*) set +e;; esac; \ for i in $(SUBDIRS) ;\ do \ (cd $$i ; echo "making" all "in $(CURRENT_DIR)/$$i..."; \ $(MAKE) $(MFLAGS) 'CDEBUGFLAGS=$(CDEBUGFLAGS)' all); \ done depend:: @case '${MFLAGS}' in *[ik]*) set +e;; esac; \ for i in $(SUBDIRS) ;\ do \ (cd $$i ; echo "depending" "in $(CURRENT_DIR)/$$i..."; \ $(MAKE) $(MFLAGS) depend); \ done pristine:: $(MAKE) $(MFLAGS) clean $(RM) -f Makefile test/Makefile examples/Makefile $(RM) -f Makefile.bak test/Makefile.bak examples/Makefile.bak clean:: $(RM) -f *.o *.a *spool* vximtool depend:: # ------------------------------------------------------------------------- # common rules for all Makefiles - do not edit emptyrule:: Makefile:: -@if [ -f Makefile ]; then set -x; \ $(RM) -f Makefile.bak; $(MV) Makefile Makefile.bak; \ else exit 0; fi $(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR) tags:: $(TAGS) -w *.[ch] $(TAGS) -xw *.[ch] > TAGS saber: # load $(ALLDEFINES) $(SRCS) osaber: # load $(ALLDEFINES) $(OBJS) # ------------------------------------------------------------------------- # rules for building in SUBDIRS - do not edit install:: @case '${MFLAGS}' in *[ik]*) set +e;; esac; \ for i in $(SUBDIRS) ;\ do \ (cd $$i ; echo "installing" "in $(CURRENT_DIR)/$$i..."; \ $(MAKE) $(MFLAGS) DESTDIR='$(DESTDIR)' install); \ done install.man:: @case '${MFLAGS}' in *[ik]*) set +e;; esac; \ for i in $(SUBDIRS) ;\ do \ (cd $$i ; echo "installing man pages" "in $(CURRENT_DIR)/$$i..."; \ $(MAKE) $(MFLAGS) DESTDIR='$(DESTDIR)' install.man); \ done clean:: @case '${MFLAGS}' in *[ik]*) set +e;; esac; \ for i in $(SUBDIRS) ;\ do \ (cd $$i ; echo "cleaning" "in $(CURRENT_DIR)/$$i..."; \ $(MAKE) $(MFLAGS) RM_CMD='$(RM_CMD)' clean); \ done tags:: @case '${MFLAGS}' in *[ik]*) set +e;; esac; \ for i in $(SUBDIRS) ;\ do \ (cd $$i ; echo "tagging" "in $(CURRENT_DIR)/$$i..."; \ $(MAKE) $(MFLAGS) TAGS='$(TAGS)' tags); \ done Makefiles:: @case '${MFLAGS}' in *[ik]*) set +e;; esac; \ for i in $(SUBDIRS) ;\ do \ echo "making Makefiles in $(CURRENT_DIR)/$$i..."; \ case "$$i" in \ ./?*/?*/?*/?*) newtop=../../../../ sub=subsubsubsub;; \ ./?*/?*/?*) newtop=../../../ sub=subsubsub;; \ ./?*/?*) newtop=../../ sub=subsub;; \ ./?*) newtop=../ sub=sub;; \ */?*/?*/?*) newtop=../../../../ sub=subsubsubsub;; \ */?*/?*) newtop=../../../ sub=subsubsub;; \ */?*) newtop=../../ sub=subsub;; \ *) newtop=../ sub=sub;; \ esac; \ case "$(TOP)" in \ /?*) newtop= upprefix= ;; \ *) upprefix=../ ;; \ esac; \ $(MAKE) $${sub}dirMakefiles UPPREFIX=$$upprefix NEWTOP=$$newtop \ MAKEFILE_SUBDIR=$$i NEW_CURRENT_DIR=$(CURRENT_DIR)/$$i;\ done subdirMakefiles: $(RM) -f $(MAKEFILE_SUBDIR)/Makefile.bak -@if [ -f $(MAKEFILE_SUBDIR)/Makefile ]; then set -x; \ $(MV) $(MAKEFILE_SUBDIR)/Makefile $(MAKEFILE_SUBDIR)/Makefile.bak; \ else exit 0; fi cd $(MAKEFILE_SUBDIR); $(IMAKE_CMD) -DTOPDIR=$(UPPREFIX)$(TOP) -DCURDIR=$(NEW_CURRENT_DIR); \ $(MAKE) $(MFLAGS) Makefiles subsubdirMakefiles: $(RM) -f $(MAKEFILE_SUBDIR)/Makefile.bak -@if [ -f $(MAKEFILE_SUBDIR)/Makefile ]; then set -x; \ $(MV) $(MAKEFILE_SUBDIR)/Makefile $(MAKEFILE_SUBDIR)/Makefile.bak; \ else exit 0; fi cd $(MAKEFILE_SUBDIR); $(IMAKE_CMD) -DTOPDIR=$(UPPREFIX)$(UPPREFIX)$(TOP) -DCURDIR=$(NEW_CURRENT_DIR); \ $(MAKE) $(MFLAGS) Makefiles subsubsubdirMakefiles: $(RM) -f $(MAKEFILE_SUBDIR)/Makefile.bak -@if [ -f $(MAKEFILE_SUBDIR)/Makefile ]; then set -x; \ $(MV) $(MAKEFILE_SUBDIR)/Makefile $(MAKEFILE_SUBDIR)/Makefile.bak; \ else exit 0; fi cd $(MAKEFILE_SUBDIR); $(IMAKE_CMD) -DTOPDIR=$(UPPREFIX)$(UPPREFIX)$(UPPREFIX)$(TOP) -DCURDIR=$(NEW_CURRENT_DIR); \ $(MAKE) $(MFLAGS) Makefiles subsubsubsubdirMakefiles: $(RM) -f $(MAKEFILE_SUBDIR)/Makefile.bak -@if [ -f $(MAKEFILE_SUBDIR)/Makefile ]; then set -x; \ $(MV) $(MAKEFILE_SUBDIR)/Makefile $(MAKEFILE_SUBDIR)/Makefile.bak; \ else exit 0; fi cd $(MAKEFILE_SUBDIR); $(IMAKE_CMD) -DTOPDIR=$(UPPREFIX)$(UPPREFIX)$(UPPREFIX)$(UPPREFIX)$(TOP) -DCURDIR=$(NEW_CURRENT_DIR); \ $(MAKE) $(MFLAGS) Makefiles includes:: @case '${MFLAGS}' in *[ik]*) set +e;; esac; \ for i in $(SUBDIRS) ;\ do \ (cd $$i ; echo including "in $(CURRENT_DIR)/$$i..."; \ $(MAKE) $(MFLAGS) includes); \ done # ------------------------------------------------------------------------- # dependencies generated by makedepend # DO NOT DELETE