From 796dbee6a9ca11789721d71f5c2f911ec262fca8 Mon Sep 17 00:00:00 2001 From: alibrary Date: Tue, 14 Jun 2005 11:09:35 +0000 Subject: [PATCH] Changes for Mac OSX --- build/Makefile.macosx | 30 ++++++++++-------------------- build/module.tpl | 2 +- 2 files changed, 11 insertions(+), 21 deletions(-) diff --git a/build/Makefile.macosx b/build/Makefile.macosx index 39b8f4bff64..5bd59174f42 100644 --- a/build/Makefile.macosx +++ b/build/Makefile.macosx @@ -6,23 +6,23 @@ MACOSX_MINOR := $(strip $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d # 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) @@ -30,29 +30,22 @@ CXXNOOPT = $(NOOPT) COPT = $(OPT) FOPT = $(OPT) -fno-second-underscore - # 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 + 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) @@ -87,14 +80,11 @@ GLIBS = -L/usr/X11R6/lib -lX11 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 else SYSLIBS := -ldl -L$(dir $(shell find $(FINK_ROOT) -name libgfortran.dylib)) -lgfortranbegin -lgfortran endif -endif diff --git a/build/module.tpl b/build/module.tpl index efcdfe7b14f..4df3c786e70 100644 --- a/build/module.tpl +++ b/build/module.tpl @@ -185,7 +185,7 @@ endif #------------------------------------------------------------------------ -ifeq ($(MACOSX_MINOR),4) +ifneq (,$(findstring macosx,$(ALICE_TARGET))) $(@PACKAGE@LIB): $(@PACKAGE@DLIB) $(@PACKAGE@O) $(@PACKAGE@DO) @MODULE@/module.mk ifndef ALIQUIET @echo "***** Linking library $@ *****" -- 2.39.3