]> git.uio.no Git - u/mrichter/AliRoot.git/blob - build/Makefile.linux
LUTs mapping symnames and original global matrices removed from AliGeomManager, which...
[u/mrichter/AliRoot.git] / build / Makefile.linux
1 # Makefile to build AliRoot for Linux
2
3 # System dependent commands
4
5 XARGS = xargs -r
6
7 # The compilers
8 CXX           = g++ 
9 CC            = gcc
10 CCMAJORV      = $(shell $(CC) -dumpversion | cut -d. -f1)
11 CCMINORV      = $(shell $(CC) -dumpversion | cut -d. -f2)
12
13 ifneq (,$(findstring g95,$(ROOTBUILD)))
14 F77       = g95
15 else
16 ifneq (,$(findstring gfortran,$(ROOTBUILD)))
17 F77       = gfortran
18 else
19 F77       = g77
20 endif
21 endif
22
23 # Global optimisation
24 OPT           = -O -g
25 NOOPT         = -g
26
27 CXXOPT        = $(OPT)
28 CXXNOOPT      = $(NOOPT)
29 COPT          = $(OPT)
30 FOPT          = $(OPT)
31
32 # CERNLIB defines
33 CLIBDEFS      = -DCERNLIB_LINUX -DCERNLIB_BLDLIB -DCERNLIB_CZ
34 CLIBCXXOPTS   =
35 CLIBCOPT      =
36 CLIBFOPT      = $(CLIBDEFS)
37
38 # Compiler flags
39 ifeq ($(CCMAJORV),2)
40 CXXFLAGS       = $(OPT) -W -Wall -fPIC -pipe
41 CXXFLAGSNO     = $(NOOPT) -W -Wall -fPIC -pipe
42 else
43 ifeq ($(CCMAJORV),3)
44 CXXFLAGS       = $(OPT) -W -Wall -Weffc++ -Woverloaded-virtual -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi -Dlinux
45 CXXFLAGSNO     = $(NOOPT) -W -Wall -Weffc++ -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi
46 else
47 ifeq ($(CCMAJORV),4)
48 CXXFLAGS       = $(OPT) -W -Wall -Weffc++ -Woverloaded-virtual -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi -Dlinux
49 CXXFLAGSNO     = $(NOOPT) -W -Wall -Weffc++ -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi
50 else
51 CXXFLAGS       = $(OPT) -W -Wall -Woverloaded-virtual -fPIC -pipe -fmessage-length=0 -Wno-long-long -ansi -Dlinux
52 CXXFLAGSNO     = $(NOOPT) -W -Wall -Weffc++ -fPIC -pipe -fmessage-length=0 -Wno-long-long -ansi
53 endif
54 endif
55 endif
56 CFLAGS         = $(OPT) -Wall -Werror -fPIC -pipe -Wno-long-long -pedantic-errors -ansi
57 FFLAGS         = $(CLIBFOPT) $(FOPT) -fno-second-underscore
58
59 ifneq (,$(findstring g95,$(ROOTBUILD)))
60 FFLAGS        +=-DFORTRAN_G95
61 else
62 ifneq (,$(findstring gfortran,$(ROOTBUILD)))
63 FFLAGS        +=-DFORTRAN_GFORTRAN
64 else
65 FFLAGS        +=
66 endif
67 endif
68
69 # rmkdepend flags for building dependencies of FORTRAN files
70 DEPENDFFLAGS   = $(FFLAGS)
71
72 # rootcint flags
73 CINTFLAGS     = 
74
75 LD            = g++
76 LDFLAGS       = $(OPT) 
77
78 SHLD          = $(LD)
79 SOFLAGS       = $(OPT) -shared -Wl 
80 SOEXT         = so
81
82 #System libraries
83 SYSLIBS      := -ldl -lcrypt -L/usr/X11R6/lib -lX11
84
85 ifneq (,$(findstring g95,$(ROOTBUILD)))
86 SHLIB += -L$(shell g95 --print-search-dirs | sed -n -e 's/install: //p') -lf95
87 else
88 ifneq (,$(findstring gfortran,$(ROOTBUILD)))
89 SHLIB := $(shell gfortran -print-file-name=libgfortran.so)
90 SHLIB += $(shell gfortran -print-file-name=libgfortranbegin.a)
91 SYSLIBS += $(SHLIB)
92 else
93 SHLIB         = -lg2c
94 SYSLIBS +=  -lg2c
95 endif
96 endif
97
98 ALLD          = ar
99 ALFLAGS       = cr
100 ALLIB         = 
101 AEXT          = a
102
103 # additional ROOT libraries
104
105
106
107
108
109