96 lines
2.2 KiB
Plaintext
96 lines
2.2 KiB
Plaintext
#
|
|
# ------ GNU/LINUX ------ Intel icc 15.x.x and higher
|
|
#
|
|
ifeq ($(G4SYSTEM),Linux-icc)
|
|
CXX := icc
|
|
CXXFLAGS := -ansi -fp-model precise -w1
|
|
G4USE_STD11 := 1
|
|
ifdef G4USE_STD14
|
|
CPPFLAGS += -std=c++14
|
|
CXXFLAGS += -std=c++14
|
|
else
|
|
ifdef G4USE_STD17
|
|
CPPFLAGS += -std=c++17
|
|
CXXFLAGS += -std=c++17
|
|
else
|
|
CXXFLAGS += -std=c++11
|
|
CPPFLAGS += -std=c++11
|
|
endif
|
|
endif
|
|
ifdef G4MULTITHREADED
|
|
CXXFLAGS += -ftls-model=initial-exec -pthread
|
|
endif
|
|
ifdef G4OPTIMISE
|
|
CXXFLAGS += -O3
|
|
FCFLAGS := -O3
|
|
CCFLAGS := -O3
|
|
else
|
|
ifdef G4DEBUG
|
|
CXXFLAGS += -g
|
|
FCFLAGS := -g
|
|
CCFLAGS := -g
|
|
endif
|
|
endif
|
|
ifdef G4PROFILE
|
|
CXXFLAGS += -qp
|
|
FCFLAGS += -qp
|
|
CCFLAGS += -pg
|
|
endif
|
|
ifdef G4LIB_BUILD_SHARED
|
|
CXXFLAGS += -fPIC
|
|
FCFLAGS += -fPIC
|
|
CCFLAGS += -fPIC
|
|
endif
|
|
G4RUNPATHOPTION := -Wl,-rpath -Wl,
|
|
G4STATIC_MODE += -Wl,--whole-archive
|
|
G4NOSTATIC_MODE += -Wl,--no-whole-archive
|
|
CC := icc
|
|
FC := ifort
|
|
FCFLAGS += -noautomatic -assume nobscc -assume no2underscores
|
|
FCLIBS := -lg2c -lnsl
|
|
AR := ar r
|
|
ECHO := /bin/echo -e
|
|
SHEXT := so
|
|
# LOADLIBS += -lstdc++
|
|
ifndef X11FLAGS
|
|
X11FLAGS := -I/usr/include/X11/extensions -I/usr/include/X11
|
|
endif
|
|
ifndef X11LIBS
|
|
X11LIBS := -L/usr/lib -lXmu -lXt -lXext -lX11 -lXi -lSM -lICE
|
|
endif
|
|
ifndef XMFLAGS
|
|
XMFLAGS := -I/usr/include
|
|
endif
|
|
ifndef XMLIBS
|
|
XMLIBS := -lXm -lXpm
|
|
endif
|
|
ifndef XAWFLAGS
|
|
XAWFLAGS := -I/usr/include
|
|
endif
|
|
ifndef XAWLIBS
|
|
XAWLIBS := -lXaw
|
|
endif
|
|
DLDLIBS := -ldl
|
|
ifndef OGLFLAGS
|
|
OGLFLAGS := -I$(OGLHOME)/include
|
|
endif
|
|
ifndef OGLHOME
|
|
OGLHOME := /usr
|
|
endif
|
|
ifndef OGLLIBS
|
|
OGLLIBS := -L$(OGLHOME)/lib -lGLU -lGL
|
|
endif
|
|
define build-granular-shared-lib
|
|
@libdir=`(cd $(@D);/bin/pwd)`; \
|
|
cd $(G4TMPDIR); \
|
|
$(CXX) -Wl,-soname,$(@F) -shared -o $$libdir/$(@F) $(INTYLIBS) *.o
|
|
endef
|
|
define build-global-shared-lib
|
|
@libdir=`(cd $(@D);/bin/pwd)`; \
|
|
cd $(G4TMP)/$(G4SYSTEM); \
|
|
$(CXX) -Wl,-soname,$(@F) -shared -o $$libdir/$(@F) $(INTYLIBS) \
|
|
$(foreach dir,$(SUBLIBS),$(dir)/*.o);
|
|
endef
|
|
|
|
endif
|