# Path used by dynamic loader to find shared libraries and macros
# Paths are different for Unix and Windows. The example shows the defaults
# for all ROOT applications for either Unix or Windows.
-Unix.*.Root.DynamicPath: .:$(ROOTSYS)/lib
+Unix.*.Root.DynamicPath: .:$(ROOTSYS)/lib:$(DYLD_LIBRARY_PATH)
Unix.*.Root.MacroPath: .:$(ROOTSYS)/macros:$(ALICE_ROOT)/macros
WinNT.*.Root.DynamicPath: ./;$(ROOTSYS);$(ROOTSYS)/bin;$(PATH)
WinNT.*.Root.MacroPath: ./;$(ROOTSYS)/macros
--- /dev/null
+PLATFORM:=Darwin
+
+# The compilers
+CXX = g++
+F77 = g77
+CC = gcc
+
+# Global optimisation
+OPT = -O -g
+
+CXXOPTS = $(OPT) -Wall -W -pipe -fsigned-char -fno-common -fweak-coalesced
+COPT = $(OPT) -Wall -W -fno-common -fweak-coalesced
+FOPT = $(OPT) -fno-second-underscore -fweak-coalesced
+CXXFLAGS = $(CXXOPTS) -I/sw/include
+CFLAGS = -Wall -pipe
+
+# rootcint flags
+CINTFLAGS = #$(CXXFLAGS)
+
+# CERNLIB defines
+
+CLIBDEFS = -DCERNLIB_LINUX -DCERNLIB_BLDLIB -DCERNLIB_CZ
+CLIBCXXOPTS =
+CLIBCOPT =
+CLIBFOPT =
+
+# Common Fortran compilation flags
+FFLAGS = $(CLIBFOPT) $(CLIBDEFS) $(FOPT)
+
+LD = export MACOSX_DEPLOYMENT_TARGET=10.2 ; g++
+LDFLAGS = $(OPT)
+
+SHLD := $(LD)
+SOFLAGS := -bundle -flat_namespace -undefined suppress
+SHLIB := -lg2c
+SHLIB :=
+SOEXT := so
+
+DYLD := $(LD)
+DYFLAGS = -dynamiclib -flat_namespace -undefined suppress -single_module
+DYLIB :=
+DYEXT := dylib
+
+ALLD = ar
+ALFLAGS = cr
+ALLIB =
+AEXT = a
+
+
+# rmkdepend flags for building dependencies of FORTRAN files
+DEPENDFFLAGS = $(FFLAGS)
+
+DEPENDCXXFLAGS = $(CXXFLAGS) -I/usr/include/sys
+
+GLIBS = -L/usr/X11R6/lib -lX11
+
+#System libraries
+SYSLIBS = -ldl
+
+EXEFLAGS+= -Xlinker -bind_at_load -Xlinker -m -lg2c
+
+
+
+
#The actual library file
@PACKAGE@LIB:=$(LIBPATH)/lib@PACKAGE@.$(SOEXT)
+
+ifneq ($(DYEXT),)
+@PACKAGE@DLIB:=$(LIBPATH)/lib@PACKAGE@.$(DYEXT)
+endif
+
@PACKAGE@ALIB:=$(LIBPATH)/lib@PACKAGE@.$(AEXT)
#Add this to the modules libs
@MODULE@LIBS += $(@PACKAGE@LIB)
@MODULE@ALIBS += $(@PACKAGE@ALIB)
+ifneq ($(DYEXT),)
+@MODULE@DLIBS += $(@PACKAGE@DLIB)
+endif
#The actual binary file
ifeq ($(TYPE),lib)
ALLLIBS += $(@PACKAGE@LIB)
ALLALIBS += $(@PACKAGE@ALIB)
+ifneq ($(DYEXT),)
+ALLLIBS += $(@PACKAGE@DLIB)
+endif
BINLIBS += -l@PACKAGE@
else
ALLEXECS += $(@PACKAGE@BIN)
endif
+ifeq ($(DYEXT),)
+@PACKAGE@LIB := $(@PACKAGE@LIB)
+else
+@PACKAGE@LIB := $(@PACKAGE@LIB)
+endif
+
# include all dependency files
INCLUDEFILES +=$(@PACKAGE@DEP)
cd $(CURDIR) ; rm -rf $$TMPDIR
$(MUTE)chmod a-w $@
+ifneq ($(DYEXT),)
+$(@PACKAGE@DLIB):$(@PACKAGE@O) $(@PACKAGE@DO) @MODULE@/module.mk
+ifndef ALIQUIET
+ @echo "***** Linking library $@ *****"
+endif
+ $(MUTE)TMPDIR=/tmp/@MODULE@$$$$.`date +%M%S` ; \
+ export TMPDIR; mkdir $$TMPDIR ; cd $$TMPDIR ; \
+ find $(CURDIR)/@MODULE@/tgt_$(ALICE_TARGET) -name '*.o' -exec ln -s {} . \; ;\
+ rm -f $(CURDIR)/$@ ;\
+ $(DYLD) $(@PACKAGE@DYFLAGS) -o $(CURDIR)/$@ $(notdir $(@PACKAGE@O) $(@PACKAGE@DO)) $(@PACKAGE@ELIBSDIR) $(@PACKAGE@ELIBS) $(DYLIB);
+ $(MUTE)chmod a-w $(CURDIR)/$@ ;\
+ rm -rf $$TMPDIR
+endif
+
$(@PACKAGE@ALIB):$(@PACKAGE@O) $(@PACKAGE@DO) @MODULE@/module.mk
ifndef ALIQUIET
@echo "***** Linking static library $@ *****"
ifeq ($(TYPE),lib)
all-@PACKAGE@: $(@PACKAGE@LIB)
+ifneq ($(DYEXT),)
+all-@PACKAGE@: $(@PACKAGE@DLIB)
+endif
else
all-@PACKAGE@: $(@PACKAGE@BIN)
endif