ifndef SEPINC SEPINC = config endif include ${SEPINC}/SEP.distr.top SUBDIRS := tools lib util seis graphics converters ifdef COPY SUBDIRS = tools lib util seis graphics converters config test demo endif # note: if all machines had "mkdir -p" this would be a lot easier to write. # maybe we should use mkdirheir from the X distribution. ifeq ($(Add_Mtype),before) INSTALL_DIRS := $(SEP)/$(OBJDIR) \ $(SEP)/$(OBJDIR)/include \ $(SEP)/$(OBJDIR)/lib \ $(SEP)/$(OBJDIR)/bin \ $(VPLOT_FONT_DIRECTORY) endif ifeq ($(Add_Mtype),after) INSTALL_DIRS := $(SEP)/bin \ $(SEP)/lib \ $(SEP)/include \ $(SEP)/include/$(OBJDIR) \ $(SEP)/bin/$(OBJDIR) \ $(SEP)/lib/$(OBJDIR) \ $(VPLOT_FONT_DIRECTORY) endif ifeq ($(Add_Mtype),no) INSTALL_DIRS := $(SEP)/bin \ $(SEP)/lib \ $(SEP)/include \ $(VPLOT_FONT_DIRECTORY) endif all : install_dirs $(MakeSubDirs) @echo "-----------" @echo "-----------" @echo "All done!" @echo "-----------" @echo "-----------" deinstall: $(MakeSubDirs) @echo "-----------" @echo "-----------" @echo "Deinstall done!" @echo "All executables and libraries should now be deleted." @echo "If you want to remove all reminants gmake deinstall_all " @echo "-----------" @echo "-----------" deinstall_all: deinstall ${RM} -r ${SEPINCDIR} ${SEPBINDIR} ${SEPLIBDIR} ${SEPMANDIR} @echo "only the directory," ${SEP} "should remain" clean_all: $(MAKE) SEP_ARCH=DEC3100 clean $(MAKE) SEP_ARCH=SUN4 clean $(MAKE) SEP_ARCH=SOLARIS clean $(MAKE) SEP_ARCH=CONVEX clean $(MAKE) SEP_ARCH=RS6000 clean $(MAKE) SEP_ARCH=SGI clean $(MAKE) SEP_ARCH=HP700 clean $(MAKE) SEP_ARCH=CRAY clean $(MAKE) SEP_ARCH=CM5 clean $(MAKE) SEP_ARCH=SGI64 clean $(MAKE) SEP_ARCH=SGI32 clean $(MAKE) SEP_ARCH=LINUX clean clean: $(MakeSubDirs) -$(RM) log* install_dirs: @for dir in $(INSTALL_DIRS);\ do \ if [ ! -d $$dir ]; then \ ( echo "creating $$dir"; mkdir $$dir; )\ fi; continue;\ done ifndef TEMP_DIR TEMP_DIR = /scrka1/bob endif COPY_TO = ${TEMP_DIR}/seplib distr_tar: @if [ ! -d $(COPY_TO) ]; then \ ${MKDIR} $(COPY_TO); \ fi; ${MAKE} COPY_TO=${COPY_TO} COPY=yes COMPILE_LEVEL=distr copy cd ${COPY_TO}; tar cvf ${TEMP_DIR}/distr.tar . ${RM} -rf ${COPY_TO} local_tar: @if [ ! -d $(COPY_TO) ]; then \ ${MKDIR} $(COPY_TO); \ fi; ${MAKE} COPY_TO=${COPY_TO} COPY=yes COMPILE_LEVEL=local copy cd ${COPY_TO}; tar cvf ${TEMP_DIR}/local.tar . ${RM} -rf ${COPY_TO} include ${SEPINC}/SEP.distr.dir