Geant4 Cross Reference |
1 name := ChargeExchangeMC 1 name := ChargeExchangeMC 2 G4TARGET := $(name) 2 G4TARGET := $(name) 3 G4EXLIB := true 3 G4EXLIB := true 4 4 5 CPPFLAGS += -DCEXMC_PROG_NAME=\"$(name)\" 5 CPPFLAGS += -DCEXMC_PROG_NAME=\"$(name)\" 6 6 7 # if CEXMC_USE_PERSISTENCY is 'yes' then run a 7 # if CEXMC_USE_PERSISTENCY is 'yes' then run and events data can be read and 8 # written; requires boost::serialize headers a 8 # written; requires boost::serialize headers and library 9 CEXMC_USE_PERSISTENCY := no << 9 CEXMC_USE_PERSISTENCY := yes 10 # if CEXMC_USE_CUSTOM_FILTER is 'yes' then Cus 10 # if CEXMC_USE_CUSTOM_FILTER is 'yes' then Custom filter can be used for 11 # existing events data; requires boost::spirit 11 # existing events data; requires boost::spirit 2.x headers. Notice: if 12 # CEXMC_USE_PERSISTENCY is not 'yes' then Cust 12 # CEXMC_USE_PERSISTENCY is not 'yes' then Custom Filter will not be used anyway 13 CEXMC_USE_CUSTOM_FILTER := no 13 CEXMC_USE_CUSTOM_FILTER := no 14 # if CEXMC_DEBUG_CUSTOM_FILTER is 'yes' then A 14 # if CEXMC_DEBUG_CUSTOM_FILTER is 'yes' then AST trees will be printed out 15 CEXMC_DEBUG_CUSTOM_FILTER := no 15 CEXMC_DEBUG_CUSTOM_FILTER := no 16 # if CEXMC_USE_HISTOGRAMING is 'yes' then ROOT 16 # if CEXMC_USE_HISTOGRAMING is 'yes' then ROOT histograming framework will be 17 # compiled. Notice: if ROOT CERN is not instal << 17 # compiled. Notice: if ROOT CERN is not installed in tour system then the 18 # histograming module won't compile anyway 18 # histograming module won't compile anyway 19 CEXMC_USE_HISTOGRAMING := yes 19 CEXMC_USE_HISTOGRAMING := yes 20 # if CEXMC_USE_QGSP_BERT is 'yes' then QGSP_BE << 21 # otherwise - FTFP_BERT or QGSP_BIC_EMY << 22 CEXMC_USE_QGSP_BERT := no << 23 # if CEXMC_USE_QGSP_BIC_EMY is 'yes' then QGSP 20 # if CEXMC_USE_QGSP_BIC_EMY is 'yes' then QGSP_BIC_EMY will be used as basic 24 # physics, otherwise - FTFP_BERT or QGSP_BERT << 21 # physics, otherwise - QGSP_BERT 25 CEXMC_USE_QGSP_BIC_EMY := no 22 CEXMC_USE_QGSP_BIC_EMY := no 26 # if CEXMC_USE_GENBOD is 'yes' then original F 23 # if CEXMC_USE_GENBOD is 'yes' then original FORTRAN routine GENBOD() will be 27 # used as phase space generator 24 # used as phase space generator 28 CEXMC_USE_GENBOD := no 25 CEXMC_USE_GENBOD := no 29 # if CEXMC_DEBUG_TP is 'yes' then additional i 26 # if CEXMC_DEBUG_TP is 'yes' then additional info will be printed on track 30 # points data 27 # points data 31 CEXMC_DEBUG_TP := no 28 CEXMC_DEBUG_TP := no 32 29 33 30 34 ifndef G4INSTALL 31 ifndef G4INSTALL 35 G4INSTALL = ../../.. 32 G4INSTALL = ../../.. 36 endif 33 endif 37 34 >> 35 ifdef BOOST_INCLUDE_PATH >> 36 CPPFLAGS += -I$(BOOST_INCLUDE_PATH) >> 37 endif >> 38 >> 39 ifdef BOOST_LIBRARY_PATH >> 40 EXTRALIBS += -L$(BOOST_LIBRARY_PATH) >> 41 endif >> 42 38 ifeq ($(CEXMC_USE_GENBOD),yes) 43 ifeq ($(CEXMC_USE_GENBOD),yes) 39 CPPFLAGS += -DCEXMC_USE_GENBOD 44 CPPFLAGS += -DCEXMC_USE_GENBOD 40 EXTRALIBS += `cernlib geant321 phtools packl 45 EXTRALIBS += `cernlib geant321 phtools packlib kernlib` 41 GCC_VERSION := $(shell gcc --version | head 46 GCC_VERSION := $(shell gcc --version | head -1 | awk '{ printf $$3 }' | \ 42 awk -F"." '{ printf $ 47 awk -F"." '{ printf $$1 }') 43 ifdef CEXMC_FORTRAN_LIB 48 ifdef CEXMC_FORTRAN_LIB 44 EXTRALIBS += $(CEXMC_FORTRAN_LIB) 49 EXTRALIBS += $(CEXMC_FORTRAN_LIB) 45 else 50 else 46 # try to setup fortran lib automatically 51 # try to setup fortran lib automatically 47 # WARNING: the following is not robust che 52 # WARNING: the following is not robust check because cernlib can be built 48 # against libg2c even when using gcc-4 ser 53 # against libg2c even when using gcc-4 series 49 # Please define CEXMC_FORTRAN_LIB if the c 54 # Please define CEXMC_FORTRAN_LIB if the check fails 50 ifeq ($(GCC_VERSION),3) 55 ifeq ($(GCC_VERSION),3) 51 EXTRALIBS += -lg2c 56 EXTRALIBS += -lg2c 52 else 57 else 53 EXTRALIBS += -lgfortran 58 EXTRALIBS += -lgfortran 54 endif 59 endif 55 endif 60 endif 56 endif 61 endif 57 62 58 ifdef BOOST_INCLUDE_PATH << 59 CPPFLAGS += -I$(BOOST_INCLUDE_PATH) << 60 endif << 61 << 62 ifdef BOOST_LIBRARY_PATH << 63 EXTRALIBS += -L$(BOOST_LIBRARY_PATH) << 64 endif << 65 << 66 ifeq ($(CEXMC_USE_PERSISTENCY),yes) 63 ifeq ($(CEXMC_USE_PERSISTENCY),yes) 67 EXTRALIBS += -lboost_serialization 64 EXTRALIBS += -lboost_serialization 68 CPPFLAGS += -DCEXMC_USE_PERSISTENCY 65 CPPFLAGS += -DCEXMC_USE_PERSISTENCY 69 ifeq ($(CEXMC_USE_CUSTOM_FILTER),yes) 66 ifeq ($(CEXMC_USE_CUSTOM_FILTER),yes) 70 CPPFLAGS += -DCEXMC_USE_CUSTOM_FILTER 67 CPPFLAGS += -DCEXMC_USE_CUSTOM_FILTER 71 ifeq ($(CEXMC_DEBUG_CUSTOM_FILTER),yes) 68 ifeq ($(CEXMC_DEBUG_CUSTOM_FILTER),yes) 72 CPPFLAGS += -DCEXMC_DEBUG_CF 69 CPPFLAGS += -DCEXMC_DEBUG_CF 73 endif 70 endif 74 endif 71 endif 75 endif 72 endif 76 73 77 ifeq ($(CEXMC_USE_HISTOGRAMING),yes) 74 ifeq ($(CEXMC_USE_HISTOGRAMING),yes) 78 # try to determine if ROOT will be used auto 75 # try to determine if ROOT will be used automatically 79 USE_ROOT := $(shell which root-config 2>/dev 76 USE_ROOT := $(shell which root-config 2>/dev/null) 80 ifneq ($(USE_ROOT),) << 77 ifneq ($(USE_ROOT)),) 81 CPPFLAGS += -I`root-config --incdir` 78 CPPFLAGS += -I`root-config --incdir` 82 EXTRALIBS += `root-config --libs` 79 EXTRALIBS += `root-config --libs` 83 CPPFLAGS += -DCEXMC_USE_ROOT 80 CPPFLAGS += -DCEXMC_USE_ROOT 84 # try to determine if ROOT-Qt binding will 81 # try to determine if ROOT-Qt binding will be used automatically 85 USE_ROOTQT := $(shell root-config --featur 82 USE_ROOTQT := $(shell root-config --features | grep qt) 86 ifneq ($(USE_ROOTQT),) 83 ifneq ($(USE_ROOTQT),) 87 EXTRALIBS += -lGQt 84 EXTRALIBS += -lGQt 88 CPPFLAGS += -DCEXMC_USE_ROOTQT 85 CPPFLAGS += -DCEXMC_USE_ROOTQT 89 endif 86 endif 90 endif 87 endif 91 endif 88 endif 92 89 93 ifeq ($(CEXMC_USE_QGSP_BERT),yes) << 90 ifeq ($(CEXMC_USE_QGSP_BIC_EMY),yes) 94 CPPFLAGS += -DCEXMC_USE_QGSP_BERT << 91 CPPFLAGS += -DCEXMC_USE_QGSP_BIC_EMY 95 else << 96 ifeq ($(CEXMC_USE_QGSP_BIC_EMY),yes) << 97 CPPFLAGS += -DCEXMC_USE_QGSP_BIC_EMY << 98 endif << 99 endif 92 endif 100 93 101 ifeq ($(CEXMC_DEBUG_TP),yes) 94 ifeq ($(CEXMC_DEBUG_TP),yes) 102 CPPFLAGS += -DCEXMC_DEBUG_TP 95 CPPFLAGS += -DCEXMC_DEBUG_TP 103 endif 96 endif 104 97 105 .PHONY: all 98 .PHONY: all 106 all: lib bin 99 all: lib bin 107 100 108 include $(G4INSTALL)/config/binmake.gmk 101 include $(G4INSTALL)/config/binmake.gmk 109 <<