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