]> git.uio.no Git - u/mrichter/AliRoot.git/blame - build/Makefile.linuxx8664gcc
Updates (Chiara)
[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
26# Compiler flags
8371d3e2 27ifeq ($(CCMAJORV),2)
9be1be4e 28CXXFLAGS = $(OPT) -W -Wall -fPIC -pipe
29CXXFLAGSNO = $(NOOPT) -W -Wall -fPIC -pipe
8371d3e2 30else
31ifeq ($(CCMAJORV),3)
9be1be4e 32CXXFLAGS = $(OPT) -W -Wall -Weffc++ -Woverloaded-virtual -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi -Dlinux
33CXXFLAGSNO = $(NOOPT) -W -Wall -Weffc++ -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi
8371d3e2 34else
3deb9beb 35ifeq ($(CCMAJORV),4)
9be1be4e 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
3deb9beb 38else
9be1be4e 39CXXFLAGS = $(OPT) -W -Wall -Woverloaded-virtual -fPIC -pipe -fmessage-length=0 -Wno-long-long -ansi -Dlinux
40CXXFLAGSNO = $(NOOPT) -W -Wall -Weffc++ -fPIC -pipe -fmessage-length=0 -Wno-long-long -ansi
8371d3e2 41endif
3deb9beb 42endif
8371d3e2 43endif
9be1be4e 44CFLAGS = $(OPT) -Wall -Werror -fPIC -pipe -Wno-long-long -pedantic-errors -ansi
45FFLAGS = $(CLIBFOPT) $(FOPT) -fno-second-underscore -fPIC -fno-f2c
8371d3e2 46
d95a3ef8 47ifeq (g95,$(F77))
8371d3e2 48FFLAGS +=-DFORTRAN_G95
49else
d95a3ef8 50ifeq (gfortran,$(F77))
8371d3e2 51FFLAGS +=-DFORTRAN_GFORTRAN
52else
53FFLAGS +=
54endif
55endif
56
72b92279 57# rmkdepend flags for building dependencies of FORTRAN files
8371d3e2 58DEPENDFFLAGS = $(FFLAGS)
72b92279 59
60# rootcint flags
61CINTFLAGS =
62
5f30d16c 63LD = $(shell root-config --ld)
8371d3e2 64LDFLAGS = $(OPT)
72b92279 65
8371d3e2 66SHLD = $(LD)
67SOFLAGS = $(OPT) -shared -Wl
72b92279 68SOEXT = so
69
8371d3e2 70#System libraries
71LIBNOVER = `find /lib64 -name 'libNoVersion*.so' | xargs --replace basename {} .so | sed -e 's/lib64/ -l/'`
72
73SYSLIBS := -ldl -lcrypt -L/usr/X11R6/lib64 -lX11 $(LIBNOVER)
74
c9c74649 75ifneq (,$(findstring g95,$(F77)))
76SHLIB += -L$(shell $(F77) --print-search-dirs | sed -n -e 's/install: //p') -lf95
8371d3e2 77else
c9c74649 78ifneq (,$(findstring gfortran,$(F77)))
79SHLIB := $(shell $(F77) -print-file-name=libgfortran.so)
80SHLIB += $(shell $(F77) -print-file-name=libgfortranbegin.a)
8371d3e2 81else
82SHLIB = -lg2c
83SYSLIBS += -lg2c
84endif
85endif
86
72b92279 87ALLD = ar
88ALFLAGS = cr
89ALLIB =
90AEXT = a
91
72b92279 92
72b92279 93
72b92279 94
8371d3e2 95
72b92279 96
97
98
99