# -*- mode: makefile -*- # $Id$ # Linux platform dependent definitions # The compilers CXX = $(shell root-config --cxx) CC = $(shell root-config --cc) F77 = $(shell root-config --f77) # Global optimisation OPT = -O2 -g # Shared library suffix SL = so # AWK AWK = awk # The options # # starting from root.2.22 on Linux the flags -fno-rtti -fno-exceptions are # not necessary any more # CXXOPTS = $(OPT) -Wall -W -fPIC -pipe -Woverloaded-virtual -m64 COPT = $(OPT) -m64 -fPIC ifneq (,$(findstring g95,$(F77))) FOPT = $(OPT) -fno-second-underscore else ifneq (,$(findstring gfortran,$(F77))) FOPT = $(OPT) -fno-second-underscore else FOPT = $(OPT) -fno-second-underscore endif endif GCC_MAJOR := $(shell $(CXX) -v 2>&1 | \ grep version | cut -d' ' -f3 | cut -d'.' -f1) ifneq ($(GCC_MAJOR),3) FOPT := $(filter-out -O%,$(FOPT)) endif FOPT += -m64 -fno-f2c -fPIC # CERNLIB defines CLIBDEFS = -DCERNLIB_LXIA64 -DCERNLIB_BLDLIB -DCERNLIB_CZ CLIBCXXOPTS = $(CLIBDEFS) CLIBCOPT = $(CLIBDEFS) CLIBFOPT = $(CLIBDEFS) ifneq (,$(findstring g95,$(F77))) CLIBDEFS += -DCERNLIB_G95 else ifneq (,$(findstring gfortran,$(F77))) CLIBDEFS += -DCERNLIB_GFORTRAN else endif endif LD = $(shell root-config --ld) LDFLAGS = $(OPT) SHLD = $(LD) SOFLAGS = -Wl,-soname,$(notdir $@) -shared ifneq (,$(findstring g95,$(F77))) SHLIB += -L$(shell $(F77) --print-search-dirs | sed -n -e 's/install: //p') -lf95 else ifneq (,$(findstring gfortran,$(F77))) SHLIB := $(shell $(F77) -print-file-name=libgfortran.so) SHLIB += $(shell $(F77) -print-file-name=libgfortranbegin.a) else SHLIB = -lg2c endif endif # Graphics # X11FLAGS := -I/usr/include/X11/extensions -I/usr/include/X11 XMFLAGS := -I/usr/X11R6/include ifndef OGLFLAGS ifneq ($(OGLHOME),/usr) OGLFLAGS := -I$(OGLHOME)/include endif endif