]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - build/Makefile.linux
Cleanup of makefiles
[u/mrichter/AliRoot.git] / build / Makefile.linux
index ca55a0d6b0569187c66b1d1cac283b6a85189ad7..5c7bc06095b16a498794eca84e894e65a4e1d748 100644 (file)
@@ -1,35 +1,43 @@
+# Makefile to build AliRoot for Linux
+
 # The compilers
 CXX           = g++ 
 F77          = g77
 CC           = gcc
 CCMAJORV      = $(shell $(CC) -dumpversion | cut -d. -f1)
+CCMINORV      = $(shell $(CC) -dumpversion | cut -d. -f2)
 
 # Global optimisation
 OPT           = -O -g
+NOOPT         = -g
 
-ifeq ($(CCMAJORV),2)
-CXXOPTS       = $(OPT) -W -Wall -fPIC -pipe
-else
-CXXOPTS       = $(OPT) -W -Wall -Werror -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi
-endif
+CXXOPT        = $(OPT)
+CXXNOOPT      = $(NOOPT)
 COPT         = $(OPT)
-FOPT         = $(OPT) -fno-second-underscore
-CXXFLAGS      = $(CXXOPTS)
-CFLAGS       = $(OPT) -Wall -Werror -fPIC -pipe -Wno-long-long -pedantic-errors -ansi
-
-# rootcint flags
-CINTFLAGS     = 
+FOPT         = $(OPT)
 
 # CERNLIB defines
-
 CLIBDEFS      = -DCERNLIB_LINUX -DCERNLIB_BLDLIB -DCERNLIB_CZ
 CLIBCXXOPTS   =
 CLIBCOPT      =
-CLIBFOPT      =
+CLIBFOPT      = $(CLIBDEFS)
+
+# Compiler flags
+ifeq ($(CCMAJORV),2)
+CXXFLAGS       = $(OPT) -W -Wall -fPIC -pipe
+CXXFLAGSNO     = $(NOOPT) -W -Wall -fPIC -pipe
+else
+CXXFLAGS       = $(OPT) -W -Wall -Werror -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi
+CXXFLAGSNO     = $(NOOPT) -W -Wall -Werror -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi
+endif
+CFLAGS        = $(OPT) -Wall -Werror -fPIC -pipe -Wno-long-long -pedantic-errors -ansi
+FFLAGS         = $(CLIBFOPT) $(FOPT) -fno-second-underscore
+# rmkdepend flags for building dependencies of FORTRAN files
+DEPENDFFLAGS   = $(FFLAGS)
+
+# rootcint flags
+CINTFLAGS     = 
 
-# Common Fortran compilation flags
-FFLAGS = $(CLIBFOPT)  $(CLIBDEFS) $(FOPT)
-               
 LD            = g++
 LDFLAGS       = $(OPT) 
 
@@ -46,9 +54,6 @@ AEXT        = a
 # additional ROOT libraries
 ROOTLIBS  += -lcrypt 
 
-# rmkdepend flags for building dependencies of FORTRAN files
-DEPENDFFLAGS = $(FFLAGS)
-
 LIBNOVER      = `find /lib -name 'libNoVersion*.so' | xargs --replace basename {} .so | sed -e 's/lib/ -l/'`
 GLIBS         = -L/usr/X11R6/lib -lX11  $(LIBNOVER)