]> git.uio.no Git - u/mrichter/AliRoot.git/blame - build/Makefile.linux
Modification needed to sync DA version and realease fields with svn
[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
47CXXFLAGS = $(OPT) -W -Wall -Woverloaded-virtual -fPIC -pipe -fmessage-length=0 -Wno-long-long -ansi -Dlinux
ec22f7b0 48CXXFLAGSNO = $(NOOPT) -W -Wall -Weffc++ -fPIC -pipe -fmessage-length=0 -Wno-long-long -ansi
0038d136 49endif
19ca05d1 50endif
931c1b8a 51CFLAGS = $(OPT) -Wall -Werror -fPIC -pipe -Wno-long-long -pedantic-errors -ansi
19ca05d1 52FFLAGS = $(CLIBFOPT) $(FOPT) -fno-second-underscore
874112da 53
54ifneq (,$(findstring g95,$(ROOTBUILD)))
55FFLAGS +=-DFORTRAN_G95
56else
57ifneq (,$(findstring gfortran,$(ROOTBUILD)))
58FFLAGS +=-DFORTRAN_GFORTRAN
59else
60FFLAGS +=
61endif
62endif
63
19ca05d1 64# rmkdepend flags for building dependencies of FORTRAN files
65DEPENDFFLAGS = $(FFLAGS)
66
67# rootcint flags
68CINTFLAGS =
02a1d5c1 69
02a1d5c1 70LD = g++
71LDFLAGS = $(OPT)
72
73SHLD = $(LD)
74SOFLAGS = $(OPT) -shared -Wl
02a1d5c1 75SOEXT = so
76
874112da 77#System libraries
78SYSLIBS := -ldl -lcrypt -L/usr/X11R6/lib -lX11
79
80ifneq (,$(findstring g95,$(ROOTBUILD)))
81SHLIB += -L$(shell g95 --print-search-dirs | sed -n -e 's/install: //p') -lf95
82else
83ifneq (,$(findstring gfortran,$(ROOTBUILD)))
84SHLIB := $(shell gfortran -print-file-name=libgfortran.so)
85SHLIB += $(shell gfortran -print-file-name=libgfortranbegin.a)
86else
87SHLIB = -lg2c
88SYSLIBS += -lg2c
89endif
90endif
91
02a1d5c1 92ALLD = ar
93ALFLAGS = cr
94ALLIB =
95AEXT = a
96
97# additional ROOT libraries
02a1d5c1 98
02a1d5c1 99
02a1d5c1 100
101
102
103