X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=blobdiff_plain;f=build%2FMakefile.macosx;h=4042d0daf961c3673c3f748de486e2277ac510c6;hp=39b8f4bff64dc8387445579b8e10f4417534eba0;hb=931c1b8a04ca8f3c840eeaf95b2b21efc2100bcd;hpb=6c111d79944a43b41cd03e367e667ad14337ed40 diff --git a/build/Makefile.macosx b/build/Makefile.macosx index 39b8f4bff64..4042d0daf96 100644 --- a/build/Makefile.macosx +++ b/build/Makefile.macosx @@ -1,58 +1,56 @@ # Makefile for AliRoot for MacOS X with gcc +XARGS = xargs + # OS version MACOSX_MAJOR := $(strip $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 1)) MACOSX_MINOR := $(strip $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)) # fink directories FINK_ROOT := $(shell which fink | sed -e 's?/bin/fink??') +ifeq (,$(FINK_ROOT)) +# No fink, build will probably fail, but we try a guess +FINK_ROOT=/usr/local +endif # The compilers CXX = g++ CC = gcc -ifneq ($(MACOSX_MINOR),4) -F77 = g77 -else ifeq (g95,$(findstring g95,$(ROOTBUILD))) F77 = g95 else F77 = gfortran endif -endif # Global optimisation -OPT = -O0 -g +OPT = -O -g NOOPT = -g CXXOPT = $(OPT) CXXNOOPT = $(NOOPT) COPT = $(OPT) FOPT = $(OPT) -fno-second-underscore - +ifeq (g95,$(findstring g95,$(ROOTBUILD))) +FOPT += -fbounds-check +endif # CERNLIB defines -CLIBDEFS = -DCERNLIB_LINUX -DCERNLIB_BLDLIB -DCERNLIB_CZ +CLIBDEFS = -DCERNLIB_LINUX -DCERNLIB_BLDLIB -DCERNLIB_CZ -DCERNLIB_PPC CLIBCXXOPTS = CLIBCOPT = CLIBFOPT = $(CLIBDEFS) # Compiler flags -CXXFLAGS = $(CXXOPT) -Wall -W -Wno-long-double -pipe -fsigned-char -fno-common -fmessage-length=0 -I$(FINK_ROOT)/include -ifneq ($(MACOSX_MINOR),4) -CXXFLAGS+=-fweak-coalesced -endif +CXXFLAGS = $(CXXOPT) -Wall -W -Wno-long-double -pipe -fbounds-check -fsigned-char -fno-common -fmessage-length=0 -I/usr/X11R6/include -I$(FINK_ROOT)/include -Woverloaded-virtual -Weffc++ + ifeq (g95,$(findstring g95,$(ROOTBUILD))) CXXFLAGS+=-DFORTRAN_G95 endif CXXFLAGSNO = $(CXXNOOPT) -Wall -W -pipe -fsigned-char -fno-common -fmessage-length=0 -I$(FINK_ROOT)/include -Wno-long-double -ifneq ($(MACOSX_MINOR),4) -CXXFLAGSNO+=-fweak-coalesced -endif + CFLAGS = $(COPT) -Wall -W -fno-common -pipe -I$(FINK_ROOT)/include -ifneq ($(MACOSX_MINOR),4) -CFLAGS+=-fweak-coalesced -endif + FFLAGS = $(CLIBFOPT) $(FOPT) # rmkdepend flags for building dependencies of FORTRAN files DEPENDFFLAGS = $(FFLAGS) @@ -82,19 +80,14 @@ AEXT = a DEPENDCXXFLAGS = $(CXXFLAGS) -I/usr/include/sys -GLIBS = -L/usr/X11R6/lib -lX11 +SYSLIBS := -L/usr/X11R6/lib -lX11 -EXEFLAGS += -bind_at_load +EXEFLAGS := -bind_at_load #System libraries -ifneq ($(MACOSX_MINOR),4) -SYSLIBS := -lg2c -else + ifeq (g95,$(findstring g95,$(ROOTBUILD))) -SYSLIBS := -L$(dir $(shell find $(FINK_ROOT) -name libf95.a)) -lf95 +SYSLIBS += -L$(shell g95 --print-search-dirs | sed -n -e 's/install: //p') -lf95 else -SYSLIBS := -ldl -L$(dir $(shell find $(FINK_ROOT) -name libgfortran.dylib)) -lgfortranbegin -lgfortran -endif +SYSLIBS += -ldl -L$(shell gfortran --print-search-dirs | sed -n -e 's/install: //p') -lgfortranbegin -lgfortran endif - -