Back to home page

EIC code displayed by LXR

 
 

    


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

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