Geant4 Cross Reference |
1 # -------------------------------------------- 1 # ---------------------------------------------------------------- 2 # GNUmakefile for examples module with externa 2 # GNUmakefile for examples module with external Fortran generators 3 # -------------------------------------------- 3 # ---------------------------------------------------------------- 4 4 5 name := Hadr02 5 name := Hadr02 6 G4TARGET := $(name) 6 G4TARGET := $(name) 7 G4EXLIB := true 7 G4EXLIB := true 8 8 9 URQMDDIR= urqmd1_3 9 URQMDDIR= urqmd1_3 10 HIJINGDIR= hijing1_383 10 HIJINGDIR= hijing1_383 11 CRMCDIR= ${CRMCROOT} << 11 CRMCDIR= crmc_interface 12 12 13 ifndef G4INSTALL 13 ifndef G4INSTALL 14 G4INSTALL = ../../../.. 14 G4INSTALL = ../../../.. 15 endif 15 endif 16 16 17 include $(G4INSTALL)/config/architecture.gmk 17 include $(G4INSTALL)/config/architecture.gmk 18 18 19 .PHONY: all 19 .PHONY: all 20 all: urqmd hijing crmc lib bin 20 all: urqmd hijing crmc lib bin 21 21 22 22 23 urqmd: 23 urqmd: 24 ifdef G4_USE_URQMD 24 ifdef G4_USE_URQMD 25 (cd ${URQMDDIR} && \ 25 (cd ${URQMDDIR} && \ 26 cp GNUmakefile urqmd-1.3cr && cp *.f urqmd-1 << 26 cp GNUmakefile urqmd-1.3cr && cp *.f urqmd-1.3cr &&\ 27 cd urqmd-1.3cr && ${MAKE} TYPE="G4INTERFACE" << 27 cd urqmd-1.3cr && ${MAKE} TYPE="G4INTERFACE"); 28 ( mv ${URQMDDIR}/urqmd-1.3cr/obj_G4INTERFACE 28 ( mv ${URQMDDIR}/urqmd-1.3cr/obj_G4INTERFACE/*.o ${G4TMPDIR} ); 29 endif 29 endif 30 30 31 ifdef G4_USE_URQMD 31 ifdef G4_USE_URQMD 32 CPPFLAGS += -DG4_USE_URQMD 32 CPPFLAGS += -DG4_USE_URQMD 33 33 34 EXTRALIBS = -lgfortran -lgmp -lmpfr \ 34 EXTRALIBS = -lgfortran -lgmp -lmpfr \ 35 -L${CERNLIB}/lib -lmathlib -lkernlib -lpackl << 35 -L${CERNLIB}/lib -lmathlib -lkernlib -lpacklib 36 endif 36 endif 37 37 38 hijing: 38 hijing: 39 ifdef G4_USE_HIJING 39 ifdef G4_USE_HIJING 40 (cd ${HIJINGDIR} && ${MAKE}); 40 (cd ${HIJINGDIR} && ${MAKE}); 41 (mv ${HIJINGDIR}/obj_Linux/*.o ${G4TMPDIR}); 41 (mv ${HIJINGDIR}/obj_Linux/*.o ${G4TMPDIR}); 42 endif 42 endif 43 43 44 ifdef G4_USE_HIJING 44 ifdef G4_USE_HIJING 45 CPPFLAGS += -DG4_USE_HIJING 45 CPPFLAGS += -DG4_USE_HIJING 46 EXTRALIBS = -lgfortran -lgmp -lmpfr \ << 46 EXTRALIBS = -lgfortran 47 -L${CERNROOT}/lib -lmathlib -lkernlib -lpack << 47 -lgmp -lmpfr \ >> 48 -L${CERNROOT}/lib -lmathlib -lkernlib -lpacklib -lpawlib 48 endif 49 endif 49 50 50 crmc: 51 crmc: 51 ifdef G4_USE_CRMC 52 ifdef G4_USE_CRMC 52 (cp ${CRMCDIR}/Build/lib/*.so ${G4TMPDIR}); 53 (cp ${CRMCDIR}/Build/lib/*.so ${G4TMPDIR}); 53 (cp ${CRMCDIR}/Build/crmc.param .); 54 (cp ${CRMCDIR}/Build/crmc.param .); 54 endif 55 endif 55 56 56 ifdef G4_USE_CRMC 57 ifdef G4_USE_CRMC 57 CPPFLAGS += -DG4_USE_CRMC -I${CRMCDIR}/Build 58 CPPFLAGS += -DG4_USE_CRMC -I${CRMCDIR}/Build/src -I${CRMCDIR}/src 58 EXTRALIBS = -lgfortran -lgmp -lmpfr \ 59 EXTRALIBS = -lgfortran -lgmp -lmpfr \ 59 -L${CRMCDIR}/Build/lib/ -lCrmc << 60 -L${CRMCDIR}/Build/lib/ -lCrmc 60 ### -L${CRMCDIR}/Build/lib/ -lCrmc -lGeantCrmc << 61 endif 61 endif 62 62 63 include $(G4INSTALL)/config/binmake.gmk 63 include $(G4INSTALL)/config/binmake.gmk 64 64 65 dclean: 65 dclean: 66 @rm -f $(G4WORKDIR)/tmp/$(G4SYSTEM)/$(G4TARG 66 @rm -f $(G4WORKDIR)/tmp/$(G4SYSTEM)/$(G4TARGET)/G4DPMJET2_5Model.o 67 67 68 histclean: 68 histclean: 69 @rm -f $(G4WORKDIR)/tmp/$(G4SYSTEM)/$(G4TARG 69 @rm -f $(G4WORKDIR)/tmp/$(G4SYSTEM)/$(G4TARGET)/Histo.o 70 70 71 visclean: 71 visclean: 72 @rm -f g4*.prim g4*.eps g4*.wrl 72 @rm -f g4*.prim g4*.eps g4*.wrl 73 @rm -f .DAWN_* 73 @rm -f .DAWN_* 74 # 74 #