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