| # |
| # $Id$ |
| # |
| # configuration file for Intel C++ |
| # |
| ############################################################################## |
| |
| CXX = icc |
| |
| ifeq ($(shell uname -m),ia64) |
| # check if icc works (prior to 8.0 the name of the IA64 compiler was ecc |
| ifneq ($(shell $(CXX) -v >/dev/null 2>&1 && echo $$?),0) |
| CXX = ecc |
| endif |
| endif |
| |
| CCVER := $(shell $(CXX) -V foo.c 2>&1 | sed -n "s/.*Version *\([0-9.]*\).*/\1/p") |
| CXX_MAJOR := $(shell echo "$(CCVER)" | sed "s/^\([1-9][0-9]*\).*/\1/") |
| CXX_MINOR := $(shell echo "$(CCVER)" | sed "s/[1-9]*\.\([0-9]*\).*/\1/") |
| |
| |
| CPPFLAGS = -I$(TOPDIR)/include/ansi |
| |
| WARNFLAGS = -w1 |
| PHWARNFLAGS = |
| DEPENDFLAGS = -M |
| PICFLAGS = -fpic |
| PRELINKFLAGS = |
| |
| ICCDIR = `which $(CXX) | sed 's:bin/$(CXX):lib:'` |
| |
| LDSOFLAGS = -shared |
| |
| # -cxxlib-nostd, present in all compilers since 8.1, will be documented in 10.x |
| ifeq ($(shell [ $(CXX_MAJOR) -gt 8 -o $(CXX_MAJOR) -eq 8 -a $(CXX_MINOR) -ge 1 ]), 0) |
| LD = $(CXX) -no_cpprt $(ICCDIR)/crtxi.o |
| CXXFLAGS = -Xc -no_cpprt |
| LDFLAGS = |
| LDLIBS = -Bstatic -lcxa -lunwind -Bdynamic $(ICCDIR)/crtxn.o |
| else |
| LD = $(CXX) |
| CXXFLAGS = -cxxlib-nostd |
| LDFLAGS = -cxxlib-nostd |
| LDLIBS = -lcxaguard -lsupc++ |
| endif |
| |
| |
| # The flag(s) to use to embed a library search path into generated executables. |
| RPATH = -Wl,-R |
| |
| # debug/optimization options |
| DEBUG_CXXFLAGS = -g |
| DEBUG_CPPFLAGS = |
| |
| OPTMZ_CXXFLAGS = -O2 |
| OPTMZ_CPPFLAGS = |
| |
| # shared/archive library options |
| SHARED_CXXFLAGS = |
| SHARED_CPPFLAGS = |
| SHARED_LDFLAGS = |
| |
| STATIC_CXXFLAGS = |
| STATIC_CPPFLAGS = |
| STATIC_LDFLAGS = |
| |
| # compiler and linker flags for thread safety |
| MULTI_CPPFLAGS_POSIX = -D_REENTRANT |
| MULTI_CPPFLAGS_SOLARIS = |
| MULTI_CPPFLAGS_DCE = |
| |
| MULTI_LDFLAGS_POSIX = -lpthread |
| MULTI_LDFLAGS_SOLARIS = |
| MULTI_LDFLAGS_DCE = |
| |
| # POSIX |
| MULTI_CPPFLAGS = $(MULTI_CPPFLAGS_POSIX) |
| MULTI_LDFLAGS = $(MULTI_LDFLAGS_POSIX) |
| |
| SINGL_CPPFLAGS = |
| SINGL_LDFLAGS = |