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
47 CXXFLAGS = $(OPT) -W -Wall -Woverloaded-virtual -fPIC -pipe -fmessage-length=0 -Wno-long-long -ansi -Dlinux
48 CXXFLAGSNO = $(NOOPT) -W -Wall -Weffc++ -fPIC -pipe -fmessage-length=0 -Wno-long-long -ansi
51 CFLAGS = $(OPT) -Wall -Werror -fPIC -pipe -Wno-long-long -pedantic-errors -ansi
52 FFLAGS = $(CLIBFOPT) $(FOPT) -fno-second-underscore
54 ifneq (,$(findstring g95,$(ROOTBUILD)))
55 FFLAGS +=-DFORTRAN_G95
57 ifneq (,$(findstring gfortran,$(ROOTBUILD)))
58 FFLAGS +=-DFORTRAN_GFORTRAN
64 # rmkdepend flags for building dependencies of FORTRAN files
65 DEPENDFFLAGS = $(FFLAGS)
74 SOFLAGS = $(OPT) -shared -Wl
78 SYSLIBS := -ldl -lcrypt -L/usr/X11R6/lib -lX11
80 ifneq (,$(findstring g95,$(ROOTBUILD)))
81 SHLIB += -L$(shell g95 --print-search-dirs | sed -n -e 's/install: //p') -lf95
83 ifneq (,$(findstring gfortran,$(ROOTBUILD)))
84 SHLIB := $(shell gfortran -print-file-name=libgfortran.so)
85 SHLIB += $(shell gfortran -print-file-name=libgfortranbegin.a)
97 # additional ROOT libraries