Back to home page

EIC code displayed by LXR

 
 

    


Warning, /geant4/config/sys/Linux-icc.gmk is written in an unsupported language. File is not indexed.

0001 #
0002 # ------ GNU/LINUX ------         Intel icc 19.x.x and higher
0003 #
0004 ifeq ($(G4SYSTEM),Linux-icc)
0005   CXX       := icc
0006   CXXFLAGS  := -W -Wall -ansi -pedantic -Wno-non-virtual-dtor -Wno-long-long
0007   CXXFLAGS  += -Wwrite-strings -Wpointer-arith -Woverloaded-virtual
0008   CXXFLAGS  += -Wno-variadic-macros -Wshadow -pipe
0009   CXXFLAGS  += -fp-model precise -diag-disable=10441
0010   CPPFLAGS  += -std=c++17
0011   CXXFLAGS  += -std=c++17
0012   G4USE_STD17 := 1
0013   ifdef G4MULTITHREADED
0014     CXXFLAGS += -ftls-model=initial-exec -pthread
0015   endif
0016   ifdef G4OPTIMISE
0017     CXXFLAGS  += -O3
0018     FCFLAGS   := -O3
0019     CCFLAGS   := -O3
0020   else
0021     ifdef G4DEBUG
0022       CXXFLAGS  += -g
0023       FCFLAGS   := -g
0024       CCFLAGS   := -g
0025     endif
0026   endif
0027   ifdef G4PROFILE
0028     CXXFLAGS  += -qp
0029     FCFLAGS   += -qp
0030     CCFLAGS   += -pg
0031   endif
0032   ifdef G4LIB_BUILD_SHARED
0033     CXXFLAGS  += -fPIC
0034     FCFLAGS   += -fPIC
0035     CCFLAGS   += -fPIC
0036   endif
0037   G4RUNPATHOPTION := -Wl,-rpath -Wl,
0038   G4STATIC_MODE += -Wl,--whole-archive
0039   G4NOSTATIC_MODE += -Wl,--no-whole-archive
0040   CC := icc
0041   FC := ifort
0042   FCFLAGS += -noautomatic -assume nobscc -assume no2underscores
0043   FCLIBS := -lg2c -lnsl
0044   AR := ar r
0045   ECHO    := /bin/echo -e
0046   SHEXT   := so
0047   LOADLIBS += -limf
0048   ifndef X11FLAGS
0049     X11FLAGS  := -I/usr/include/X11/extensions -I/usr/include/X11
0050   endif
0051   ifndef X11LIBS
0052     X11LIBS   := -L/usr/lib  -lXmu -lXt -lXext -lX11 -lSM -lICE
0053   endif
0054   ifndef XMFLAGS
0055     XMFLAGS   := -I/usr/include
0056   endif
0057   ifndef XMLIBS
0058     XMLIBS    := -lXm -lXpm
0059   endif
0060   ifndef XAWFLAGS
0061     XAWFLAGS   := -I/usr/include
0062   endif
0063   ifndef XAWLIBS
0064     XAWLIBS    := -lXaw
0065   endif
0066   DLDLIBS   := -ldl
0067   ifndef OGLFLAGS
0068     OGLFLAGS  := -I$(OGLHOME)/include 
0069   endif
0070   ifndef OGLHOME
0071     OGLHOME     := /usr
0072   endif
0073   ifndef OGLLIBS
0074     OGLLIBS   := -L$(OGLHOME)/lib -lGL
0075   endif
0076 
0077 # ---- QT Setup block -------------------------------------------------------
0078 
0079   ifndef QTHOME
0080     QTHOME     := /usr
0081   endif
0082   ifndef QTMOC
0083     QTMOC      := $(QTHOME)/bin/moc
0084   endif
0085 
0086   ifndef QT_VERSION
0087     QT_VERSION := 5
0088   endif
0089 
0090   ifndef QTFLAGS
0091     QTFLAGS   := -I $(QTHOME)/include -I$(QTHOME)/include/Qt
0092     QTFLAGS   += -I $(QTHOME)/include/QtCore
0093     QTFLAGS   += -I $(QTHOME)/include/QtGui
0094     QTFLAGS   += -I $(QTHOME)/include/QtWidgets
0095     QTFLAGS   += -I $(QTHOME)/include/QtOpenGL
0096     QTFLAGS   += -I $(QTHOME)/include/Qt3DCore
0097     QTFLAGS   += -I $(QTHOME)/include/Qt3DExtras
0098     QTFLAGS   += -I $(QTHOME)/include/Qt3DRender
0099     ifeq ($(QT_VERSION),6)
0100       QTFLAGS   += -I $(QTHOME)/include/QtOpenGLWidgets
0101     endif
0102   endif
0103   ifndef QTLIBPATH
0104     QTLIBPATH := $(QTHOME)/lib
0105     QT_SEARCH_LIB := $(shell ls  $(QTLIBPATH)/qt$(QT_VERSION)/libq* 2>/dev/null | wc -l )
0106     ifneq ($(QT_SEARCH_LIB),0)
0107       QTLIBPATH := $(QTHOME)/lib/qt$(QT_VERSION)
0108     endif
0109   endif
0110   ifeq ($(QT_VERSION),5)       # Qt5
0111     ifndef QTLIBS
0112       QTLIBS   := -L$(QTLIBPATH) -lQt5Core -lQt5Gui -lQt5Widgets
0113     endif
0114     ifndef QT3DLIBS
0115       QT3DLIBS := -L$(QTLIBPATH) -lQt5Core -lQt5Gui -lQt5Widgets -lQt53DCore -lQt53DExtras -lQt53DRender
0116     endif
0117     ifndef GLQTLIBS
0118       GLQTLIBS := -L$(QTLIBPATH) -lQt5Core -lQt5Gui -lQt5Widgets -lQt5OpenGL
0119     endif
0120   else                         # Qt6
0121     ifndef QTLIBS
0122       QTLIBS   := -L$(QTLIBPATH) -lQt6Core -lQt6Gui -lQt6Widgets
0123     endif
0124     ifndef QT3DLIBS
0125       QT3DLIBS := -L$(QTLIBPATH) -lQt6Core -lQt6Gui -lQt6Widgets -lQt63DCore -lQt63DExtras -lQt63DRender
0126     endif
0127     ifndef GLQTLIBS
0128       GLQTLIBS := -L$(QTLIBPATH) -lQt6Core -lQt6Gui -lQt6Widgets -lQt6OpenGL -lQt6OpenGLWidgets
0129     endif
0130   endif
0131 
0132 #----------------------------------------------------------------------------
0133 
0134   define build-granular-shared-lib
0135     @libdir=`(cd $(@D);/bin/pwd)`; \
0136      cd $(G4TMPDIR); \
0137      $(CXX) -diag-disable=10441 -Wl,-soname,$(@F) -shared -o $$libdir/$(@F) $(INTYLIBS) *.o
0138   endef
0139   define build-global-shared-lib
0140     @libdir=`(cd $(@D);/bin/pwd)`; \
0141      cd $(G4TMP)/$(G4SYSTEM); \
0142      $(CXX) -diag-disable=10441 -Wl,-soname,$(@F) -shared -o $$libdir/$(@F) $(INTYLIBS) \
0143                     $(foreach dir,$(SUBLIBS),$(dir)/*.o);
0144   endef
0145 
0146 endif