Geant4 Cross Reference |
1 # 1 # 2 # ------ GNU/LINUX ------ Intel icc 19 << 2 # ------ GNU/LINUX ------ Intel icc 15.x.x and higher 3 # 3 # 4 ifeq ($(G4SYSTEM),Linux-icc) 4 ifeq ($(G4SYSTEM),Linux-icc) 5 CXX := icc 5 CXX := icc 6 CXXFLAGS := -W -Wall -ansi -pedantic -Wno-n << 6 CXXFLAGS := -ansi -fp-model precise -w1 7 CXXFLAGS += -Wwrite-strings -Wpointer-arith << 7 G4USE_STD11 := 1 8 CXXFLAGS += -Wno-variadic-macros -Wshadow - << 8 ifdef G4USE_STD14 9 CXXFLAGS += -fp-model precise -diag-disable << 9 CPPFLAGS += -std=c++14 10 CPPFLAGS += -std=c++17 << 10 CXXFLAGS += -std=c++14 11 CXXFLAGS += -std=c++17 << 11 else 12 G4USE_STD17 := 1 << 12 ifdef G4USE_STD17 >> 13 CPPFLAGS += -std=c++17 >> 14 CXXFLAGS += -std=c++17 >> 15 else >> 16 CXXFLAGS += -std=c++11 >> 17 CPPFLAGS += -std=c++11 >> 18 endif >> 19 endif 13 ifdef G4MULTITHREADED 20 ifdef G4MULTITHREADED 14 CXXFLAGS += -ftls-model=initial-exec -pthr 21 CXXFLAGS += -ftls-model=initial-exec -pthread 15 endif 22 endif 16 ifdef G4OPTIMISE 23 ifdef G4OPTIMISE 17 CXXFLAGS += -O3 24 CXXFLAGS += -O3 18 FCFLAGS := -O3 25 FCFLAGS := -O3 19 CCFLAGS := -O3 26 CCFLAGS := -O3 20 else 27 else 21 ifdef G4DEBUG 28 ifdef G4DEBUG 22 CXXFLAGS += -g 29 CXXFLAGS += -g 23 FCFLAGS := -g 30 FCFLAGS := -g 24 CCFLAGS := -g 31 CCFLAGS := -g 25 endif 32 endif 26 endif 33 endif 27 ifdef G4PROFILE 34 ifdef G4PROFILE 28 CXXFLAGS += -qp 35 CXXFLAGS += -qp 29 FCFLAGS += -qp 36 FCFLAGS += -qp 30 CCFLAGS += -pg 37 CCFLAGS += -pg 31 endif 38 endif 32 ifdef G4LIB_BUILD_SHARED 39 ifdef G4LIB_BUILD_SHARED 33 CXXFLAGS += -fPIC 40 CXXFLAGS += -fPIC 34 FCFLAGS += -fPIC 41 FCFLAGS += -fPIC 35 CCFLAGS += -fPIC 42 CCFLAGS += -fPIC 36 endif 43 endif 37 G4RUNPATHOPTION := -Wl,-rpath -Wl, 44 G4RUNPATHOPTION := -Wl,-rpath -Wl, 38 G4STATIC_MODE += -Wl,--whole-archive 45 G4STATIC_MODE += -Wl,--whole-archive 39 G4NOSTATIC_MODE += -Wl,--no-whole-archive 46 G4NOSTATIC_MODE += -Wl,--no-whole-archive 40 CC := icc 47 CC := icc 41 FC := ifort 48 FC := ifort 42 FCFLAGS += -noautomatic -assume nobscc -assu 49 FCFLAGS += -noautomatic -assume nobscc -assume no2underscores 43 FCLIBS := -lg2c -lnsl 50 FCLIBS := -lg2c -lnsl 44 AR := ar r 51 AR := ar r 45 ECHO := /bin/echo -e 52 ECHO := /bin/echo -e 46 SHEXT := so 53 SHEXT := so 47 LOADLIBS += -limf << 54 # LOADLIBS += -lstdc++ 48 ifndef X11FLAGS 55 ifndef X11FLAGS 49 X11FLAGS := -I/usr/include/X11/extensions 56 X11FLAGS := -I/usr/include/X11/extensions -I/usr/include/X11 50 endif 57 endif 51 ifndef X11LIBS 58 ifndef X11LIBS 52 X11LIBS := -L/usr/lib -lXmu -lXt -lXext << 59 X11LIBS := -L/usr/X11R6/lib -lXmu -lXt -lXext -lX11 -lXi -lSM -lICE 53 endif 60 endif 54 ifndef XMFLAGS 61 ifndef XMFLAGS 55 XMFLAGS := -I/usr/include << 62 XMFLAGS := -I/usr/X11R6/include 56 endif 63 endif 57 ifndef XMLIBS 64 ifndef XMLIBS 58 XMLIBS := -lXm -lXpm 65 XMLIBS := -lXm -lXpm 59 endif 66 endif 60 ifndef XAWFLAGS 67 ifndef XAWFLAGS 61 XAWFLAGS := -I/usr/include << 68 XAWFLAGS := -I/usr/X11R6/include 62 endif 69 endif 63 ifndef XAWLIBS 70 ifndef XAWLIBS 64 XAWLIBS := -lXaw 71 XAWLIBS := -lXaw 65 endif 72 endif 66 DLDLIBS := -ldl 73 DLDLIBS := -ldl 67 ifndef OGLFLAGS 74 ifndef OGLFLAGS 68 OGLFLAGS := -I$(OGLHOME)/include 75 OGLFLAGS := -I$(OGLHOME)/include 69 endif 76 endif 70 ifndef OGLHOME << 71 OGLHOME := /usr << 72 endif << 73 ifndef OGLLIBS 77 ifndef OGLLIBS 74 OGLLIBS := -L$(OGLHOME)/lib -lGL << 78 OGLLIBS := -L$(OGLHOME)/lib -lGLU -lGL 75 endif << 76 << 77 # ---- QT Setup block ------------------------ << 78 << 79 ifndef QTHOME << 80 QTHOME := /usr << 81 endif << 82 ifndef QTMOC << 83 QTMOC := $(QTHOME)/bin/moc << 84 endif << 85 << 86 ifndef QT_VERSION << 87 QT_VERSION := 5 << 88 endif << 89 << 90 ifndef QTFLAGS << 91 QTFLAGS := -I $(QTHOME)/include -I$(QTHO << 92 QTFLAGS += -I $(QTHOME)/include/QtCore << 93 QTFLAGS += -I $(QTHOME)/include/QtGui << 94 QTFLAGS += -I $(QTHOME)/include/QtWidget << 95 QTFLAGS += -I $(QTHOME)/include/QtOpenGL << 96 QTFLAGS += -I $(QTHOME)/include/Qt3DCore << 97 QTFLAGS += -I $(QTHOME)/include/Qt3DExtr << 98 QTFLAGS += -I $(QTHOME)/include/Qt3DRend << 99 ifeq ($(QT_VERSION),6) << 100 QTFLAGS += -I $(QTHOME)/include/QtOpen << 101 endif << 102 endif << 103 ifndef QTLIBPATH << 104 QTLIBPATH := $(QTHOME)/lib << 105 QT_SEARCH_LIB := $(shell ls $(QTLIBPATH)/ << 106 ifneq ($(QT_SEARCH_LIB),0) << 107 QTLIBPATH := $(QTHOME)/lib/qt$(QT_VERSIO << 108 endif << 109 endif << 110 ifeq ($(QT_VERSION),5) # Qt5 << 111 ifndef QTLIBS << 112 QTLIBS := -L$(QTLIBPATH) -lQt5Core -lQ << 113 endif << 114 ifndef QT3DLIBS << 115 QT3DLIBS := -L$(QTLIBPATH) -lQt5Core -lQ << 116 endif << 117 ifndef GLQTLIBS << 118 GLQTLIBS := -L$(QTLIBPATH) -lQt5Core -lQ << 119 endif << 120 else # Qt6 << 121 ifndef QTLIBS << 122 QTLIBS := -L$(QTLIBPATH) -lQt6Core -lQ << 123 endif << 124 ifndef QT3DLIBS << 125 QT3DLIBS := -L$(QTLIBPATH) -lQt6Core -lQ << 126 endif << 127 ifndef GLQTLIBS << 128 GLQTLIBS := -L$(QTLIBPATH) -lQt6Core -lQ << 129 endif << 130 endif 79 endif 131 << 132 #--------------------------------------------- << 133 << 134 define build-granular-shared-lib 80 define build-granular-shared-lib 135 @libdir=`(cd $(@D);/bin/pwd)`; \ 81 @libdir=`(cd $(@D);/bin/pwd)`; \ 136 cd $(G4TMPDIR); \ 82 cd $(G4TMPDIR); \ 137 $(CXX) -diag-disable=10441 -Wl,-soname,$( << 83 $(CXX) -Wl,-soname,$(@F) -shared -o $$libdir/$(@F) $(INTYLIBS) *.o 138 endef 84 endef 139 define build-global-shared-lib 85 define build-global-shared-lib 140 @libdir=`(cd $(@D);/bin/pwd)`; \ 86 @libdir=`(cd $(@D);/bin/pwd)`; \ 141 cd $(G4TMP)/$(G4SYSTEM); \ 87 cd $(G4TMP)/$(G4SYSTEM); \ 142 $(CXX) -diag-disable=10441 -Wl,-soname,$( << 88 $(CXX) -Wl,-soname,$(@F) -shared -o $$libdir/$(@F) $(INTYLIBS) \ 143 $(foreach dir,$(SUBLIBS),$ 89 $(foreach dir,$(SUBLIBS),$(dir)/*.o); 144 endef 90 endef 145 91 146 endif 92 endif