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
0008
0009 CEXMC_USE_PERSISTENCY := no
0010
0011
0012
0013 CEXMC_USE_CUSTOM_FILTER := no
0014
0015 CEXMC_DEBUG_CUSTOM_FILTER := no
0016
0017
0018
0019 CEXMC_USE_HISTOGRAMING := yes
0020
0021
0022 CEXMC_USE_QGSP_BERT := no
0023
0024
0025 CEXMC_USE_QGSP_BIC_EMY := no
0026
0027
0028 CEXMC_USE_GENBOD := no
0029
0030
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
0047
0048
0049
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
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
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