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