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)
26 CXXWARN = -Wall -Wno-long-long -W -Weffc++ -Wshadow -Woverloaded-virtual -ansi
30 CXXFLAGS = $(OPT) -fPIC -pipe
31 CXXFLAGSNO = $(NOOPT) -fPIC -pipe
34 CXXFLAGS = $(OPT) -fPIC -pipe -fmessage-length=0 -Dlinux
35 CXXFLAGSNO = $(NOOPT) -fPIC -pipe -fmessage-length=0
38 CXXFLAGS = $(OPT) -fPIC -pipe -fmessage-length=0 -Dlinux
39 CXXFLAGSNO = $(NOOPT) -fPIC -pipe -fmessage-length=0
41 CXXFLAGS = $(OPT) -fPIC -pipe -fmessage-length=0 -Dlinux
42 CXXFLAGSNO = $(NOOPT) -fPIC -pipe -fmessage-length=0
46 CFLAGS = $(OPT) -Wall -Werror -fPIC -pipe -Wno-long-long -pedantic-errors -ansi
47 FFLAGS = $(CLIBFOPT) $(FOPT) -fPIC -fno-second-underscore
49 ifneq (,$(findstring g95,$(F77)))
50 FFLAGS +=-DFORTRAN_G95
52 ifneq (,$(findstring gfortran,$(F77)))
53 FFLAGS +=-DFORTRAN_GFORTRAN
59 # rmkdepend flags for building dependencies of FORTRAN files
60 DEPENDFFLAGS = $(FFLAGS)
65 LD = $(shell root-config --ld)
69 SOFLAGS = $(OPT) -shared -Wl
73 SYSLIBS := -ldl -lcrypt -L/usr/X11R6/lib -lX11
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) -m32 -print-file-name=libgfortran.so)
80 SHLIB += $(shell $(F77) -m32 -print-file-name=libgfortranbegin.a)
93 # additional ROOT libraries