Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 09:19:39

0001 name := ChargeExchangeMC
0002 G4TARGET := $(name)
0003 G4EXLIB := true
0004 
0005 CPPFLAGS += -DCEXMC_PROG_NAME=\"$(name)\"
0006 
0007 # if CEXMC_USE_PERSISTENCY is 'yes' then run and events data can be read and
0008 # written; requires boost::serialize headers and library
0009 CEXMC_USE_PERSISTENCY := no
0010 # if CEXMC_USE_CUSTOM_FILTER is 'yes' then Custom filter can be used for
0011 # existing events data; requires boost::spirit 2.x headers. Notice: if
0012 # CEXMC_USE_PERSISTENCY is not 'yes' then Custom Filter will not be used anyway
0013 CEXMC_USE_CUSTOM_FILTER := no
0014 # if CEXMC_DEBUG_CUSTOM_FILTER is 'yes' then AST trees will be printed out
0015 CEXMC_DEBUG_CUSTOM_FILTER := no
0016 # if CEXMC_USE_HISTOGRAMING is 'yes' then ROOT histograming framework will be
0017 # compiled. Notice: if ROOT CERN is not installed in your system then the
0018 # histograming module won't compile anyway
0019 CEXMC_USE_HISTOGRAMING := yes
0020 # if CEXMC_USE_QGSP_BERT is 'yes' then QGSP_BERT will be used as basic physics,
0021 # otherwise - FTFP_BERT or QGSP_BIC_EMY
0022 CEXMC_USE_QGSP_BERT := no
0023 # if CEXMC_USE_QGSP_BIC_EMY is 'yes' then QGSP_BIC_EMY will be used as basic
0024 # physics, otherwise - FTFP_BERT or QGSP_BERT
0025 CEXMC_USE_QGSP_BIC_EMY := no
0026 # if CEXMC_USE_GENBOD is 'yes' then original FORTRAN routine GENBOD() will be
0027 # used as phase space generator
0028 CEXMC_USE_GENBOD := no
0029 # if CEXMC_DEBUG_TP is 'yes' then additional info will be printed on track
0030 # points data
0031 CEXMC_DEBUG_TP := no
0032 
0033 
0034 ifndef G4INSTALL
0035   G4INSTALL = ../../..
0036 endif
0037 
0038 ifeq ($(CEXMC_USE_GENBOD),yes)
0039   CPPFLAGS += -DCEXMC_USE_GENBOD
0040   EXTRALIBS += `cernlib geant321 phtools packlib kernlib`
0041   GCC_VERSION := $(shell gcc --version | head -1 | awk '{ printf $$3 }' | \
0042                          awk -F"." '{ printf $$1 }')
0043   ifdef CEXMC_FORTRAN_LIB
0044     EXTRALIBS += $(CEXMC_FORTRAN_LIB)
0045   else
0046     # try to setup fortran lib automatically
0047     # WARNING: the following is not robust check because cernlib can be built
0048     # against libg2c even when using gcc-4 series
0049     # Please define CEXMC_FORTRAN_LIB if the check fails
0050     ifeq ($(GCC_VERSION),3)
0051       EXTRALIBS += -lg2c
0052     else
0053       EXTRALIBS += -lgfortran
0054     endif
0055   endif
0056 endif
0057 
0058 ifdef BOOST_INCLUDE_PATH
0059   CPPFLAGS += -I$(BOOST_INCLUDE_PATH)
0060 endif
0061 
0062 ifdef BOOST_LIBRARY_PATH
0063   EXTRALIBS += -L$(BOOST_LIBRARY_PATH)
0064 endif
0065 
0066 ifeq ($(CEXMC_USE_PERSISTENCY),yes)
0067   EXTRALIBS += -lboost_serialization
0068   CPPFLAGS += -DCEXMC_USE_PERSISTENCY
0069   ifeq ($(CEXMC_USE_CUSTOM_FILTER),yes)
0070     CPPFLAGS += -DCEXMC_USE_CUSTOM_FILTER
0071     ifeq ($(CEXMC_DEBUG_CUSTOM_FILTER),yes)
0072       CPPFLAGS += -DCEXMC_DEBUG_CF
0073     endif
0074   endif
0075 endif
0076 
0077 ifeq ($(CEXMC_USE_HISTOGRAMING),yes)
0078   # try to determine if ROOT will be used automatically
0079   USE_ROOT := $(shell which root-config 2>/dev/null)
0080   ifneq ($(USE_ROOT),)
0081     CPPFLAGS += -I`root-config --incdir`
0082     EXTRALIBS += `root-config --libs`
0083     CPPFLAGS += -DCEXMC_USE_ROOT
0084     # try to determine if ROOT-Qt binding will be used automatically
0085     USE_ROOTQT := $(shell root-config --features | grep qt)
0086     ifneq ($(USE_ROOTQT),)
0087       EXTRALIBS += -lGQt
0088       CPPFLAGS += -DCEXMC_USE_ROOTQT
0089     endif
0090   endif
0091 endif
0092 
0093 ifeq ($(CEXMC_USE_QGSP_BERT),yes)
0094   CPPFLAGS += -DCEXMC_USE_QGSP_BERT
0095 else
0096   ifeq ($(CEXMC_USE_QGSP_BIC_EMY),yes)
0097     CPPFLAGS += -DCEXMC_USE_QGSP_BIC_EMY
0098   endif
0099 endif
0100 
0101 ifeq ($(CEXMC_DEBUG_TP),yes)
0102   CPPFLAGS += -DCEXMC_DEBUG_TP
0103 endif
0104 
0105 .PHONY: all
0106 all: lib bin
0107 
0108 include $(G4INSTALL)/config/binmake.gmk
0109