Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-23 09:21:08

0001 # --------------------------------------------------------------
0002 # GNUmakefile for examples module.  Gabriele Cosmo, 06/04/98.
0003 # --------------------------------------------------------------
0004 name := HepMCEx01
0005 G4TARGET := $(name)
0006 G4EXLIB := true
0007 
0008 ifndef G4INSTALL
0009   G4INSTALL = ../../../../..
0010 endif
0011 
0012 .PHONY: all
0013 
0014 ifdef HEPMC_DIR
0015 all : pythia6 lib bin
0016 # if you do not use Pythia library, replace the line above with the one below.
0017 # all : lib bin
0018 
0019   include $(G4INSTALL)/config/binmake.gmk
0020 
0021   # -----------------------------------------------------------------
0022   # HepMC and PYTHIA
0023 
0024   # if you do not use Pythia library, comment out the next line.
0025   #
0026   G4LIB_USE_PYTHIA := 1
0027   ifdef G4LIB_USE_PYTHIA
0028     CPPFLAGS += -DG4LIB_USE_PYTHIA
0029   endif
0030 
0031   INCFLAGS  += -I$(HEPMC_DIR)/include
0032 
0033   ifdef G4LIB_USE_PYTHIA
0034       LDLIBS1  += -L$(HEPMC_DIR)/lib -lHepMC -lHepMCfio -L$(G4TMPDIR) -lPythia6 -lg2c
0035   else
0036       LDLIBS1  += -L$(HEPMC_DIR)/lib -lHepMC -lHepMCfio $(G4TMPDIR)/HEPEvtcom.o
0037   endif
0038 
0039   # Path for PYTHIA Fortran library. Based on CERNLIB-2005.
0040   # Add "/cern/pro/bin" to $PATH first !
0041   #
0042   #ifdef G4LIB_USE_PYTHIA 
0043   #  LDLIBS1     += $(shell cernlib -v pro pythia6205 pdflib804 mathlib) -lg2c
0044   #endif
0045 
0046 FCFLAGS += -c
0047 
0048 pythia6: $(G4TMPDIR)/libPythia6.so
0049 
0050 $(G4TMPDIR)/libPythia6.so: $(G4TMPDIR)/pythia6.o
0051         $(FC) -shared -Wl,-soname,libPythia6.so -o $(G4TMPDIR)/libPythia6.so  $(G4TMPDIR)/pythia6.o
0052  
0053 $(G4TMPDIR)/pythia6.o:
0054         $(FC) $(FCFLAGS) $(PYTHIA6)/pythia-$(PYTHIA6_VERSION).f -o $(G4TMPDIR)/pythia6.o
0055 
0056 else
0057 
0058 all:
0059         @echo 'ERROR - HEPMC_DIR not defined in the environment !'
0060         @echo '        Requires HepMC release 1.27.'
0061 endif