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_LINUX -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) -fPIC -fno-second-underscore
47 ifneq (,$(findstring g95,$(F77)))
48 FFLAGS +=-DFORTRAN_G95
50 ifneq (,$(findstring 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 SYSLIBS := -ldl -lcrypt -L/usr/X11R6/lib -lX11
73 ifneq (,$(findstring g95,$(F77)))
74 SHLIB += -L$(shell $(F77) --print-search-dirs | sed -n -e 's/install: //p') -lf95
76 ifneq (,$(findstring gfortran,$(F77)))
77 SHLIB := $(shell $(F77) -m32 -print-file-name=libgfortran.so)
78 SHLIB += $(shell $(F77) -m32 -print-file-name=libgfortranbegin.a)
91 # additional ROOT libraries