Changes for Mac OSX
authoralibrary <alibrary@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 14 Jun 2005 11:09:35 +0000 (11:09 +0000)
committeralibrary <alibrary@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 14 Jun 2005 11:09:35 +0000 (11:09 +0000)
build/Makefile.macosx
build/module.tpl

index 39b8f4bff64dc8387445579b8e10f4417534eba0..5bd59174f42033107c0efc11b4ef7dc6971ba247 100644 (file)
@@ -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
 
 
index efcdfe7b14f36bab1aeeb8eee796a6be2bace12e..4df3c786e7009d2d13b482da063285c92baddddf 100644 (file)
@@ -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 $@ *****"