X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=build%2FMakefile.linux;h=849fa6f4ec504195e643f7cde19ac7f9aa108a17;hb=78b795e773574610f80789f7f53a3295e2eebbfd;hp=c4c096a439181bd670a93b91513a080707871ff5;hpb=874112da2aee1725383ca399bb3a64e054d9ab96;p=u%2Fmrichter%2FAliRoot.git diff --git a/build/Makefile.linux b/build/Makefile.linux index c4c096a4391..849fa6f4ec5 100644 --- a/build/Makefile.linux +++ b/build/Makefile.linux @@ -1,25 +1,13 @@ +# -*- mode: makefile -*- # Makefile to build AliRoot for Linux # System dependent commands XARGS = xargs -r -# The compilers -CXX = g++ -CC = gcc CCMAJORV = $(shell $(CC) -dumpversion | cut -d. -f1) CCMINORV = $(shell $(CC) -dumpversion | cut -d. -f2) -ifneq (,$(findstring g95,$(ROOTBUILD))) -F77 = g95 -else -ifneq (,$(findstring gfortran,$(ROOTBUILD))) -F77 = gfortran -else -F77 = g77 -endif -endif - # Global optimisation OPT = -O -g NOOPT = -g @@ -44,17 +32,22 @@ ifeq ($(CCMAJORV),3) CXXFLAGS = $(OPT) -W -Wall -Weffc++ -Woverloaded-virtual -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi -Dlinux CXXFLAGSNO = $(NOOPT) -W -Wall -Weffc++ -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi else +ifeq ($(CCMAJORV),4) +CXXFLAGS = $(OPT) -W -Wall -Weffc++ -Woverloaded-virtual -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi -Dlinux +CXXFLAGSNO = $(NOOPT) -W -Wall -Weffc++ -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi +else CXXFLAGS = $(OPT) -W -Wall -Woverloaded-virtual -fPIC -pipe -fmessage-length=0 -Wno-long-long -ansi -Dlinux CXXFLAGSNO = $(NOOPT) -W -Wall -Weffc++ -fPIC -pipe -fmessage-length=0 -Wno-long-long -ansi endif endif +endif CFLAGS = $(OPT) -Wall -Werror -fPIC -pipe -Wno-long-long -pedantic-errors -ansi -FFLAGS = $(CLIBFOPT) $(FOPT) -fno-second-underscore +FFLAGS = $(CLIBFOPT) $(FOPT) -fPIC -fno-second-underscore -ifneq (,$(findstring g95,$(ROOTBUILD))) +ifneq (,$(findstring g95,$(F77))) FFLAGS +=-DFORTRAN_G95 else -ifneq (,$(findstring gfortran,$(ROOTBUILD))) +ifneq (,$(findstring gfortran,$(F77))) FFLAGS +=-DFORTRAN_GFORTRAN else FFLAGS += @@ -67,7 +60,7 @@ DEPENDFFLAGS = $(FFLAGS) # rootcint flags CINTFLAGS = -LD = g++ +LD = $(shell root-config --ld) LDFLAGS = $(OPT) SHLD = $(LD) @@ -77,12 +70,13 @@ SOEXT = so #System libraries SYSLIBS := -ldl -lcrypt -L/usr/X11R6/lib -lX11 -ifneq (,$(findstring g95,$(ROOTBUILD))) -SHLIB += -L$(shell g95 --print-search-dirs | sed -n -e 's/install: //p') -lf95 +ifneq (,$(findstring g95,$(F77))) +SHLIB += -L$(shell $(F77) --print-search-dirs | sed -n -e 's/install: //p') -lf95 else -ifneq (,$(findstring gfortran,$(ROOTBUILD))) -SHLIB := $(shell gfortran -print-file-name=libgfortran.so) -SHLIB += $(shell gfortran -print-file-name=libgfortranbegin.a) +ifneq (,$(findstring gfortran,$(F77))) +SHLIB := $(shell $(F77) -m32 -print-file-name=libgfortran.so) +SHLIB += $(shell $(F77) -m32 -print-file-name=libgfortranbegin.a) +SYSLIBS += $(SHLIB) else SHLIB = -lg2c SYSLIBS += -lg2c