File indexing completed on 2024-04-25 02:14:14
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 ifdef INTEL_LICENSE_FILE
0037
0038 ICC := icc
0039 CXX := ${ICC}
0040 else ifdef OSXGCC5
0041 CXX := c++-mp-5
0042 TBB_PREFIX := /opt/local
0043 else ifdef OSXMPCLANG
0044 CXX := ${OSXMPCLANG} -Wall -Wno-unknown-pragmas -Wno-missing-braces
0045 TBB_PREFIX := /opt/local
0046 endif
0047
0048
0049
0050
0051 OPT := -g -Ofast
0052
0053
0054 ifdef AVX_512
0055 VEC_GCC := -march=native
0056 VEC_ICC := -xHost -qopt-zmm-usage=high
0057 else ifdef AVX2
0058 VEC_GCC := -mavx2 -mfma
0059 VEC_ICC := -mavx2 -mfma
0060 else ifdef SSE3
0061 VEC_GCC := -msse3
0062 VEC_ICC := -msse3
0063 else
0064 VEC_GCC := -mavx
0065 VEC_ICC := -mavx
0066 endif
0067
0068
0069
0070 USE_INTRINSICS := -DMPLEX_USE_INTRINSICS
0071
0072
0073 USE_VTUNE_NOTIFY := 1
0074
0075
0076
0077
0078 WITH_TBB := 1
0079
0080
0081
0082
0083
0084
0085
0086
0087 CPPFLAGS := ${USE_INTRINSICS} -DMKFIT_STANDALONE
0088 CXXFLAGS := -fPIC ${OPT} ${OSX_CXXFLAGS}
0089
0090 LDFLAGS_HOST :=
0091
0092 CPPFLAGS += ${INWARD_FIT}
0093
0094
0095
0096
0097 ifdef WITH_ROOT
0098
0099 endif
0100
0101 ifdef USE_VTUNE_NOTIFY
0102 ifdef VTUNE_AMPLIFIER_XE_2017_DIR
0103 CPPFLAGS += -I$(VTUNE_AMPLIFIER_XE_2017_DIR)/include -DUSE_VTUNE_PAUSE
0104 LDFLAGS_HOST += -L$(VTUNE_AMPLIFIER_XE_2017_DIR)/lib64 -littnotify
0105 endif
0106 endif
0107
0108 ifeq (${CXX}, ${ICC})
0109 VEC_HOST := ${VEC_ICC}
0110 CXXFLAGS += -qopt-report=5 -qopenmp-simd -qopt-report-phase=all
0111 else
0112 VEC_HOST := ${VEC_GCC}
0113 endif
0114
0115 ifeq ($(CXX), g++)
0116
0117
0118
0119
0120
0121
0122 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 -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-deprecated-copy -Wno-unused-parameter -Wunused -Wparentheses -Wno-deprecated -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
0123 CXXFLAGS += -fdiagnostics-color=auto -fdiagnostics-show-option -fopenmp-simd
0124
0125 CXXFLAGS += -fno-reciprocal-math -mrecip=none
0126 endif
0127
0128
0129 ifneq ($(CXX),icc)
0130 ifndef TBB_PREFIX
0131 ifdef CMSSW_BASE
0132 CPPFLAGS += -I$(shell cd $$CMSSW_BASE && scram tool tag tbb INCLUDE)
0133 LDFLAGS_HOST += -L$(shell cd $$CMSSW_BASE && scram tool tag tbb LIBDIR)
0134 else ifdef TBB_GCC
0135 TBB_PREFIX = $(TBB_GCC)
0136 endif
0137 endif
0138 endif
0139
0140 ifdef WITH_TBB
0141
0142 ifdef TBB_PREFIX
0143 CPPFLAGS += -I${TBB_PREFIX}/include
0144 LDFLAGS += -L${TBB_PREFIX}/lib -Wl,-rpath,${TBB_PREFIX}/lib
0145 endif
0146 CPPFLAGS += -DTBB
0147 LDFLAGS += -ltbb
0148 endif
0149
0150 CPPFLAGS_NO_ROOT := ${CPPFLAGS} -DNO_ROOT
0151 LDFLAGS_NO_ROOT := ${LDFLAGS}
0152
0153 ifdef WITH_ROOT
0154 CPPFLAGS += $(shell root-config --cflags)
0155 LDFLAGS += $(shell root-config --libs)
0156 else
0157 CPPFLAGS += -DNO_ROOT
0158 endif
0159
0160 ifdef DEBUG
0161 CPPFLAGS += -DDEBUG
0162 endif
0163
0164
0165 CXXFLAGS += -std=c++1z
0166
0167
0168
0169
0170
0171 DEPEND_TGTS = -MQ '$(patsubst %.d,%.o,$@)'
0172
0173
0174
0175
0176 ifeq (${CXX}, ${ICC})
0177 MAKEDEPEND = gcc -MM -MG ${DEPEND_TGTS} ${CPPFLAGS}
0178 else
0179 MAKEDEPEND = ${CXX} -MM -MG ${DEPEND_TGTS} ${CPPFLAGS}
0180 endif
0181
0182 CPPFLAGS += ${CPPUSERFLAGS}
0183 CXXFLAGS += ${CXXUSERFLAGS}
0184 LDFLAGS += ${LDUSERFLAGS}