add correct check on ROOT version (now version 4.0.6 has been tagged).
[u/mrichter/AliRoot.git] / build / Makefile.linuxicc
CommitLineData
02a1d5c1 1# The C/C++ compilers
2CXX = icc
3CC = icc
4
5# Compiler version:
6ICC_MAJOR := $(shell $(CXX) -V 2>&1 | awk '{ if (NR==1) print $$8 }' | \
7 cut -d'.' -f1)
8ICC_MINOR := $(shell $(CXX) -V 2>&1 | awk '{ if (NR==1) print $$8 }' | \
9 cut -d'.' -f2)
10
11# The Fortran compiler
12ifeq ($(ICC_MAJOR),8)
13F77 = ifort
14else
15F77 = ifc
16endif
17
18# Global optimisation
19OPT = -O -g
20
21CXXOPTS = $(OPT)
22COPT = $(OPT)
23FOPT = $(OPT)
24CXXFLAGS = $(CXXOPTS)
25CFLAGS = $(COPT)
26
27# rootcint flags
28CINTFLAGS =
29
30# CERNLIB defines
31
32CLIBDEFS = -DCERNLIB_LINUX -DCERNLIB_BLDLIB -DCERNLIB_CZ
33CLIBCXXOPTS =
34CLIBCOPT =
35CLIBFOPT =
36
37# Common Fortran compilation flags
38FFLAGS = $(CLIBFOPT) $(CLIBDEFS) $(FOPT)
39
40LD = icc
41LDFLAGS = $(OPT)
42
43SHLD = $(LD)
44SOFLAGS = -Wl,-soname,$$TMPLIB -shared $(OPT)
45SHLIB =
46SOEXT = so
47
48ALLD = ar
49ALFLAGS = cr
50ALLIB =
51AEXT = a
52
53# additional ROOT libraries
54ROOTLIBS += -lcrypt
55
56# rmkdepend flags for building dependencies of FORTRAN files
57DEPENDFFLAGS = $(FFLAGS)
58
59LIBNOVER = `find /lib -name 'libNoVersion*.so' | xargs --replace basename {} .so | sed -e 's/lib/ -l/'`
60GLIBS = $(LIBNOVER)
61
62#System libraries
63SYSLIBS =
64
65EXEFLAGS += -L/usr/local/lib -lXt
66ifeq ($(ICC_MAJOR),8)
67EXEFLAGS += -L$(shell which ifort | sed -e 's|bin/ifort|lib|') \
68 -lifcore
69else
70EXEFLAGS += -L$(shell which ifc | sed -e 's|bin/ifc|lib|') \
71 -lF90 -lCEPCF90 -lintrins
72endif