1 # -*- mode: makefile -*-
2 # Makefile to build AliRoot for Linux
4 # System dependent commands
8 CCMAJORV = $(shell $(CC) -dumpversion | cut -d. -f1)
9 CCMINORV = $(shell $(CC) -dumpversion | cut -d. -f2)
21 CLIBDEFS = -DCERNLIB_LXIA64 -DCERNLIB_BLDLIB -DCERNLIB_CZ
24 CLIBFOPT = $(CLIBDEFS)
28 CXXFLAGS = $(OPT) -W -Wall -fPIC -pipe
29 CXXFLAGSNO = $(NOOPT) -W -Wall -fPIC -pipe
32 CXXFLAGS = $(OPT) -W -Wall -Weffc++ -Woverloaded-virtual -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi -Dlinux
33 CXXFLAGSNO = $(NOOPT) -W -Wall -Weffc++ -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi
36 CXXFLAGS = $(OPT) -W -Wall -Weffc++ -Woverloaded-virtual -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi -Dlinux
37 CXXFLAGSNO = $(NOOPT) -W -Wall -Weffc++ -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi
39 CXXFLAGS = $(OPT) -W -Wall -Woverloaded-virtual -fPIC -pipe -fmessage-length=0 -Wno-long-long -ansi -Dlinux
40 CXXFLAGSNO = $(NOOPT) -W -Wall -Weffc++ -fPIC -pipe -fmessage-length=0 -Wno-long-long -ansi
44 CFLAGS = $(OPT) -Wall -Werror -fPIC -pipe -Wno-long-long -pedantic-errors -ansi
45 FFLAGS = $(CLIBFOPT) $(FOPT) -fno-second-underscore -fPIC -fno-f2c
48 FFLAGS +=-DFORTRAN_G95
50 ifeq (gfortran,$(F77))
51 FFLAGS +=-DFORTRAN_GFORTRAN
57 # rmkdepend flags for building dependencies of FORTRAN files
58 DEPENDFFLAGS = $(FFLAGS)
63 LD = $(shell root-config --ld)
67 SOFLAGS = $(OPT) -shared -Wl
71 LIBNOVER = `find /lib64 -name 'libNoVersion*.so' | xargs --replace basename {} .so | sed -e 's/lib64/ -l/'`
73 SYSLIBS := -ldl -lcrypt -L/usr/X11R6/lib64 -lX11 $(LIBNOVER)
75 ifneq (,$(findstring g95,$(F77)))
76 SHLIB += -L$(shell $(F77) --print-search-dirs | sed -n -e 's/install: //p') -lf95
78 ifneq (,$(findstring gfortran,$(F77)))
79 SHLIB := $(shell $(F77) -print-file-name=libgfortran.so)
80 SHLIB += $(shell $(F77) -print-file-name=libgfortranbegin.a)