1 # Makefile to build AliRoot for Linux
3 # System dependent commands
10 CCMAJORV = $(shell $(CC) -dumpversion | cut -d. -f1)
11 CCMINORV = $(shell $(CC) -dumpversion | cut -d. -f2)
13 ifneq (,$(findstring g95,$(ROOTBUILD)))
16 ifneq (,$(findstring gfortran,$(ROOTBUILD)))
33 CLIBDEFS = -DCERNLIB_LINUX -DCERNLIB_BLDLIB -DCERNLIB_CZ
36 CLIBFOPT = $(CLIBDEFS)
40 CXXFLAGS = $(OPT) -W -Wall -fPIC -pipe
41 CXXFLAGSNO = $(NOOPT) -W -Wall -fPIC -pipe
44 CXXFLAGS = $(OPT) -W -Wall -Weffc++ -Woverloaded-virtual -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi -Dlinux
45 CXXFLAGSNO = $(NOOPT) -W -Wall -Weffc++ -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi
48 CXXFLAGS = $(OPT) -W -Wall -Weffc++ -Woverloaded-virtual -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi -Dlinux
49 CXXFLAGSNO = $(NOOPT) -W -Wall -Weffc++ -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi
51 CXXFLAGS = $(OPT) -W -Wall -Woverloaded-virtual -fPIC -pipe -fmessage-length=0 -Wno-long-long -ansi -Dlinux
52 CXXFLAGSNO = $(NOOPT) -W -Wall -Weffc++ -fPIC -pipe -fmessage-length=0 -Wno-long-long -ansi
56 CFLAGS = $(OPT) -Wall -Werror -fPIC -pipe -Wno-long-long -pedantic-errors -ansi
57 FFLAGS = $(CLIBFOPT) $(FOPT) -fno-second-underscore
59 ifneq (,$(findstring g95,$(ROOTBUILD)))
60 FFLAGS +=-DFORTRAN_G95
62 ifneq (,$(findstring gfortran,$(ROOTBUILD)))
63 FFLAGS +=-DFORTRAN_GFORTRAN
69 # rmkdepend flags for building dependencies of FORTRAN files
70 DEPENDFFLAGS = $(FFLAGS)
79 SOFLAGS = $(OPT) -shared -Wl
83 SYSLIBS := -ldl -lcrypt -L/usr/X11R6/lib -lX11
85 ifneq (,$(findstring g95,$(ROOTBUILD)))
86 SHLIB += -L$(shell g95 --print-search-dirs | sed -n -e 's/install: //p') -lf95
88 ifneq (,$(findstring gfortran,$(ROOTBUILD)))
89 SHLIB := $(shell gfortran -print-file-name=libgfortran.so)
90 SHLIB += $(shell gfortran -print-file-name=libgfortranbegin.a)
103 # additional ROOT libraries