added eta cut for mc result
[u/mrichter/AliRoot.git] / build / Makefile.macosx
CommitLineData
b934f194 1# Makefile for AliRoot for MacOS X with gcc
2
3a8f99bd 3XARGS = xargs
4
f3564e28 5# OS version
6MACOSX_MAJOR := $(strip $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 1))
7MACOSX_MINOR := $(strip $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2))
8
9# fink directories
10FINK_ROOT := $(shell which fink | sed -e 's?/bin/fink??')
796dbee6 11ifeq (,$(FINK_ROOT))
12# No fink, build will probably fail, but we try a guess
13FINK_ROOT=/usr/local
14endif
f3564e28 15
02a1d5c1 16# The compilers
17CXX = g++
02a1d5c1 18CC = gcc
19
f3564e28 20ifeq (g95,$(findstring g95,$(ROOTBUILD)))
21F77 = g95
22else
23F77 = gfortran
24endif
f3564e28 25
02a1d5c1 26# Global optimisation
796dbee6 27OPT = -O -g
b5417bd7 28NOOPT = -O0 -g
02a1d5c1 29
19ca05d1 30CXXOPT = $(OPT)
31CXXNOOPT = $(NOOPT)
32COPT = $(OPT)
02a1d5c1 33FOPT = $(OPT) -fno-second-underscore
de6c7cfd 34ifeq (g95,$(findstring g95,$(ROOTBUILD)))
35FOPT += -fbounds-check
36endif
02a1d5c1 37
38# CERNLIB defines
796dbee6 39CLIBDEFS = -DCERNLIB_LINUX -DCERNLIB_BLDLIB -DCERNLIB_CZ -DCERNLIB_PPC
02a1d5c1 40CLIBCXXOPTS =
41CLIBCOPT =
19ca05d1 42CLIBFOPT = $(CLIBDEFS)
43
4792efa1 44CXXSTF = -pipe -Wall -W -Wno-long-double -pipe -fbounds-check -fsigned-char -fno-common -fmessage-length=0 -Woverloaded-virtual -Weffc++ -Wconversion -fno-default-inline -fno-inline -I/usr/X11R6/include -I$(FINK_ROOT)/include
b5417bd7 45
19ca05d1 46# Compiler flags
b5417bd7 47CXXFLAGS = $(CXXOPT) $(CXXSTF) -Weffc++
796dbee6 48
6c111d79 49ifeq (g95,$(findstring g95,$(ROOTBUILD)))
50CXXFLAGS+=-DFORTRAN_G95
51endif
b5417bd7 52CXXFLAGSNO = $(CXXNOOPT) $(CXXSTF)
796dbee6 53
6c111d79 54CFLAGS = $(COPT) -Wall -W -fno-common -pipe -I$(FINK_ROOT)/include
796dbee6 55
25d9678b 56FFLAGS = $(CLIBFOPT) $(FOPT)
57ifeq (g95,$(findstring g95,$(ROOTBUILD)))
58FFLAGS += -ftrace=full
59endif
19ca05d1 60# rmkdepend flags for building dependencies of FORTRAN files
61DEPENDFFLAGS = $(FFLAGS)
62
63# rootcint flags
64CINTFLAGS =
02a1d5c1 65
f3564e28 66LD = export MACOSX_DEPLOYMENT_TARGET=$(MACOSX_MAJOR).$(MACOSX_MINOR) ; \
02a1d5c1 67 unset LD_PREBIND ; \
68 g++
2bdfa405 69LDFLAGS = $(OPT) $(DICTLOAD)
02a1d5c1 70
71SHLD := $(LD)
2469b598 72SOFLAGS := -bundle -undefined dynamic_lookup
f3564e28 73SHLIB :=
02a1d5c1 74SOEXT := so
75
76DYLD := $(LD)
2469b598 77DYFLAGS = -dynamiclib -undefined dynamic_lookup -single_module
f3564e28 78DYLIB :=
02a1d5c1 79DYEXT := dylib
80
81ALLD = ar
82ALFLAGS = cr
83ALLIB =
84AEXT = a
85
02a1d5c1 86DEPENDCXXFLAGS = $(CXXFLAGS) -I/usr/include/sys
87
de6c7cfd 88SYSLIBS := -L/usr/X11R6/lib -lX11
02a1d5c1 89
de6c7cfd 90EXEFLAGS := -bind_at_load
f3564e28 91
02a1d5c1 92#System libraries
796dbee6 93
f3564e28 94ifeq (g95,$(findstring g95,$(ROOTBUILD)))
21cf279e 95SYSLIBS += -L$(shell g95 --print-search-dirs | sed -n -e 's/install: //p') -lf95
f3564e28 96else
626d87b0 97SYSLIBS += -ldl $(shell $(F77) -print-file-name=libgfortran.dylib)
98SYSLIBS += $(shell $(F77) -print-file-name=libgfortranbegin.a)
f3564e28 99endif