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