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