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