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