# # This file is a part of what might become CLHEP - # a Class Library for High Energy Physics. # # ### Start of configuration section VERSION = @VERSION@ SRC_HOME = $(shell pwd) # # Define libdir to be the directory where you will install CLHEP.a # and bindir the directory where you normally put executables. # prefix = @prefix@ bindir = $(prefix)/bin libdir = $(prefix)/lib srcdir = @srcdir@ VPATH = @srcdir@ # # Define incdir to be the directory where you want to put the headerfiles. # incdirCLHEP = $(prefix)/include/CLHEP # # Define these to be the directories where you put the man page for the # classdoc utility (man1dir) and the man pages for the classes in the # CLHEP library (man3dir). # man1dir = $(prefix)/man/man1 man1ext = 1 man3dir = $(prefix)/man/man3 man3ext = 3 # # Define CXX to be your C++ compiler, and FC to be you fortran compiler. # CXX = @CXX@ FC = @FC@ # # CXXFLAGS are the are the C++ compiler flags to be used # CXXFLAGS = @CXXFLAGS@ # # FFLAGS are the FORTRAN compiler flags to be used. # If you are using f2c you should typically use the flags # "-R -C++" # FFLAGS = @FFLAGS@ # # Defs for the C++ compiler # DEFS = @DEFS@ # # AR and ARFLAGS are the command and options to use for adding object # to an archive # AR = @AR@ ARFLAGS = @ARFLAGS@ # # Add include directives to if you need them. # TOPINCLUDES = @INCLUDES@ # # TOPLIBS should contain all libraries you need to compile the test programs. # TOPLIBS = @LIBS@ # # TOPLDFLAGS should contain any additional options to be sent to 'ld' # TOPLDFLAGS = # # FLIBS should contain the fortran run-time libraries # FLIBS = @FLIBS@ # # AWK is the awk program to be used by classdoc. It should be compatible # with the gnu awk program "gawk" version 2.13, or the standard # Unix "nawk" program. # AWK = @AWK@ # # CLASSDOCPAGER is the name of the pager to be used by classdoc # CLASSDOCPAGER = @CLASSDOCPAGER@ # # If you are using f2c USING_F2C should be defined to 1 otherwise # define it to 0 # USING_F2C = @USING_F2C@ INSTALL = @INSTALL@ MKDIR = @MKDIR@ RANLIB = @RANLIB@ # # Extra name tag for a library compiled with g++ # GCCNAME = -$(CXX).$(VERSION) # # Extensions tags # OBJOUT = @OBJOUT@ EXEOUT = @EXEOUT@ CXXEXT = @CXXEXT@ ### End of configuration section .SUFFIXES: .cc OUTPUT_OPTION= .cc.o: $(CXX) -c $(CXXFLAGS) $(DEFS) $(INCLUDES) $(CXXEXT) $< .f.o: $(FC) $(FFLAGS) $< if [ $(USING_F2C) -eq 1 ] ; then \ $(CXX) -c $(CXXFLAGS) $(DEFS) $(INCLUDES) $*.c ; \ else true; fi DISTFILES = ChangeLog Makefile.in README NEWS configure # Utilities must be the first so that CLHEP-xxx.h is rebuild DISABLED_SUBDIRS = @DISABLED_SUBDIRS@ SUBDIRS_ALL = config Utilities Evaluator GenericFunctions Matrix Vector Random RandomObjects Geometry Units HepPDT HepMC HepMC/include StdHep StdHep/include ifneq "$(DISABLED_SUBDIRS)" "" SUBDIRS = $(filter-out $(DISABLED_SUBDIRS), $(SUBDIRS_ALL)) else SUBDIRS = $(SUBDIRS_ALL) endif .PHONY:$(SUBDIRS) classdoc all: $(SUBDIRS) libCLHEP$(GCCNAME).a $(SUBDIRS): @cd $@; $(MAKE) CXX="$(CXX)" FC="$(FC)" CXXFLAGS="$(CXXFLAGS)" FFLAGS="$(FFLAGS)" AR="$(AR)" ARFLAGS="$(ARFLAGS)" DEFS="$(DEFS)" TOPINCLUDES="$(TOPINCLUDES)" TOPLIBS="$(TOPLIBS)" TOPLDFLAGS="$(TOPLDFLAGS)" USING_F2C=$(USING_F2C) RANLIB="$(RANLIB)" OBJOUT="$(OBJOUT)" EXEOUT="$(EXEOUT)" CXXEXT="$(CXXEXT)" all OBJLIST = $(shell find $(SUBDIRS) -name \*.o) libCLHEP$(GCCNAME).a: $(AR) $(ARFLAGS)libCLHEP$(GCCNAME).a $(OBJLIST) # $(RANLIB) $@ # $(CXX) -c $(COMPILER_FLAG) $(DEFS) $(INCLUDES) $(CXXFLAGS) dummy.cc ; $(AR) $(ARCREATEFLAGS)libCLHEP$(GCCNAME).a dummy.obj install: all # @cd CLHEP; $(MAKE) MKDIR="$(MKDIR)" incdirCLHEP="$(incdirCLHEP)" install for dir in $(SUBDIRS) ; do cd $$dir ; $(MAKE) install prefix="$(prefix)" MKDIR="$(MKDIR)" ; cd $(SRC_HOME) ; done @echo "Installing libCLHEP$(GCCNAME).a in $(libdir)" @test -d $(libdir) || $(MKDIR) $(libdir) @cp libCLHEP$(GCCNAME).a $(libdir) uninstall: # @cd CLHEP; $(MAKE) MKDIR="$(MKDIR)" incdirCLHEP="$(incdirCLHEP)" uninstall @echo "Removing libCLHEP$(GCCNAME).a and HepPIOInit.o from $(libdir)" @rm -f $(libdir)/libCLHEP$(GCCNAME).a install_classdoc: classdoc @test -d $(bindir) || $(MKDIR) $(bindir) @echo "Installing classdoc in $(bindir)" @sed -e 's?INSTALLDIR_AWK?$(libdir)?' -e 's?PAGER?$(CLASSDOCPAGER)?' -e 's?NAWKPROG?$(AWK)?' $(srcdir)/classdoc/classdoc.sh > $(bindir)/classdoc @chmod 755 $(bindir)/classdoc @echo "Installing classdoc awk script in $(libdir)" @cp $(srcdir)/classdoc/classdoc.awk $(libdir) @test -d $(man1dir) || $(MKDIR) $(man1dir) @echo "Installing classdoc man-pages in $(man1dir)" @sed -e 's?INSTALLDIR_AWK?$(libdir)?' $(srcdir)/classdoc/classdoc.1 > $(man1dir)/classdoc.$(man1ext) uninstall_classdoc: @echo "Removing classdoc and related files" @rm -f $(bindir)/classdoc $(man1dir)/classdoc.$(man1ext) $(libdir)/classdoc.awk install_manpages: install_classdoc for dir in $(SUBDIRS) ; do cd $$dir ; $(MAKE) install_manpages prefix="$(prefix)" MKDIR="$(MKDIR)" man3dir="$(man3dir)" man3ext="$(man3ext)" ; cd .. ; done uninstall_manpages: for dir in $(SUBDIRS) ; do cd $$dir ; $(MAKE) uninstall_manpages prefix="$(prefix)" MKDIR="$(MKDIR)" man3dir="$(man3dir)" man3ext="$(man3ext)" ; cd .. ; done install_all: install install_classdoc install_manpages uninstall_all: uninstall uninstall_classdoc uninstall_manpages clean: rm -f *.o *.a *~ core a.out *.exe rm -fr cxx_repository Templates.DB SunWS_cache ii_files ti_files for dir in $(SUBDIRS) ; do cd $$dir ; $(MAKE) clean ; cd $(SRC_HOME) ; done cd test; $(MAKE) clean distclean: for dir in $(SUBDIRS) ; do cd $$dir ; $(MAKE) distclean ; cd $(SRC_HOME) ; done cd test; $(MAKE) distclean rm -f Makefile config.status config.log config.cache *.o *~ core a.out *.a rm -fr cxx_repository Templates.DB SunWS_cache ii_files ti_files cd config; rm -f Makefile.common CLHEP-*.h check: all @cd test; $(MAKE) CXX="$(CXX)" FC="$(FC)" CXXFLAGS="$(CXXFLAGS)" FFLAGS="$(FFLAGS)" AR="$(AR)" ARFLAGS="$(ARFLAGS)" DEFS="$(DEFS)" TOPINCLUDES="$(TOPINCLUDES)" TOPLIBS="$(TOPLIBS)" TOPLDFLAGS="$(TOPLDFLAGS)" USING_F2C=$(USING_F2C) RANLIB="$(RANLIB)" FLIBS="$(FLIBS)" check depend: ( for dir in $(SUBDIRS) test ; do cd $$dir ; $(MAKE) depend ; cd .. ; done ) classdoc: $(srcdir)/classdoc/classdoc.sh sed -e 's?INSTALLDIR_AWK?.?' -e 's?PAGER?$(CLASSDOCPAGER)?' -e 's?NAWKPROG?$(AWK)?' $(srcdir)/classdoc/classdoc.sh > classdoc/classdoc chmod 755 classdoc/classdoc dist: rm -f distfiles CLHEP-* @for f in $(DISTFILES); \ do \ echo CLHEP-$(VERSION)/$$f >> distfiles ; \ done cd CLHEP; $(MAKE) VERSION="$(VERSION)" dist cd src; $(MAKE) VERSION="$(VERSION)" dist cd test; $(MAKE) VERSION="$(VERSION)" dist ln -s -f . CLHEP-$(VERSION) tar --create --file CLHEP-$(VERSION).tar --files-from distfiles rm -f CLHEP-$(VERSION) distfiles