File indexing completed on 2024-10-17 22:59:08
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038 ifdef INTEL_LICENSE_FILE
0039
0040 ICC := icc
0041 CXX := ${ICC}
0042 else ifdef OSXGCC5
0043 CXX := c++-mp-5
0044 TBB_PREFIX := /opt/local
0045 else ifdef OSXMPCLANG
0046 CXX := ${OSXMPCLANG} -Wall -Wno-unknown-pragmas -Wno-missing-braces
0047 TBB_PREFIX := /opt/local
0048 endif
0049
0050
0051
0052
0053 OPT := -g -Ofast
0054
0055
0056
0057 ifdef AVX_512
0058 VEC_GCC := -march=x86-64-v4
0059
0060 VEC_ICC := -xHost -qopt-zmm-usage=high
0061 else ifdef AVX2
0062 VEC_GCC := -march=x86-64-v3
0063
0064 VEC_ICC := -mavx2 -mfma
0065 else ifdef SSE3
0066 VEC_GCC := -march=x86-64-v2
0067
0068
0069 VEC_ICC := -msse3
0070 else
0071
0072 VEC_GCC := -mavx
0073 VEC_ICC := -mavx
0074 endif
0075
0076
0077
0078 USE_INTRINSICS := -DMPLEX_USE_INTRINSICS
0079
0080
0081
0082 USE_VTUNE_NOTIFY := 1
0083
0084
0085
0086
0087 WITH_TBB := 1
0088
0089
0090
0091
0092
0093
0094
0095
0096 CPPFLAGS := ${USE_INTRINSICS} -DMKFIT_STANDALONE
0097 CXXFLAGS := -fPIC ${OPT} ${OSX_CXXFLAGS}
0098
0099 LDFLAGS_HOST :=
0100
0101 CPPFLAGS += ${INWARD_FIT}
0102
0103
0104
0105
0106
0107
0108
0109 ifdef WITH_ROOT
0110
0111 endif
0112
0113 ifdef USE_VTUNE_NOTIFY
0114 ifdef VTUNE_AMPLIFIER_XE_2017_DIR
0115 CPPFLAGS += -I$(VTUNE_AMPLIFIER_XE_2017_DIR)/include -DUSE_VTUNE_PAUSE
0116 LDFLAGS_HOST += -L$(VTUNE_AMPLIFIER_XE_2017_DIR)/lib64 -littnotify
0117 endif
0118 endif
0119
0120 ifeq (${CXX}, ${ICC})
0121 VEC_HOST := ${VEC_ICC}
0122 CXXFLAGS += -qopt-report=5 -qopenmp-simd -qopt-report-phase=all
0123 else
0124 VEC_HOST := ${VEC_GCC}
0125 endif
0126
0127 ifeq ($(CXX), g++)
0128
0129
0130
0131
0132
0133
0134 CXXFLAGS += -pthread -pipe -Werror=main -Werror=pointer-arith -Werror=overlength-strings -Wno-vla -Werror=overflow -ftree-vectorize -Werror=array-bounds -Werror=format-contains-nul -Werror=type-limits -fvisibility-inlines-hidden -fno-math-errno --param vect-max-version-for-alias-checks=50 -Xassembler --compress-debug-sections -Wno-error=array-bounds -Warray-bounds -fuse-ld=bfd -felide-constructors -fmessage-length=0 -Wall -Wno-non-template-friend -Wno-long-long -Wreturn-type -Wextra -Wpessimizing-move -Wclass-memaccess -Wno-cast-function-type -Wno-unused-but-set-parameter -Wno-ignored-qualifiers -Wno-unused-parameter -Wunused -Wparentheses -Werror=return-type -Werror=unused-value -Werror=unused-label -Werror=address -Werror=format -Werror=sign-compare -Werror=write-strings -Werror=delete-non-virtual-dtor -Werror=strict-aliasing -Werror=narrowing -Werror=unused-but-set-variable -Werror=reorder -Werror=unused-variable -Werror=conversion-null -Werror=return-local-addr -Wnon-virtual-dtor -Werror=switch -fdiagnostics-show-option -Wno-unused-local-typedefs -Wno-attributes -Wno-psabi
0135 endif
0136
0137
0138
0139
0140
0141 ifneq ($(CXX),icc)
0142 CXXFLAGS += -fdiagnostics-color=auto -fdiagnostics-show-option -fopenmp-simd
0143
0144 CXXFLAGS += -fno-reciprocal-math -mrecip=none
0145 endif
0146
0147
0148 ifneq ($(CXX),icc)
0149 ifndef TBB_PREFIX
0150 ifdef CMSSW_BASE
0151 CPPFLAGS += -I$(shell cd $$CMSSW_BASE && scram tool tag tbb INCLUDE)
0152 LDFLAGS_HOST += -L$(shell cd $$CMSSW_BASE && scram tool tag tbb LIBDIR)
0153 else ifdef TBB_GCC
0154 TBB_PREFIX = $(TBB_GCC)
0155 endif
0156 endif
0157 endif
0158
0159 ifdef WITH_TBB
0160
0161 ifdef TBB_PREFIX
0162 CPPFLAGS += -I${TBB_PREFIX}/include
0163 LDFLAGS += -L${TBB_PREFIX}/lib -Wl,-rpath,${TBB_PREFIX}/lib
0164 endif
0165 CPPFLAGS += -DTBB
0166 LDFLAGS += -ltbb
0167 endif
0168
0169 CPPFLAGS_NO_ROOT := ${CPPFLAGS}
0170 LDFLAGS_NO_ROOT := ${LDFLAGS}
0171
0172 ifdef WITH_ROOT
0173 CPPFLAGS += -DWITH_ROOT
0174 ifdef WITH_REVE
0175 CPPFLAGS += -DWITH_REVE
0176 endif
0177 CPPFLAGS += -I$(shell root-config --incdir)
0178 LDFLAGS += $(shell root-config --libs)
0179 endif
0180
0181 ifdef DEBUG
0182 CPPFLAGS += -DDEBUG
0183 endif
0184
0185
0186 CXXFLAGS += -std=c++20
0187
0188
0189
0190
0191
0192 DEPEND_TGTS = -MQ '$(patsubst %.d,%.o,$@)'
0193
0194
0195
0196
0197 ifeq (${CXX}, ${ICC})
0198 MAKEDEPEND = gcc -MM -MG ${DEPEND_TGTS} ${CPPFLAGS}
0199 else
0200 MAKEDEPEND = ${CXX} -MM -MG ${DEPEND_TGTS} ${CPPFLAGS}
0201 endif
0202
0203 CPPFLAGS += ${CPPUSERFLAGS}
0204 CXXFLAGS += ${CXXUSERFLAGS}
0205 LDFLAGS += ${LDUSERFLAGS}