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