]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - build/Makefile.Linux
Additional protection
[u/mrichter/AliRoot.git] / build / Makefile.Linux
index 717fdc42b8cf711a3fd18faa27b5479988e1bb70..bb00cee33d1595a2244d7d6113bf42c4e899e079 100644 (file)
@@ -4,18 +4,23 @@ PLATFORM:=linux
 CXX           = g++ 
 F77          = g77
 CC           = gcc
+CCMAJORV      = $(shell $(CC) -dumpversion | cut -d. -f1)
 
 # Global optimisation
 OPT           = -O -g
 
-CXXOPTS       = $(OPT) -W -Wall -fPIC -pipe -fmessage-length=0
+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
 COPT         = $(OPT)
 FOPT         = $(OPT) -fno-second-underscore
 CXXFLAGS      = $(CXXOPTS)
-CFLAGS       = -Wall -fPIC -pipe
+CFLAGS       = $(OPT) -Wall -Werror -fPIC -pipe -Wno-long-long -pedantic-errors -ansi
 
 # rootcint flags
-CINTFLAGS     = #$(CXXFLAGS)
+CINTFLAGS     = 
 
 # CERNLIB defines
 
@@ -31,7 +36,7 @@ LD            = g++
 LDFLAGS       = $(OPT) 
 
 SHLD         = $(LD)
-SOFLAGS       = -O2 -shared -Wl 
+SOFLAGS       = $(OPT) -shared -Wl 
 SHLIB         = -lg2c
 SOEXT        = so