# # clutil/Makefile.clutil.in - creates library clutil. # It invokes makefiles in subdirectories clutil cquery mesrep lunmgr strings trnfnm ddname kernel zquery . # It is invoked by Makefile # Generated by car2cvs $Revision$ (nk) # # $Id$ # # $Log$ # Revision 1.1 2000/06/19 20:00:10 eugenio # Initial revision # # Revision 1.3 1996/03/06 13:54:43 zfiles # Added : to = shell # # Revision 1.2 1996/01/15 21:54:37 lkg # Update to (a) compile routines in runinf and (b) automatically copy files # from cleoks/runfil subdirectory to the local runfil area # # Revision 1.1.1.1 1995/08/01 17:59:23 nk # Consolidation # # Revision 1.8 1995/08/01 02:55:09 nk # Removed trnfnm. Changed the library name to cleoks # # Revision 1.7 1995/07/31 20:33:34 nk # Files in genutl are copied into c_util, fort_util, strings, hpux_util, # time_util, vax_util and unix_util. timee in kernel was also moved into # time_util. # # Revision 1.6 1995/07/31 19:36:29 nk # Added typscn # # Revision 1.5 1995/07/31 18:25:57 nk # Added ucio. # # Revision 1.4 1995/07/31 16:31:53 nk # Added ntape directory. Moved ntape(mtape) code from nkcl. # # Revision 1.3 1995/05/04 00:13:41 zfiles # execute depend before production and debug (Otherwise dependency could be # screwed up) # # Revision 1.2 1994/11/17 21:00:57 zfiles # Use clutil.defs clutil_driver.defs for the definitions. # # Revision 1.1.1.1 1994/10/04 21:54:43 zfiles # first version of clutil in CVS # # MAKE = gmake SHELL = /bin/sh srcdir = @srcdir@ VPATH = @srcdir@ MACHINE = @MACHINE@ FFLAGS = @FFLAGS@ OPT_FFLAGS = @OPT_FFLAGS@ DBG_FFLAGS = @DBG_FFLAGS@ CFLAGS = @CFLAGS@ CXXFLAGS = @CXXFLAGS@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ prefix = $(word 1,$(CLEO_PREFIX) $(HOME)/dlib) exec_prefix = $(prefix) libdir = $(exec_prefix)/lib runfildir = $(exec_prefix)/runfil vaxsrcdir = $(exec_prefix)/vaxsrc/cleoks locallib = ../lib localrunfil = ../runfil LOCALVAXSRC = ../vaxsrc ifeq "$(srcdir)" "." absrcdir := $(shell pwd) else absrcdir = $(srcdir) endif MAIN_DIRECTORY=cleoks LIBRARY=cleoks CLEO_FFLAGS_ORIG= $(MAIN_DIRECTORY) . # $(MAIN_DIRECTORY) . geant/gcdes cleog/cgcdes seq/clinc seq/clever seq/clutil seq/zfiles seq/clbank clutil/cluseq seq/clutil clutil/cluseq CLEO_FFLAGS=-I$(absrcdir) CLEO_FFLAGS+=$(CLEO_FFLAGS_ORIG:%=-I$(absrcdir)/../%) CLEO_FFLAGS+=$(CLEO_FFLAGS_ORIG:%=-I$(C_CVSSRC)/%) TEMP_DEFS= CLEO_DEFS= $(shell cat $(srcdir)/$(LIBRARY).defs) #CLEO_DEFS= -DCLEO_TYPE -DCLEO_GKS -DCLEO_CLEVER CPP_TIME := $(shell date +%H%M) CPP_DATE := $(shell date +%d%m%y) CPP_VERS := $(shell if [ -f CVS/Tag ] ; then cat CVS/Tag ; fi) CPP_TITLE := $(shell cd $(srcdir) ; version) CLEO_DEFS += -DCPP_DATE=$(CPP_DATE) -DCPP_TIME=$(CPP_TIME) -DCPP_VERS=$(CPP_VERS) -DCPP_TITLE='$(CPP_TITLE)' CLEO_DEFS+=$(TEMP_DEFS) LIBRARY=cleoks SUBNAMES=mesrep lunmgr typscn RUNFIL_FILES=runbunch.fil RUNFIL_LIST=$(RUNFIL_FILES:%=$(localrunfil)/%) .PHONY:TEST production vaxsrc vaxcom debug clean distclean realclean depend $(SUBNAMES) $(SUBNAMES_OBJ) xscript install uninstall TAGS @ TEST:production @ depend production::pilot @ pilot: @(test -n "$(LIBRARY)" && test -d _$(LIBRARY) && test -f _$(LIBRARY)/pilot.h && \ grep -v "^\*" _$(LIBRARY)/pilot.h > _$(LIBRARY)/pilot_c.h) || true vaxsrc:: @test -d $(LOCALVAXSRC)/$(LIBRARY) || mkdir -p $(LOCALVAXSRC)/$(LIBRARY) vaxcom:: @test -d $(LOCALVAXSRC)/$(LIBRARY) || mkdir -p $(LOCALVAXSRC)/$(LIBRARY);\ echo "$$ set def [.$(LIBRARY)]" >> $(LOCALVAXSRC)/$(LIBRARY)/cfl.com;\ echo "$$ library/create $(LIBRARY)" >> $(LOCALVAXSRC)/cfl.com;\ echo "$$ library/create $(LIBRARY)_dbg" >> $(LOCALVAXSRC)/cfl.com;\ echo $$ @[.$(LIBRARY)]cfl [-]$(LIBRARY) [-]$(LIBRARY)_dbg >> $(LOCALVAXSRC)/cfl.com;\ echo $$ set def [-] >> $(LOCALVAXSRC)/cfl.com TAGS:: @rm -f $(locallib)/TAGS.$(LIBRARY) production debug::depend production vaxsrc vaxcom depend debug clean distclean realclean TAGS:: @test -z "$(SUBNAMES)" || $(MAKE) -f Makefile.cleoks $(SUBNAMES) "TARGET=$@" TEMP_DEFS="$(TEMP_DEFS)";\ test -z "$(SUBNAMES_OBJ)" || $(MAKE) -f Makefile.cleoks $(SUBNAMES_OBJ) "TARGET=$@" TEMP_DEFS="$(TEMP_DEFS)" distclean:: @rm -f Makefile.cleoks $(locallib)/lib$(LIBRARY).a $(locallib)/lib$(LIBRARY)_g.a $(locallib)/TAGS.$(LIBRARY) $(RUNFIL_LIST) $(SUBNAMES):: @cd $@;test $(TARGET) = "debug" || $(MAKE) -k $(TARGET) FFLAGS="$(OPT_FFLAGS) $(FFLAGS)" CFLAGS="-O $(CFLAGS)" LOCALVAXSRC="../$(LOCALVAXSRC)/$(LIBRARY)" CLEO_DEFS="$(CLEO_DEFS)" CLEO_FFLAGS="$(CLEO_FFLAGS)" LIBRARY=../$(locallib)/lib$(LIBRARY).a LIBRARY_NAME=$(LIBRARY);\ test $(TARGET) != "debug" || $(MAKE) -k $(TARGET) FFLAGS="$(DBG_FFLAGS) $(FFLAGS) -DCLEO_DEBUG -DWRITE_RCS_INFO" CFLAGS="-g $(CFLAGS) -DCLEO_DEBUG -DWRITE_RCS_INFO" LOCALVAXSRC="../$(LOCALVAXSRC)/$(LIBRARY)" CLEO_DEFS="$(CLEO_DEFS)" CLEO_FFLAGS="$(CLEO_FFLAGS)" LIBRARY=../$(locallib)/lib$(LIBRARY)_g.a LIBRARY_NAME=$(LIBRARY) mklib: @test -f $(locallib)/lib$(LIBRARY).a || ar r $(locallib)/lib$(LIBRARY).a;\ test -f $(locallib)/lib$(LIBRARY)_g.a || ar r $(locallib)/lib$(LIBRARY)_g.a xscript: @test -d $(localrunfil) || mkdir -p $(localrunfil);\ test -f $(srcdir)/script/$(LIBRARY).unix && sh $(srcdir)/script/$(LIBRARY).unix $(srcdir) install: @test -f $(locallib)/lib$(LIBRARY).a && $(INSTALL_DATA) $(locallib)/lib$(LIBRARY).a $(libdir);\ test -f $(locallib)/lib$(LIBRARY)_g.a && $(INSTALL_DATA) $(locallib)/lib$(LIBRARY)_g.a $(libdir);\ test -f $(locallib)/TAGS.$(LIBRARY) && $(INSTALL_DATA) $(locallib)/TAGS.$(LIBRARY) $(libdir);\ test -z "$(SUBNAMES_OBJ)" || $(MAKE) -fMakefile.cleoks $(SUBNAMES_OBJ) "TARGET=$@";\ test -z "$(SUBNAMES_OBJ)" || $(MAKE) -fMakefile.cleoks $(SUBNAMES_OBJ) "TARGET=$@" "DEBUG=_g";\ for file in $(RUNFIL_LIST); do (test -f $$file && $(INSTALL_DATA) $$file $(runfildir))||true;done uninstall: @test -f $(libdir)/lib$(LIBRARY).a && rm -f $(libdir)/lib$(LIBRARY).a;\ test -f $(libdir)/lib$(LIBRARY)_g.a && rm -f $(libdir)/lib$(LIBRARY)_g.a;\ test -f $(libdir)/TAGS.$(LIBRARY) && rm -f $(libdir)/TAGS.$(LIBRARY);\ test -z "$(SUBNAMES_OBJ)" || $(MAKE) -fMakefile.cleoks $(SUBNAMES_OBJ) "TARGET=$@";\ test -z "$(SUBNAMES_OBJ)" || $(MAKE) -fMakefile.cleoks $(SUBNAMES_OBJ) "TARGET=$@" "DEBUG=_g";\ for file in $(RUNFIL_FILES); do (rm -f $(runfildir)/$$file)||true;done