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