(file) Return to Makefile CVS log (file) (dir) Up to [HallC] / simc_semi

File: [HallC] / simc_semi / Makefile (download)
Revision: 1.2, Tue May 4 19:56:37 2004 UTC (20 years, 4 months ago) by gaskelld
Branch: MAIN
CVS Tags: baryon, NoPoltar
Changes since 1.1: +1 -1 lines
Changes for rho0 generation

## This makefile must be executed with gmake (gnu make).

## These will have to be modified when setting up your own simc.  They
## point to the software necessary to run simc.

## ARGONNE DEFAULT SETUP FLAGS:
#simcdir = .
#Csoft = /disk1/users/reinhold/Csoft/05Dec1996

## CEBAF DEFAULT SETUP FLAGS:
simcdir = .
Csoft = /group/hallc/Csoft/Analyzer

## THE REST SHOULD BE OK WITHOUT MODIFICATION.

## This tells make not to delete these target files on error/interrupt (see man page)
.PRECIOUS: *.o sos/*.o hms/*.o hrsl/*.o hrsr/*.o shms/*.o

RM        = rm -f 
SHELL     = /bin/sh
S	= $(simcdir)/sos/
H	= $(simcdir)/hms/
L	= $(simcdir)/hrsl/
R	= $(simcdir)/hrsr/
A	= $(simcdir)/shared/
SH	= $(simcdir)/shms/
T       = $(simcdir)/cteq5/

OBJ1	= target.o brem.o gauss1.o NtupleInit.o NtupleClose.o enerloss_new.o
OBJ2	= radc.o init.o dbase.o physics_kaon.o physics_pion.o physics_delta.o physics_proton.o loren.o sf_lookup.o
OBJ3    = semi_physics.o rho_physics.o rho_decay.o generate_rho.o
OBJ4	= results_write.o event.o mt19937.o jacobians.o
OBJ5	= $(A)musc.o $(A)musc_ext.o $(A)project.o $(A)transp.o
OBJ6	= $(A)rotate_haxis.o $(A)locforunt.o
OBJ7	= $(H)mc_hms.o $(H)mc_hms_hut.o $(H)mc_hms_recon.o
OBJ8	= $(S)mc_sos.o $(S)mc_sos_hut.o $(S)mc_sos_recon.o
OBJ9	= $(R)mc_hrsr.o $(R)mc_hrsr_hut.o $(R)mc_hrsr_recon.o
OBJA	= $(L)mc_hrsl.o $(L)mc_hrsl_hut.o $(L)mc_hrsl_recon.o
OBJB	= $(SH)mc_shms.o $(SH)mc_shms_hut.o $(SH)mc_shms_recon.o
OBJC    = $(T)Ctq5Pdf.o
my_objs	=  $(OBJ1) $(OBJ2) $(OBJ3) $(OBJ4) $(OBJ5) $(OBJ6) $(OBJ7) $(OBJ8) $(OBJ9) $(OBJA) $(OBJB) $(OBJC)

MYOS := $(subst -,,$(shell uname))
CERNLIBS = -lgeant$(GEANTVER) -lpawlib -lgraflib -lgrafX11 -lpacklib -lmathlib

ifeq ($(MYOS),HPUX)
  ifneq (,$(findstring 09,$(shell uname -r)))
    HPUXVERSION := 09
  else
    HPUXVERSION := 10
  endif
  LIBROOT = $(Csoft)/../$(MYOS)$(HPUXVERSION)/lib
else
  LIBROOT = $(Csoft)/../$(MYOS)/lib
endif

ifeq ($(MYOS),HPUX)
  CERN_ROOT = /site/cernlib/hp700_ux90/96a
#  CERN_ROOT = /site/cernlib/hp_ux102/97a
#  FFLAGS=+U77 +ppu -C +e +es +FPVZOU -O +Onolimit -R8 -G
  FFLAGS=+U77 +ppu -C +e +es +FPVZOU -O +Onolimit -R8
  FFLAG1=+U77 +ppu -C +e +es +FPVZOu -c -R8
  OTHERLIBS = \
        -Wl,-L$(LIBROOT) -lctp \
        -Wl,-L$(CERN_ROOT)/lib $(CERNLIBS) \
        -Wl,-L/usr/lib/X11R5 -lX11 -lm
endif

ifeq ($(MYOS),ULTRIX)
  FFLAGS=-check_bounds
  FFLAG1=$(FFLAGS)
  LDFLAGS=
  OTHERLIBS = -L$(CERN_ROOT)/lib $(CERNLIBS)
endif

#ifeq ($(MYOS),Linux)
#  FFLAGS=-I$(Csoft)/SRC/INCLUDE
#  FFLAG1=$(FFLAGS)
#  OTHERLIBS = -L$(LIBROOT) -lctp \
#        -L$(CERN_ROOT)/lib $(CERNLIBS) -lc -lm
#  F77=Af77
#endif

# need to define: setenv ABSOFT /apps/absoft/PRO/usr/absoft
#
# meaning of flags for ABSOFT compiler
#
# -O  (-g) generate optimized(debuggable) code
# -V  accept source code in VAX TAB format
# -f  fold all symbolic names to lower case
# -W  accept wide format, 132 columns (but not more tha that
# -s  all program storage is treated as static
# -B108 apply a single underscore to the names of subroutines and functions
# -B100 (B101) generate code optimized for Pentium II or higher that
#              will not (will still) run on a Pentium
# -N1 all variables initalized with DATA statements are stored as static
# -N2 use real*8 or complex*16 intrinsic functions, overriding real*4 and
#     complex specifications
# -N22 append an undersocre to the names of common blocks instead of prepending
#      _C
# -N90 pass arguments in the same manner as g77 and f2c(g2c)
# -N113 promote real and complex data types without explicit type/length
#       declaration to real*8 and complex*16
#
ifeq ($(MYOS),Linux)
# Uncomment these two lines for redhat 7.2
#  ABSOFT=/apps/absoft/PRO/usr/absoft
#  CERN_ROOT=/apps/cernlib/i386_redhat72/2001
# Uncomment these two lines for Enterprise Linux 3.
  ABSOFT=/apps/absoft/PRO/opt/absoft
  CERN_ROOT = /apps/cernlib/i386_rhel3/2003
  FABSFLAGS=-O -V -W -f -s -N1 -B108 -B100 -N90 -N22 -N2 -N113
  INCLUDES=-I.,..,./sos,./hms,./hrsr,./hrsl,./shms,$(Csoft)/SRC/INCLUDE 
  EXTRAFLAGS=-DABSOFTFORTRAN
  FFLAGS= $(INCLUDES) $(FABSFLAGS) $(EXTRAFLAGS)
  FFLAG1=$(FFLAGS) -c
  OTHERLIBS = -L$(LIBROOT) -lctp \
        -L$(CERN_ROOT)/lib $(CERNLIBS) -lV77 -lU77 -lg2c -lc -lm \
	-lnsl -lcrypt
# Uncomment the last line above (-lnsl -lcrypt) if you are using cernlib 2001.
  FC  := $(ABSOFT)/bin/f77
  F77 :=$(ABSOFT)/bin/f77
endif

ifeq ($(MYOS),SunOS)
  CERN_ROOT = /site/cernlib/sun4_solaris2/97a
  FFLAGS=-e -O -I$(Csoft)/SRC/INCLUDE -ftrap=no%underflow
  FFLAG1=$(FFLAGS) -c $<
  ifeq ($(OSTYPE),SunOS4)
    OTHERLIBS = -L$(LIBROOT) -lctp -L$(CERN_ROOT)/lib $(CERNLIBS) -lnsl -lX11
  else
    OTHERLIBS = -L$(LIBROOT) -lctp -L$(CERN_ROOT)/lib $(CERNLIBS) -lnsl -lsocket -lX11
  endif
endif

ifeq ($(MYOS),AIX)
  F77=f77
  FFLAGS=-g -qfixed=132 -qextname -O -I$(Csoft)/SRC/INCLUDE
  FFLAG1=$(FFLAGS)
  OTHERLIBS = -L$(LIBROOT) -lctp -L$(CERN_ROOT)/lib $(CERNLIBS) -lX11
endif

ifeq ($(MYOS),OSF1)
  F77=f77
  CERN_ROOT = /disk1/lib/cern/new
  LIBROOT = $(Csoft)/OSF1/lib
  FFLAGS= -r8 -extend_source -Wl,-taso -I -warn argument_checking \
        -warn declarations -warn truncated_source -warn unused -check bounds \
	-align dcommons
  FFLAG1= -C -r8 -extend_source -Wl,-taso -I -g -c -warn argument_checking \
        -warn declarations -warn truncated_source -warn unused -check bounds \
	-align dcommons
  LDFLAGS= 
  OTHERLIBS = -Wl,-L$(LIBROOT) -lctp -Wl,-L$(CERN_ROOT)/lib \
        $(CERNLIBS) -Wl,-L/usr/lib/X11R5 -lX11 -lm 
endif

%.o: %.f
	$(F77) $(FFLAGS) -c $< -o $@

$(S)/%.o: $(S)/%.f
	$(F77) $(FFLAGS) -c $< -o $@

$(H)/%.o: $(H)/%.f
	$(F77) $(FFLAGS) -c $< -o $@

$(L)/%.o: $(L)/%.f
	$(F77) $(FFLAGS) -c $< -o $@

$(R)/%.o: $(R)/%.f
	$(F77) $(FFLAGS) -c $< -o $@

$(SH)/%.o: $(SH)/%.f
	$(F77) $(FFLAGS) -c $< -o $@

none: simc

all: simc

simc: simc.o $(my_objs) Makefile
	$(F77) -o $@ $(FFLAGS) $(my_objs) simc.o $(OTHERLIBS)

# These routines have HP problems, and need to be compiled without optimization.

simc.o: simc.f
	$(F77) $(FFLAG1) simc.f

init.o: init.f
	$(F77) $(FFLAG1) init.f

event.o: event.f
	$(F77) $(FFLAG1) event.f

dbase.o: dbase.f
	$(F77) $(FFLAG1) dbase.f

physics.o: physics.f
	$(F77) $(FFLAG1) physics.f

results_write.o: results_write.f
	$(F77) $(FFLAG1) results_write.f


clean:
	$(RM) *.o $(H)*.o $(S)*.o $(L)*.o $(R)*.o $(SH)*.o $(A)*.o $(T)*.o simc

Analyzer/Replay: Mark Jones, Documents: Stephen Wood
Powered by
ViewCVS 0.9.2-cvsgraph-1.4.0