]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - build/Makefile.linuxx8664gcc
Adding job handler (Marian)
[u/mrichter/AliRoot.git] / build / Makefile.linuxx8664gcc
index 99d3165467949529840244294e232f8f7c3f743f..f9a5d064a7717ce1f92cdf5d5fc814a98b7e76e8 100644 (file)
@@ -8,6 +8,8 @@ XARGS = xargs -r
 CXX           = g++ 
 F77          = g77
 CC           = gcc
+CCMAJORV      = $(shell $(CC) -dumpversion | cut -d. -f1)
+CCMINORV      = $(shell $(CC) -dumpversion | cut -d. -f2)
 
 # Global optimisation
 OPT           = -g -O
@@ -25,8 +27,13 @@ CLIBCOPT      =
 CLIBFOPT      = $(CLIBDEFS)
 
 # Compiler flags
+ifeq ($(CCMAJORV),4)
+CXXFLAGS       = $(CXXOPT) -W -Wall -Weffc++ -Woverloaded-virtual -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi
+CXXFLAGSNO     = $(CXXNOOPT) -W -Wall -Weffc++ -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi
+else
 CXXFLAGS      = $(CXXOPT)  -Wall -fPIC -pipe
 CXXFLAGSNO    = $(CXXNOOPT)  -Wall -fPIC -pipe
+endif
 CFLAGS       = -Wall -fPIC -pipe
 FFLAGS        = $(CLIBFOPT) $(FOPT) -fno-second-underscore -fPIC
 # rmkdepend flags for building dependencies of FORTRAN files