]> git.uio.no Git - u/mrichter/AliRoot.git/blame - build/Makefile.linux
New ANALYSISalice added, reduce default number of messages from task manager
[u/mrichter/AliRoot.git] / build / Makefile.linux
CommitLineData
b934f194 1# Makefile to build AliRoot for Linux
2
6a772515 3# System dependent commands
4
5XARGS = xargs -r
6
02a1d5c1 7# The compilers
8CXX = g++
02a1d5c1 9CC = gcc
10CCMAJORV = $(shell $(CC) -dumpversion | cut -d. -f1)
19ca05d1 11CCMINORV = $(shell $(CC) -dumpversion | cut -d. -f2)
02a1d5c1 12
874112da 13ifneq (,$(findstring g95,$(ROOTBUILD)))
14F77 = g95
15else
16ifneq (,$(findstring gfortran,$(ROOTBUILD)))
17F77 = gfortran
18else
19F77 = g77
20endif
21endif
22
02a1d5c1 23# Global optimisation
24OPT = -O -g
19ca05d1 25NOOPT = -g
02a1d5c1 26
19ca05d1 27CXXOPT = $(OPT)
28CXXNOOPT = $(NOOPT)
02a1d5c1 29COPT = $(OPT)
19ca05d1 30FOPT = $(OPT)
02a1d5c1 31
32# CERNLIB defines
02a1d5c1 33CLIBDEFS = -DCERNLIB_LINUX -DCERNLIB_BLDLIB -DCERNLIB_CZ
34CLIBCXXOPTS =
35CLIBCOPT =
19ca05d1 36CLIBFOPT = $(CLIBDEFS)
37
38# Compiler flags
39ifeq ($(CCMAJORV),2)
40CXXFLAGS = $(OPT) -W -Wall -fPIC -pipe
41CXXFLAGSNO = $(NOOPT) -W -Wall -fPIC -pipe
42else
0038d136 43ifeq ($(CCMAJORV),3)
ec22f7b0 44CXXFLAGS = $(OPT) -W -Wall -Weffc++ -Woverloaded-virtual -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi -Dlinux
45CXXFLAGSNO = $(NOOPT) -W -Wall -Weffc++ -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi
0038d136 46else
3deb9beb 47ifeq ($(CCMAJORV),4)
48CXXFLAGS = $(OPT) -W -Wall -Weffc++ -Woverloaded-virtual -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi -Dlinux
49CXXFLAGSNO = $(NOOPT) -W -Wall -Weffc++ -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi
50else
0038d136 51CXXFLAGS = $(OPT) -W -Wall -Woverloaded-virtual -fPIC -pipe -fmessage-length=0 -Wno-long-long -ansi -Dlinux
ec22f7b0 52CXXFLAGSNO = $(NOOPT) -W -Wall -Weffc++ -fPIC -pipe -fmessage-length=0 -Wno-long-long -ansi
0038d136 53endif
19ca05d1 54endif
3deb9beb 55endif
931c1b8a 56CFLAGS = $(OPT) -Wall -Werror -fPIC -pipe -Wno-long-long -pedantic-errors -ansi
19ca05d1 57FFLAGS = $(CLIBFOPT) $(FOPT) -fno-second-underscore
874112da 58
59ifneq (,$(findstring g95,$(ROOTBUILD)))
60FFLAGS +=-DFORTRAN_G95
61else
62ifneq (,$(findstring gfortran,$(ROOTBUILD)))
63FFLAGS +=-DFORTRAN_GFORTRAN
64else
65FFLAGS +=
66endif
67endif
68
19ca05d1 69# rmkdepend flags for building dependencies of FORTRAN files
70DEPENDFFLAGS = $(FFLAGS)
71
72# rootcint flags
73CINTFLAGS =
02a1d5c1 74
02a1d5c1 75LD = g++
76LDFLAGS = $(OPT)
77
78SHLD = $(LD)
79SOFLAGS = $(OPT) -shared -Wl
02a1d5c1 80SOEXT = so
81
874112da 82#System libraries
83SYSLIBS := -ldl -lcrypt -L/usr/X11R6/lib -lX11
84
85ifneq (,$(findstring g95,$(ROOTBUILD)))
86SHLIB += -L$(shell g95 --print-search-dirs | sed -n -e 's/install: //p') -lf95
87else
88ifneq (,$(findstring gfortran,$(ROOTBUILD)))
89SHLIB := $(shell gfortran -print-file-name=libgfortran.so)
90SHLIB += $(shell gfortran -print-file-name=libgfortranbegin.a)
91else
92SHLIB = -lg2c
93SYSLIBS += -lg2c
94endif
95endif
96
02a1d5c1 97ALLD = ar
98ALFLAGS = cr
99ALLIB =
100AEXT = a
101
102# additional ROOT libraries
02a1d5c1 103
02a1d5c1 104
02a1d5c1 105
106
107
108