#============================================================================= # # Purpose: Link Driver analysis program called # # For the User: # ------------- # Here is a quick crib on how to use this file. It is assumed you have # a directory 'build' on the machine you wish to compile on. Also it # is assumed all the driver source code exists in and below one directory. # This directory is assumed to be $USER_SRC/. # (a) Copy this file into the directory build/ and name your # copy of this file 'Makefile'. # (Provided the environment variable JOB is not set, the file # will pick up the job from the directory. If you want # to build an executable with a different then add # 'JOB=' to the gmake command line. See note below # no command line overrides.) # (b) If necessary, change the libraries in CLEO_LIBS and change # the include areas in CLEO_INCS # (c) If you have any of your own extra libraries add them to the # USER_LIBS definition and any include area should be added to # USER_INCS. The user libraries should be located in either # the build/lib or ~/lib directories. (Note: At this point you # should remove 'rchk' from the list USER_LIBS) # (d) If you want to force you routines to load (especially if they # are modifications of standard CLEO routines) add your routines # to the list UNDEF (see DRIVERUNDEF for example format). DO NOT # add them to USER_OBJS unless they are pre-compiled object # files. # (e) If you have code stored in subdirectories below the # directory include the subdirectories in the variable DIR_LIST. # (f) Check that environment variable USER_SRC is set to the # directory *above* the source code. Note: this can be an NFSD # mounted directory, for instance on the AXP/OSF USER_SRC # might be defined as # /home/ds/soft/src # and the source code and include files are stored in and # below the directory # /home/ds/soft/src/ # (This means you do not have to move the source between platforms) # (g) Execute the command: # gmake # # The executable should appear in build/bin/ and the driver code # will be in build/lib/lib.a # # To compile and link a debug version execute the line: # gmake DEBUG=y # this will create a debug version of the driver code in # build/lib/lib_g.a and link to user and CLEO debug libraries. # # Once you have run 'gmake' once, if you all you do is edit your # source code then you can get quicker performance by using the # command line: # gmake program # However if you have added or removed files, changed any file # dependencies or edited the Makefile itself then you need to issue # the 'gmake' command on its own (see step (f)). # # You can override any symbol used in a makefile by specifying the new # symbol on the 'gmake' command line, for example # gmake USER_OBJS=myfunc.o # It is important to remember that this approach OVERRIDES the makefile # value. IF you just which to add extra information to the current # makefile value the 'XTRA_????' symbols have been created. Look through # this file to see which symbols add to the makefile symbols. For # example if you just want to trace the calling routines of the function # 'myfunc_' just once then you can issue the command # gmake XTRA_FFLAGS="-Wl,ymyfunc_" # and that option will be added to USER_FFLAGS. # #============================================================================= SHELL = /bin/sh # #---------------------------- # name of job and executable #---------------------------- JOB = example EXE = $(JOB) DEBUG = y #---------------------------------------- # List of subdirectories containing code #---------------------------------------- DIR_LIST = . #--------------------- # Set up CLEO library #--------------------- CLEOLIB = $(C_LIB)/lib #------------------------------------ # USER, CLEO and CERN object modules #------------------------------------ USER_LIBS = kwfit USER_OBJS = anal1.o anal2.o anal3.o \ make_kpi_list.o vtx_primary.o CLEO_OBJS = $(CLEOLIB)/driver.o $(CLEOLIB)/rpuser.o CERN_OBJS = $(CERNLIB)/cernpatch.o #------------------------------------------------------- # list of include directories # USER_INCS should be defined with respect to USER_SRC # CLEO_INCS should be defined with respect to C_CVSSRC # (don't forget to leave the "." in the CLEO_INCS list) #------------------------------------------------------- #USER_SRC = $(HOME)/cvssrc USER_SRC = .. CLEO_INCS = . #--------------------------------------- # USER, CLEO and CERN libraries to load #--------------------------------------- CLEO_LIBS = rplib dvlib dvhlib_hbook clror2 gzroar_dummy\ cleoii fixes ceid roarlib qqlib rutil evcl\ evttag pizero knvf vfnd\ xbal ccc lsqfit track mutr\ trio shape2 dvdummy cleoks_driver CERN_LIBS = packlib mathlib #------------------------------------------------- # list of undefined symbols specified by the user #------------------------------------------------- USER_UNDEF = -Wl,-u,anal1_,-u,anal2_,-u,anal3_,-u,anal4_,-u,anal5_ #-------------------------------------------------------- # force loading of these routines from DVLIB not DVDUMMY #-------------------------------------------------------- DRIVERUNDEF = -Wl,-u,dvluns_,-u,rpcmd_ #----------------------------------- # make up list of undefined symbols #----------------------------------- UNDEF = $(USER_UNDEF) $(DRIVERUNDEF) #-------------------------------------------------------------- # extra fortran flags (standard and machine flags added later) #-------------------------------------------------------------- USER_FFLAGS = #--------------------------------------------- # #define for cpp, define SELECT symbols here #--------------------------------------------- USER_DEFS = #-------------------------------------------------------------- # invoke standard tail to Makefile to execute compile and link #-------------------------------------------------------------- include $(HOME)/tail/M.exe.tail # # $Id: Makefile,v 1.4 1995/01/17 10:38:01 prescott Exp $ # # DO NOT DELETE THIS LINE -- make depend depends on it.