]> git.uio.no Git - u/mrichter/AliRoot.git/blob - build/Makefile.linuxx8664gcc
Clean-up of response classes in order reduce momory occupancy (F. Prino)
[u/mrichter/AliRoot.git] / build / Makefile.linuxx8664gcc
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           = -O0 -g
25 NOOPT         = -g
26
27 CXXOPT        = $(OPT)
28 CXXNOOPT      = $(NOOPT)
29 COPT          = $(OPT)
30 FOPT          = $(OPT)
31
32 # CERNLIB defines
33 CLIBDEFS      = -DCERNLIB_LXIA64 -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 -m64
41 CXXFLAGSNO     = $(NOOPT) -W -Wall -fPIC -pipe -m64
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 -m64
45 CXXFLAGSNO     = $(NOOPT) -W -Wall -Weffc++ -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi -m64
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 -m64
49 CXXFLAGSNO     = $(NOOPT) -W -Wall -Weffc++ -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi -m64
50 else
51 CXXFLAGS       = $(OPT) -W -Wall -Woverloaded-virtual -fPIC -pipe -fmessage-length=0 -Wno-long-long -ansi -Dlinux -m64
52 CXXFLAGSNO     = $(NOOPT) -W -Wall -Weffc++ -fPIC -pipe -fmessage-length=0 -Wno-long-long -ansi -m64
53 endif
54 endif
55 endif
56 CFLAGS         = $(OPT) -Wall -Werror -fPIC -pipe -Wno-long-long -pedantic-errors -ansi -m64 
57 FFLAGS         = $(CLIBFOPT) $(FOPT) -fno-second-underscore -fPIC -fno-f2c -m64
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 LIBNOVER      = `find /lib64 -name 'libNoVersion*.so' | xargs --replace basename {} .so | sed -e 's/lib64/ -l/'`
84
85 SYSLIBS      := -ldl -lcrypt -L/usr/X11R6/lib64 -lX11  $(LIBNOVER)
86
87 ifneq (,$(findstring g95,$(ROOTBUILD)))
88 SHLIB += -L$(shell g95 --print-search-dirs | sed -n -e 's/install: //p') -lf95
89 else
90 ifneq (,$(findstring gfortran,$(ROOTBUILD)))
91 SHLIB := $(shell gfortran -print-file-name=libgfortran.so)
92 SHLIB += $(shell gfortran -print-file-name=libgfortranbegin.a)
93 else
94 SHLIB         = -lg2c
95 SYSLIBS +=  -lg2c
96 endif
97 endif
98
99 ALLD          = ar
100 ALFLAGS       = cr
101 ALLIB         = 
102 AEXT          = a
103
104
105
106
107
108
109
110
111