1 # -*- mode: makefile -*-
2 # Makefile to build AliRoot for Linux
4 # System dependent commands
11 CCMAJORV = $(shell $(CC) -dumpversion | cut -d. -f1)
12 CCMINORV = $(shell $(CC) -dumpversion | cut -d. -f2)
13 F77 = $(shell root-config --f77)
25 CLIBDEFS = -DCERNLIB_LXIA64 -DCERNLIB_BLDLIB -DCERNLIB_CZ
28 CLIBFOPT = $(CLIBDEFS)
32 CXXFLAGS = $(OPT) -W -Wall -fPIC -pipe -m64
33 CXXFLAGSNO = $(NOOPT) -W -Wall -fPIC -pipe -m64
36 CXXFLAGS = $(OPT) -W -Wall -Weffc++ -Woverloaded-virtual -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi -Dlinux -m64
37 CXXFLAGSNO = $(NOOPT) -W -Wall -Weffc++ -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi -m64
40 CXXFLAGS = $(OPT) -W -Wall -Weffc++ -Woverloaded-virtual -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi -Dlinux -m64
41 CXXFLAGSNO = $(NOOPT) -W -Wall -Weffc++ -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi -m64
43 CXXFLAGS = $(OPT) -W -Wall -Woverloaded-virtual -fPIC -pipe -fmessage-length=0 -Wno-long-long -ansi -Dlinux -m64
44 CXXFLAGSNO = $(NOOPT) -W -Wall -Weffc++ -fPIC -pipe -fmessage-length=0 -Wno-long-long -ansi -m64
48 CFLAGS = $(OPT) -Wall -Werror -fPIC -pipe -Wno-long-long -pedantic-errors -ansi -m64
49 FFLAGS = $(CLIBFOPT) $(FOPT) -fno-second-underscore -fPIC -fno-f2c -m64
52 FFLAGS +=-DFORTRAN_G95
54 ifeq (gfortran,$(F77))
55 FFLAGS +=-DFORTRAN_GFORTRAN
61 # rmkdepend flags for building dependencies of FORTRAN files
62 DEPENDFFLAGS = $(FFLAGS)
71 SOFLAGS = $(OPT) -shared -Wl
75 LIBNOVER = `find /lib64 -name 'libNoVersion*.so' | xargs --replace basename {} .so | sed -e 's/lib64/ -l/'`
77 SYSLIBS := -ldl -lcrypt -L/usr/X11R6/lib64 -lX11 $(LIBNOVER)
80 SHLIB += -L$(shell g95 --print-search-dirs | sed -n -e 's/install: //p') -lf95
82 ifeq (gfortran,$(F77))
83 SHLIB := $(shell gfortran -print-file-name=libgfortran.so)
84 SHLIB += $(shell gfortran -print-file-name=libgfortranbegin.a)